Saturday January 31, 2009
Running Kaiser Permanente San Francisco Half Marathon
I'll be running Kaiser
Permanente San Francisco 1/2 marathon tomorrow. This is my
first time on this course:

Click on the above map to explore!
The course seems slightly confusing because it crosses itself couple of
times. But hopefully it's managed nicely to help the runners. The bib
and the chip came in via postal mail which saves an additional trip to
San Francisco for material pickup, that is nice!
The starting time of 8am, predicted low of 46o
F, 30 days of running this month, and running right next to the ocean -
will find out if it's an exciting adventure tomorrow ;)
Anybody else running ?
Technorati: running
marathon
kaiser
Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
|
Friday January 30, 2009
TOTD #67: How to front-end a GlassFish Cluster with Apache + mod_jk on Mac OSX Leopard ?
GlassFish
provides support for High Availability by creating a cluster of server
instances and session state replication. This enhances the
scalability and availability of your application and is a critical
piece of decision making critieria when selecting an Application
Server. Clustering
in GlassFish Version 2 provides comprehensive introduction to
clustering, high availability and load balancing in GlassFish.
GlassFish provides out-of-the-box support for load-balancing HTTP(S),
JMS,
and RMI/IIOP
traffic and front-ended by Sun Java System Web Server, Apache Web
Server, and Microsoft IIS (more
details here) using the Load
Balancer plug-in. This plug-in however is not available for
Mac OS X and a popular technique used on that platform for front-ending
is to use Apache httpd
+ mod_jk.
This is exactly what this TOTD (Tip
Of The Day) is going to
describe.
This TOTD is going to explain how to front-end a 3-instance GlassFish
cluster with Apache httpd and mod_jk on Mac OS X.
This blog is using information from the following blogs:

| ~/samples/v2/clustering/glassfish/bin
>./asadmin
create-jvm-options --target cluster1
"-DjvmRoute=\${AJP_INSTANCE_NAME}" Command create-jvm-options executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-jvm-options --target cluster1 "-Dcom.sun.enterprise.web.connector.enableJK=\${AJP_PORT}" Command create-jvm-options executed successfully. |
| ~/samples/v2/clustering/glassfish/bin
>./asadmin
create-system-properties --target instance1
AJP_INSTANCE_NAME=instance1 Command create-system-properties executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-system-properties --target instance1 AJP_PORT=9090 Command create-system-properties executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-system-properties --target instance2 AJP_INSTANCE_NAME=instance2 Command create-system-properties executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-system-properties --target instance2 AJP_PORT=9091 Command create-system-properties executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-system-properties --target instance3 AJP_INSTANCE_NAME=instance3 Command create-system-properties executed successfully. ~/samples/v2/clustering/glassfish/bin >./asadmin create-system-properties --target instance3 AJP_PORT=9092 Command create-system-properties executed successfully. |
| httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_jk-1.2.25-httpd-2.2.4.so into server: dlopen(/usr/libexec/apache2/mod_jk-1.2.25-httpd-2.2.4.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_jk-1.2.25-httpd-2.2.4.so: mach-o, but wrong architecture |
| ~/workspaces/tomcat-connectors-1.2.27-src/native >./configure --with-apxs=/usr/sbin/apxs |
| .
. . checking for target platform... unix no apache given no netscape given configure: creating ./config.status config.status: creating Makefile config.status: creating apache-1.3/Makefile config.status: creating apache-1.3/Makefile.apxs config.status: creating apache-2.0/Makefile config.status: creating apache-2.0/Makefile.apxs config.status: creating common/Makefile config.status: creating common/list.mk config.status: creating common/jk_types.h config.status: creating jni/Makefile config.status: creating common/portable.h config.status: executing depfiles commands |
| ~/workspaces/tomcat-connectors-1.2.27-src/native/apache-2.0 >sudo cp mod_jk.so /usr/libexec/apache2/ |
| LoadModule jk_module libexec/apache2/mod_jk-1.2.25-httpd-2.2.4.so |
| JkWorkersFile
/etc/apache2/worker.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send all jsp requests to GlassFish JkMount /*.jsp loadbalancer |
| sudo mkdir /var/log/httpd |
| #
Define 1 real worker using ajp13 worker.list=loadbalancer # Set properties for instance1 worker.instance1.type=ajp13 worker.instance1.host=localhost worker.instance1.port=9090 worker.instance1.lbfactor=50 worker.instance1.cachesize=10 worker.instance1.cache_timeout=600 worker.instance1.socket_keepalive=1 worker.instance1.socket_timeout=300 # Set properties for instance2 worker.instance2.type=ajp13 worker.instance2.host=localhost worker.instance2.port=9091 worker.instance2.lbfactor=50 worker.instance2.cachesize=10 worker.instance2.cache_timeout=600 worker.instance2.socket_keepalive=1 worker.instance2.socket_timeout=300 # Set properties for instance3 worker.instance3.type=ajp13 worker.instance3.host=localhost worker.instance3.port=9092 worker.instance3.lbfactor=50 worker.instance3.cachesize=10 worker.instance3.cache_timeout=600 worker.instance3.socket_keepalive=1 worker.instance3.socket_timeout=300 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=instance1,instance2,instance3 |
| ~/samples/v2/clustering/glassfish/lib
>cp
~/tools/apache-tomcat-5.5.27/server/lib/tomcat-ajp.jar . ~/samples/v2/clustering/glassfish/lib >cp ~/Downloads/commons-logging-1.1.1/commons-logging-1.1.1.jar . ~/samples/v2/clustering/glassfish/lib >cp ~/tools/commons-modeler-2.0.1/commons-modeler-2.0.1.jar . |
| #Listen 12.34.56.78:80 Listen 80 |
| sudo httpd |
| . . . [Thu Jan 29 11:14:16 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jan 29 11:14:16 2009] [warn] No JkShmFile defined in httpd.conf. Using default /usr/logs/jk-run time-status [Thu Jan 29 11:14:16 2009] [warn] No JkShmFile defined in httpd.conf. Using default /usr/logs/jk-run time-status [Thu Jan 29 11:14:16 2009] [notice] Digest: generating secret for digest authentication ... [Thu Jan 29 11:14:16 2009] [notice] Digest: done [Thu Jan 29 11:14:16 2009] [warn] pid file /private/var/run/httpd.pid overwritten -- Unclean shutdow n of previous Apache run? [Thu Jan 29 11:14:16 2009] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 mod_jk/1. 2.27 configured -- resuming normal operations |




Posted by Arun Gupta in General | Comments[7]
|
|
|
|
|
Thursday January 29, 2009
"Sparks of passion" in the "world of Open Source" - Archana N contributes to GlassFish Documentation
Interested in contributing to open source ? Archana N has a
recommendation for you:
Flame the sparks of
passion in you,
Experience the world of
Open Source anew.
Discover your potentials
as they unfold,
Venture to contribute in
the technologies untold.
Archana N is an ex-Sun
Campus Ambassador from Amrita Vishwa
Vidyapeetham, India. Recently she contributed on how to
secure the
existing EJB converter example from the Java EE tutorial
using mutual authentication. She continue to work on developing RESTful
web services using Project
Jersey as her next contribution for GlassFish
documentation.
The GlassFish
Documentation team published her interview to recognize the
efforts, read it here.
Thank you Archana for your contribution to GlassFish, keep the
passion
alive!
If you are interested in learning/talking about GlassFish at your
university, spotlight.dev.java.net/start
provides a comprehensive set of slides (with speaker notes), demos,
screencasts, training materials and other resources to get you started!
Technorati: glassfish
students
campusambassador
spotlight
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Wednesday January 28, 2009
Free GlassFish Webinar for Students at OSUM
Are you a student and would like to learn why GlassFish is meant for
you ?

Create/join a student community at osum.sun.com
and attend the GlassFish
Webinar. This webinar will introduce GlassFish application
server, show multiple demos that can be used to impress your
colleagues/professors, and answer your questions around GlassFish.
The coordinates are:
Feb 3, 2009, 8:30am PT
Webinar
Invite
This webinar will be conducted using Elluminate Live! You will be able
to listen to live audio via your computer speakers or ear phones and be
able to ask questions using chat/text.
Learn more about OSUM (pronounced "awesome") here.
Create your OSUM today
and join over 900 student clubs from over 80 countries!
If you are interested in talking about GlassFish, spotlight.dev.java.net/start
provides a comprehensive set of slides (with speaker notes), demos,
screencasts, training materials and other resources to get you started!
Technorati: glassfish
webinar
osum students
spotlight
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Tuesday January 27, 2009
GlassFish in CEUI and Campus Party
As reported earlier,
Alan Vargas,
the Sun
Campus Ambassador at CEUI
(Centro Universitario de Ixltahuaca) presented on GlassFish. The
message of "GlassFish v2 - Fast, Easy, and Reliable" and "GlassFish v3
- Modular, Embeddable, and Extensible" was clearly delivered in the
talk.
Alan has published several useful blogs on GlassFish
(in Spanish and English) recently:
![]() |
![]() |
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Monday January 26, 2009
Would you like to know how JRuby,
NetBeans, GlassFish, and MySQL can power your Rails
applications ?

This informative
technical webinar explains the fundamentals of JRuby and how
the NetBeans IDE makes developing/debugging/deploying Rails
applications on GlassFish quick, fun and cost-effective.
The webinar starts 10am PT on Jan 27th, 2009 and can be accessed from a
browser.
Register here.
Don't miss out, it's going to start in less than 12 hours!
Technorati: jruby
rubyonrails
glassfish
netbeans
mysql webinar
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
|
Friday January 23, 2009
GlassFish @ University of Ixtlahuaca, Mexico - Coming Up on Jan 26!
Learn about GlassFish
at Centro
Universitario de Ixtlahuaca OSUM!
![]() |
Date: Jan 26, 2009 Time: 10am-12pm PT Language: Spanish Sign up here! |
![]() |
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
| Singapore Tech Days 2009 - Wrapup
A picture is worth thousand words! Now that Picasa 3.0 is available
on
Mac, here is a collage of pictures from the recently
concluded Sun Tech
Days in Singapore.

The complete photo album is available at:
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Wednesday January 21, 2009
Singapore Tech Days 2009 - Talent Show, Cloud Camp, GlassFish Demo
Follow up from Day
1.
Matt Thompson talked about cloud computing. Even though the term "cloud
computing" is becoming more prominent now, it very well echoes Sun's 25
years old mantra - "The Network is the Computer". Even though there are
some prominent players but the field is very much emerging. Matt
touched upon different interpretations of a cloud - Platform,
Infrastructure or Software as a Service (PaaS, Iaas, SaaS). A set of
developer tools that allows you to manage your cloud is equally
important for it to be successful. He then gave a preview of some of
the open source developer tools (Kenai
and Zembly)
available from Sun Microsystems to assist in that direction.
After the keynote, some participants showed their "strange and unusual"
talent to add a bit of levity to the otherwise intense
technical conference. Even though there were 6 participants but it was
less "strange and unusal" than the previous ones I've attended (Sao
Paolo 2008, Hyderabad
2008, Beijing
2007). Here is a video of the show and judget it yourself:
A video of the GlassFish demo shown during Day
1 is now available:
The cloud
camp in the evening had approx 50 attendees with an
interesting discussion around the definition of cloud, security
concerns, portability of applications across clouds, major players in
the game, and much more. Free pizza and beer is always a good way to
keep audience engaged until late in the night ;-) Sign
up for a cloud camp near your city!
Here are some pictures from Day 2:
Running by the Singapore River
Had a great 44 minutes run by the Singapore
River in downtown Singapore.

There were underpasses for all the streets so that made it really
comfortable. The hotel
desk even had a running band with 2K, 6K, and 10K routes -
really neat! I anyway deviated and ran along the river which was fun.
21 days of running so far this year - 100% in 2009 :)
Check out pictures of the Singapore
trip so far:
Posted by Arun Gupta in Running | Comments[1]
|
|
|
|
|
Tuesday January 20, 2009
Doctor
Fish (aka "Garra rufa", Kangal fish, Nibble fish) is a
freshwater fish fish that originates from Turkey, Syria, Iraq, and
Iran. They consume the dead and affected areas of your skin and also
help in curing skin diseases and disorders. Now attending Singapore
Tech Days 2009, some of us got "fish pedicure" done outside
the Singapore
Night Safari park.
Here are couple of pictures:
Sun Tech Days 2009, Singapore - Welcome Reception
Follow up from Part
1.
Attended "What Developers should care about MySQL ?" by Colin and
"Groovy and Grails" by Chuk-munn
Lee.
I enjoyed both the talks for different reasons. Colin's talk explained
the pluggable
storage engine architecture that is unique to MySQL
(pronounced my-ess-kew-ell,
not my-sequel).
It was interesting to know that the different storage engines can be
picked a la carte
based upon the requirements. The performance comparison for INSERTs was
5x between MyISAM, InnoDB and Archive storage engines. But then InnoDB
provide transactions and other goodies. Multiple performance tuning
tips such as using negative unsigned int instead of BIGINT and
partitioning databases if the number of records grow more than 1 billion were good! Keep an eye
on his blog
for slides.
Chuk's talk introduced Groovy, Grails,
showed several samples of NetBeans
and Grails
integration. A Grails application can be deployed as a WAR file on
GlassFish. Alternatively you can download the Grails module from GlassFish v3 Update
Center and use the standard "run-app" command to run your
Grails application using the embedded GlassFish v3 instead of Jetty.
This
is explained nicely in the screencast below:
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
| Sun Tech Days 2009, Singapore - Day 1
The Sun Tech Days
Singapore started earlier this morning - over 1100
developers, an outstanding audience!!!
The kick off had a good local flare when the Gods of
Longevity, Fortune, and Prosperity (Fu Lu Shou) showed up to
start the event ;-) The build up to their appearance was really
exciting as evident from
the video below:
This particular event will also be recorded in Singapore
Book of Records for the largest numbers of Sun developers
playing
a rattle together :) Here are some pictures from the event:
| glassfish/bin/asadmin start-domain --verbose |
| INFO: GlassFish v3 Prelude startup time : Felix(1732ms) startup services(1091ms) total(2823ms) |
Posted by Arun Gupta in General | Comments[4]
|
|
|
|
|
Monday January 19, 2009
EJBs in a WAR - Simplified packaging defined by EJB 3.1, Available in GlassFish v3
The EJB 3.1
specification says:
An enterprise bean class
with a component-defining annotation defines an enterprise bean
component when packaged within the WEB-INF/classes directory or in a
.jar file within WEB-INF/lib.
In simple English it means, an EJB can be a POJO annotated with EJB
annotations (such as @javax.ejb.Stateless) and bundled within
WEB-INF/classes inside a WAR.
This feature is available in GlassFish v3 for some
time now.
Imagine the ramifications, you now have Container Managed Persistence,
Transacations, Security, and all other standard benefits of EJB - only
this time in a WAR file.
The default configuration of GlassFish v3 Prelude does not include an
EJB container. Lets first install it!
The EJB container in GlassFish v3 Prelude can be installed in couple of
ways:
| arun@opensolaris:~/glassfishv3-prelude/bin$ ./pkg The software needed for this command (pkg) is not installed. When this tool interacts with package repositories, some system information such as your system's IP address and operating system type and version is sent to the repository server. For more information please see: http://wiki.updatecenter.java.net/Wiki.jsp?page=UsageMetricsUC2 Once installation is complete you may re-run this command. Would you like to install this software now (y/n): y Install image: /export/home/arun/glassfishv3-prelude/bin/.. Installing pkg packages. Installing: [pkg:/pkg@1.0.7,0-15.1269:20081008T211255Z, pkg:/python2.4-minimal@2.4.4.0,0-15.1269:20081008T211307Z] Initialization complete. Software successfully installed. You may now re-run this command (pkg). |
arun@opensolaris:~/glassfishv3-prelude/bin$ ./pkg install glassfish-ejbDOWNLOAD PKGS FILES XFER (MB) PHASE ACTIONS |
arun@opensolaris:~/glassfishv3-prelude/bin$ ./pkg listNAME (AUTHORITY) VERSION STATE UFIX |







Posted by Arun Gupta in General | Comments[10]
|
|
|
|
|
Sunday January 18, 2009
OSUM - Open Source University Meetup - awesome venue for students!

If your university is not participating in the Sun
Campus Ambassador program, you can always create an Open Source University Meetup
(OSUM, pronounced "awesome") community. Sun Microsystems offers you the
complete range of Open Source software - OpenSolaris, OpenOffice, NetBeans, GlassFish, MySQL, and many others.
OSUM provides an opportunity to create a student club and:
* LEARN about Open Source Technologies
and how they are opening up new career opportunities for students
* ACCESS free online web courses, webinars, tutorials and other
resources to prepare for career enhancing certifications
* SHARE your technical knowledge with
other students around the world virtually and on campus
* COLLABORATE with a global community of
students via forum, campus events, webinars, etc.
* CONNECT and make friends with students
around the world who are committed to Open Source just like you!
Create your OSUM today
and join over 900 student clubs from over 80 countries!
If you are interested in talking about GlassFish, spotlight.dev.java.net/start
provides a comprehensive set of slides (with speaker notes), demos,
screencasts, training materials and other resources to get you started!
Technorati: glassfish
students
spotlight
osum campusambassador
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Today's Page Hits: 3869
Total # blog entries: 1007