» Publishers, Monetize your RSS feeds with FeedShow: More infos (Show/Hide Ads)
Thanks to Rajeshwar Patil, who actually pushed the module to the external servers. Installing the module :
You can install this module after you have successfully installed GlassFish by following the section Instructions to unbundle and configure GlassFish. For the rest of this blog, let us refer to the GlassFish root directory location as $GLASSFISH_ROOT. After you have installed GlassFish, launch the Update Center client :
$GLASSFISH_ROOT/updatecenter/bin/updatetoolSelect the "Available Modules" tab and you should find the Spring Framework module as one of the modules available for install.

Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "spring_framework" created under the $GLASSFISH_ROOT directory. A screenshot of the module directory
Post Installation steps :
During the module installation process 2 files are copied to the $GLASSFISH_ROOT/lib directory : spring.jar and commons-logging.jar. Please note that you need to restart the GlassFish application server after the spring module has been successfully installed.
$GLASSFISH_ROOT/bin/asadmin stop-domain domain1
$GLASSFISH_ROOT/bin/asadmin start-domain domain1
In the above commands - "domain1" is the default domain that is created when the application server is installed. If you are using a different domain, provide that domain name instead of domain1.When the application server is restarted it would now use the new spring libraries. From this point of time you should be able to deploy and use spring applications to the application server.
Sample application - SpringJPA
Before we dwell into the sample application please follow these steps :
- Change the value of "javaee.home" in 2 property files : setup/build.properties & bp-project/build.properties.The property points to your application server installation location i.e $GLASSFISH_ROOT.
- Ensure that the script files setup_sample.sh & unsetup_sample.sh have execute permission. The setup script also creates tables and inserts data into a javadb database. Hence the next 2 steps are required.
- Ensure that you have a DERBY_HOME environment variable pointing to the value - $GLASSFISH_HOME/javadb
- Ensure that the javadb startup script has execute permissions.
- Start the javadb database by executing the command $DERBY_HOME/bin/startNetworkServer
To setup the resources required for the sample application, create the javadb database, insert data and deploy the sample application execute the shell script "setup_sample.sh". Check the server.log to ensure that the application has been successfully deployed. Below I have attached a small section of the log file for reference :
Below are few screen shots of the SpringJPA sample application :



Additional Resources :
- Blog by Carol McDonald Detailed documentation of the sample application SpringJPA.
- For issues/questions on the spring framework module use the dev@glassfish.dev.java.net mailing list.
- Introduction to Spring Framework 2.5
Thanks to Rajeshwar Patil, who actually pushed the module to the external servers. Installing the module :
You can install this module after you have successfully installed GlassFish by following the section Instructions to unbundle and configure GlassFish. For the rest of this blog, let us refer to the GlassFish root directory location as $GLASSFISH_ROOT. After you have installed GlassFish, launch the Update Center client :
$GLASSFISH_ROOT/updatecenter/bin/updatetoolSelect the "Available Modules" tab and you should find the Spring Framework module as one of the modules available for install.

Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "spring_framework" created under the $GLASSFISH_ROOT directory. A screenshot of the module directory
Post Installation steps :
During the module installation process 2 files are copied to the $GLASSFISH_ROOT/lib directory : spring.jar and commons-logging.jar. Please note that you need to restart the GlassFish application server after the spring module has been successfully installed.
$GLASSFISH_ROOT/bin/asadmin stop-domain domain1
$GLASSFISH_ROOT/bin/asadmin start-domain domain1
In the above commands - "domain1" is the default domain that is created when the application server is installed. If you are using a different domain, provide that domain name instead of domain1.When the application server is restarted it would now use the new spring libraries. From this point of time you should be able to deploy and use spring applications to the application server.
Sample application - SpringJPA
Before we dwell into the sample application please follow these steps :
- Change the value of "javaee.home" in 2 property files : setup/build.properties & bp-project/build.properties.The property points to your application server installation location i.e $GLASSFISH_ROOT.
- Ensure that the script files setup_sample.sh & unsetup_sample.sh have execute permission. The setup script also creates tables and inserts data into a javadb database. Hence the next 2 steps are required.
- Ensure that you have a DERBY_HOME environment variable pointing to the value - $GLASSFISH_HOME/javadb
- Ensure that the javadb startup script has execute permissions.
- Start the javadb database by executing the command $DERBY_HOME/bin/startNetworkServer
To setup the resources required for the sample application, create the javadb database, insert data and deploy the sample application execute the shell script "setup_sample.sh". Check the server.log to ensure that the application has been successfully deployed. Below I have attached a small section of the log file for reference :
Below are few screen shots of the SpringJPA sample application :



Additional Resources :
- Blog by Carol McDonald Detailed documentation of the sample application SpringJPA.
- For issues/questions on the spring framework module use the dev@glassfish.dev.java.net mailing list.
- Introduction to Spring Framework 2.5
Thanks to Rajeshwar Patil, who actually pushed the module to the external servers. Installing the module :
You can install this module after you have successfully installed GlassFish by following the section Instructions to unbundle and configure GlassFish. For the rest of this blog, let us refer to the GlassFish root directory location as $GLASSFISH_ROOT. After you have installed GlassFish, launch the Update Center client :
$GLASSFISH_ROOT/updatecenter/bin/updatetoolSelect the "Available Modules" tab and you should find the Spring Framework module as one of the modules available for install.

Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "spring_framework" created under the $GLASSFISH_ROOT directory. A screenshot of the module directory
Post Installation steps :
During the module installation process 2 files are copied to the $GLASSFISH_ROOT/lib directory : spring.jar and commons-logging.jar. Please note that you need to restart the GlassFish application server after the spring module has been successfully installed.
$GLASSFISH_ROOT/bin/asadmin stop-domain domain1
$GLASSFISH_ROOT/bin/asadmin start-domain domain1
In the above commands - "domain1" is the default domain that is created when the application server is installed. If you are using a different domain, provide that domain name instead of domain1.When the application server is restarted it would now use the new spring libraries. From this point of time you should be able to deploy and use spring applications to the application server.
Sample application - SpringJPA
Before we dwell into the sample application please follow these steps :
- Change the value of "javaee.home" in 2 property files : setup/build.properties & bp-project/build.properties.The property points to your application server installation location i.e $GLASSFISH_ROOT.
- Ensure that the script files setup_sample.sh & unsetup_sample.sh have execute permission. The setup script also creates tables and inserts data into a javadb database. Hence the next 2 steps are required.
- Ensure that you have a DERBY_HOME environment variable pointing to the value - $GLASSFISH_HOME/javadb
- Ensure that the javadb startup script has execute permissions.
- Start the javadb database by executing the command $DERBY_HOME/bin/startNetworkServer
To setup the resources required for the sample application, create the javadb database, insert data and deploy the sample application execute the shell script "setup_sample.sh". Check the server.log to ensure that the application has been successfully deployed. Below I have attached a small section of the log file for reference :
Below are few screen shots of the SpringJPA sample application :



Additional Resources :
- Blog by Carol McDonald Detailed documentation of the sample application SpringJPA.
- For issues/questions on the spring framework module use the dev@glassfish.dev.java.net mailing list.
- Introduction to Spring Framework 2.5
There are many users out there who have been using Memcached and MySQL to cache content as part of their web application. Please refer to my published article consisting of a simple web application hosted to GlassFish V2 application server.
Thanks to Rick Palkovic for his help in getting this article published.
There are many users out there who have been using Memcached and MySQL to cache content as part of their web application. Please refer to my published article consisting of a simple web application hosted to GlassFish V2 application server.
Thanks to Rick Palkovic for his help in getting this article published.
There are many users out there who have been using Memcached and MySQL to cache content as part of their web application. Please refer to my published article consisting of a simple web application hosted to GlassFish V2 application server.
Thanks to Rick Palkovic for his help in getting this article published.
This blog details the steps to be followed if you plan to build the GlassFish V3 gem 0.1.2 gem.
Build Steps :
cd "SomeDirForGem"
svn checkout --revision=18807
https://svn.dev.java.net/svn/glassfish-svn/trunk/v3 --username guest
cd v3
mvn -U install
cd distributions/gem
mvn install
Technically one should be able to just get the v3 gem and build it and jruby stuff should work. But just to be on the safe side I am providing the revision number so that svn would checkout and build the same bits that I have used when publishing the gem.
At the end of the steps, mentioned above you would have the gem created and available at :
SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gemTo use this gem with your JRuby installation :
jruby -S gem install SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to install the gem for the first time)
OR
jruby -S gem update SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to update an existing glassfish gem)
Code layout Information :
In V3 land the code related to the JRuby interaction can be found under v3/extras/rails directory. This code layer is a wrapper and eventually delegates to the JRuby module, obtained from the Grizzly project. There have been questions asked on why the code is not in one place. The best way that I can answer this question is is by stating that the initial support for JRuby was provided as part of the Grizzly - JRuby module. This code predates the V3 activity. With the modular design of V3 it is easy to drop in a module and have V3 server support the new module. Hence to support JRuby in V3 the decision was made to use the JRuby module from Grizzly.One task that was carried out before releasing the gem v0.1.2, was to move the jruby code from the module's area to the contribs area of Grizzly. The main reason to do this was to ensure that releases of the grizzly-jruby module could be done independent of grizzly releases. Also each release of the gem version would have a corresponding grizzly-jruby module released to the maven repository. This would make it easier to regenerate the code that was used to create and publish the gem at RubyForge.
For the gem v0.1.2 the V3 code gets the corresponding grizzly-jruby module as part of the build cycle and packages it into the gem.
For those of you who would like to checkout and build the grizzly-jruby module :
svn checkout
https://grizzly.dev.java.net/svn/grizzly/trunk/contribs/jruby
--username guest
cd jruby
mvn install
At this point of time after the successful execution of this steps you would have grizzly-jruby-0.1.2.jar, published to your local maven repository (~/.m2/repository). If you now build the v3 gem, it would use your newly created module.
This blog details the steps to be followed if you plan to build the GlassFish V3 gem 0.1.2 gem.
Build Steps :
cd "SomeDirForGem"
svn checkout --revision=18807
https://svn.dev.java.net/svn/glassfish-svn/trunk/v3 --username guest
cd v3
mvn -U install
cd distributions/gem
mvn install
Technically one should be able to just get the v3 gem and build it and jruby stuff should work. But just to be on the safe side I am providing the revision number so that svn would checkout and build the same bits that I have used when publishing the gem.
At the end of the steps, mentioned above you would have the gem created and available at :
SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gemTo use this gem with your JRuby installation :
jruby -S gem install SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to install the gem for the first time)
OR
jruby -S gem update SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to update an existing glassfish gem)
Code layout Information :
In V3 land the code related to the JRuby interaction can be found under v3/extras/rails directory. This code layer is a wrapper and eventually delegates to the JRuby module, obtained from the Grizzly project. There have been questions asked on why the code is not in one place. The best way that I can answer this question is is by stating that the initial support for JRuby was provided as part of the Grizzly - JRuby module. This code predates the V3 activity. With the modular design of V3 it is easy to drop in a module and have V3 server support the new module. Hence to support JRuby in V3 the decision was made to use the JRuby module from Grizzly.One task that was carried out before releasing the gem v0.1.2, was to move the jruby code from the module's area to the contribs area of Grizzly. The main reason to do this was to ensure that releases of the grizzly-jruby module could be done independent of grizzly releases. Also each release of the gem version would have a corresponding grizzly-jruby module released to the maven repository. This would make it easier to regenerate the code that was used to create and publish the gem at RubyForge.
For the gem v0.1.2 the V3 code gets the corresponding grizzly-jruby module as part of the build cycle and packages it into the gem.
For those of you who would like to checkout and build the grizzly-jruby module :
svn checkout
https://grizzly.dev.java.net/svn/grizzly/trunk/contribs/jruby
--username guest
cd jruby
mvn install
At this point of time after the successful execution of this steps you would have grizzly-jruby-0.1.2.jar, published to your local maven repository (~/.m2/repository). If you now build the v3 gem, it would use your newly created module.
This blog details the steps to be followed if you plan to build the GlassFish V3 gem 0.1.2 gem.
Build Steps :
cd "SomeDirForGem"
svn checkout --revision=18807
https://svn.dev.java.net/svn/glassfish-svn/trunk/v3 --username guest
cd v3
mvn -U install
cd distributions/gem
mvn install
Technically one should be able to just get the v3 gem and build it and jruby stuff should work. But just to be on the safe side I am providing the revision number so that svn would checkout and build the same bits that I have used when publishing the gem.
At the end of the steps, mentioned above you would have the gem created and available at :
SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gemTo use this gem with your JRuby installation :
jruby -S gem install SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to install the gem for the first time)
OR
jruby -S gem update SomeDirForGem/v3/distributions/gem/target/dependency/glassfish/pkg/glassfish-0.1.2-universal-java-1.5.gem(to update an existing glassfish gem)
Code layout Information :
In V3 land the code related to the JRuby interaction can be found under v3/extras/rails directory. This code layer is a wrapper and eventually delegates to the JRuby module, obtained from the Grizzly project. There have been questions asked on why the code is not in one place. The best way that I can answer this question is is by stating that the initial support for JRuby was provided as part of the Grizzly - JRuby module. This code predates the V3 activity. With the modular design of V3 it is easy to drop in a module and have V3 server support the new module. Hence to support JRuby in V3 the decision was made to use the JRuby module from Grizzly.One task that was carried out before releasing the gem v0.1.2, was to move the jruby code from the module's area to the contribs area of Grizzly. The main reason to do this was to ensure that releases of the grizzly-jruby module could be done independent of grizzly releases. Also each release of the gem version would have a corresponding grizzly-jruby module released to the maven repository. This would make it easier to regenerate the code that was used to create and publish the gem at RubyForge.
For the gem v0.1.2 the V3 code gets the corresponding grizzly-jruby module as part of the build cycle and packages it into the gem.
For those of you who would like to checkout and build the grizzly-jruby module :
svn checkout
https://grizzly.dev.java.net/svn/grizzly/trunk/contribs/jruby
--username guest
cd jruby
mvn install
At this point of time after the successful execution of this steps you would have grizzly-jruby-0.1.2.jar, published to your local maven repository (~/.m2/repository). If you now build the v3 gem, it would use your newly created module.
In my previous blog I had informed you all of the release of GlassFish v3 gem v0.1.1. Today I am announcing the release of GlassFish V3 gem 0.1.2.
Issues addressed in v0.1.2 :
The last released gem (v0.1.1) contained that bugs that were reported by users on the GlassFish Issue tracker and RubyForge Tracker. This release deals with those bugs.
- Scaffold created using Rails 2.0.2 adding duplicate entries with v3 gem 0.1.1.
- After the execution of an Ajax request, all subsequent requests are also treated as Ajax requests.
- When using observe_field for AJAX capabilities, it only works once and any attempt afterwards returns the first selected dataset.
Another bug that has been fixed as part of this gem release is - Blank page returned if there are no Rails instances available. From this release on the requests would not be rejected if there are no rails instances available to satisfy them.
Based on comments from Thomas Enebo, have changed the way we were processing requests as part of the gem. In the previous releases of the gem, for each request we were causing the request to be parsed before actually executing it. This obviously was increasing the time taken for each request. Have fixed this as part of this release.
From this release of the gem, you would be able to checkout and build the gem. This was a request that many users had made and this is the reason why the release of the gem was delayed by a couple of weeks. I will publish a blog shortly detailing information on how to build the gem from the GlassFish V3 source.
Continue to use Glassfish Issue Tracker, JRuby JIRA and RubyForge to post issues/comments about the gem.
Installation:
If you have installed the previous version of the gem please uninstall the gem using the commandjruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Output from executing the "ab" command using the old v0.1.1 and the new v0.1.2 glassfish :
I have used "ab" on my Macbook pro, to compare the performance between then 2 latest versions of the gem - v0.1.1 and v0.1.2. These tests were done using the release JRuby 1.1RC2 bits with Rails 2.0.2. The sample that I have used is a very simple HelloWorld, so it is no reflective of the typical user application. Would be great to hear back from users about the performance that you are seeing with your application.
With gem v0.1.1 :
pramod-gopinaths-computer:~ pramodgopinath$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.6 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 2088.982 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 47.87 [#/sec] (mean)
Time per request: 20.89 [ms] (mean)
Time per request: 20.89 [ms] (mean, across all concurrent requests)
Transfer rate: 25.42 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 15.4 0 2993
Processing: 19 20 11.5 20 1482
Waiting: 19 20 11.5 19 1481
Total: 19 20 19.2 20 3023
Percentage of the requests served within a certain time (ms)
50% 20
66% 20
75% 20
80% 20
90% 22
95% 23
98% 23
99% 24
100% 3023 (last request)
With gem v0.1.2 :
$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.7 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 440.712 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 226.91 [#/sec] (mean)
Time per request: 4.41 [ms] (mean)
Time per request: 4.41 [ms] (mean, across all concurrent requests)
Transfer rate: 120.49 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 17.6 0 2852
Processing: 3 4 10.4 3 1270
Waiting: 3 4 10.4 3 1270
Total: 3 4 20.4 3 2858
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 4
95% 4
98% 7
99% 7
100% 2858 (last request)
Resources :
GlassFish JRuby wiki
JRuby wiki
In my previous blog I had informed you all of the release of GlassFish v3 gem v0.1.1. Today I am announcing the release of GlassFish V3 gem 0.1.2.
Issues addressed in v0.1.2 :
The last released gem (v0.1.1) contained that bugs that were reported by users on the GlassFish Issue tracker and RubyForge Tracker. This release deals with those bugs.
- Scaffold created using Rails 2.0.2 adding duplicate entries with v3 gem 0.1.1.
- After the execution of an Ajax request, all subsequent requests are also treated as Ajax requests.
- When using observe_field for AJAX capabilities, it only works once and any attempt afterwards returns the first selected dataset.
Another bug that has been fixed as part of this gem release is - Blank page returned if there are no Rails instances available. From this release on the requests would not be rejected if there are no rails instances available to satisfy them.
Based on comments from Thomas Enebo, have changed the way we were processing requests as part of the gem. In the previous releases of the gem, for each request we were causing the request to be parsed before actually executing it. This obviously was increasing the time taken for each request. Have fixed this as part of this release.
From this release of the gem, you would be able to checkout and build the gem. This was a request that many users had made and this is the reason why the release of the gem was delayed by a couple of weeks. I will publish a blog shortly detailing information on how to build the gem from the GlassFish V3 source.
Continue to use Glassfish Issue Tracker, JRuby JIRA and RubyForge to post issues/comments about the gem.
Installation:
If you have installed the previous version of the gem please uninstall the gem using the commandjruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Output from executing the "ab" command using the old v0.1.1 and the new v0.1.2 glassfish :
I have used "ab" on my Macbook pro, to compare the performance between then 2 latest versions of the gem - v0.1.1 and v0.1.2. These tests were done using the release JRuby 1.1RC2 bits with Rails 2.0.2. The sample that I have used is a very simple HelloWorld, so it is no reflective of the typical user application. Would be great to hear back from users about the performance that you are seeing with your application.
With gem v0.1.1 :
pramod-gopinaths-computer:~ pramodgopinath$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.6 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 2088.982 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 47.87 [#/sec] (mean)
Time per request: 20.89 [ms] (mean)
Time per request: 20.89 [ms] (mean, across all concurrent requests)
Transfer rate: 25.42 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 15.4 0 2993
Processing: 19 20 11.5 20 1482
Waiting: 19 20 11.5 19 1481
Total: 19 20 19.2 20 3023
Percentage of the requests served within a certain time (ms)
50% 20
66% 20
75% 20
80% 20
90% 22
95% 23
98% 23
99% 24
100% 3023 (last request)
With gem v0.1.2 :
$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.7 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 440.712 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 226.91 [#/sec] (mean)
Time per request: 4.41 [ms] (mean)
Time per request: 4.41 [ms] (mean, across all concurrent requests)
Transfer rate: 120.49 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 17.6 0 2852
Processing: 3 4 10.4 3 1270
Waiting: 3 4 10.4 3 1270
Total: 3 4 20.4 3 2858
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 4
95% 4
98% 7
99% 7
100% 2858 (last request)
Resources :
GlassFish JRuby wiki
JRuby wiki
In my previous blog I had informed you all of the release of GlassFish v3 gem v0.1.1. Today I am announcing the release of GlassFish V3 gem 0.1.2.
Issues addressed in v0.1.2 :
The last released gem (v0.1.1) contained that bugs that were reported by users on the GlassFish Issue tracker and RubyForge Tracker. This release deals with those bugs.
- Scaffold created using Rails 2.0.2 adding duplicate entries with v3 gem 0.1.1.
- After the execution of an Ajax request, all subsequent requests are also treated as Ajax requests.
- When using observe_field for AJAX capabilities, it only works once and any attempt afterwards returns the first selected dataset.
Another bug that has been fixed as part of this gem release is - Blank page returned if there are no Rails instances available. From this release on the requests would not be rejected if there are no rails instances available to satisfy them.
Based on comments from Thomas Enebo, have changed the way we were processing requests as part of the gem. In the previous releases of the gem, for each request we were causing the request to be parsed before actually executing it. This obviously was increasing the time taken for each request. Have fixed this as part of this release.
From this release of the gem, you would be able to checkout and build the gem. This was a request that many users had made and this is the reason why the release of the gem was delayed by a couple of weeks. I will publish a blog shortly detailing information on how to build the gem from the GlassFish V3 source.
Continue to use Glassfish Issue Tracker, JRuby JIRA and RubyForge to post issues/comments about the gem.
Installation:
If you have installed the previous version of the gem please uninstall the gem using the commandjruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Output from executing the "ab" command using the old v0.1.1 and the new v0.1.2 glassfish :
I have used "ab" on my Macbook pro, to compare the performance between then 2 latest versions of the gem - v0.1.1 and v0.1.2. These tests were done using the release JRuby 1.1RC2 bits with Rails 2.0.2. The sample that I have used is a very simple HelloWorld, so it is no reflective of the typical user application. Would be great to hear back from users about the performance that you are seeing with your application.
With gem v0.1.1 :
pramod-gopinaths-computer:~ pramodgopinath$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.6 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 2088.982 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 47.87 [#/sec] (mean)
Time per request: 20.89 [ms] (mean)
Time per request: 20.89 [ms] (mean, across all concurrent requests)
Transfer rate: 25.42 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 15.4 0 2993
Processing: 19 20 11.5 20 1482
Waiting: 19 20 11.5 19 1481
Total: 19 20 19.2 20 3023
Percentage of the requests served within a certain time (ms)
50% 20
66% 20
75% 20
80% 20
90% 22
95% 23
98% 23
99% 24
100% 3023 (last request)
With gem v0.1.2 :
$ ab -c 1 -n 100000 http://localhost:3000/test/hello
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software: Grizzly/1.7 Server Hostname: localhost
Server Port: 3000
Document Path: /test/hello
Document Length: 68 bytes
Concurrency Level: 1
Time taken for tests: 440.712 seconds
Complete requests: 100000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 53100000 bytes
HTML transferred: 6800000 bytes
Requests per second: 226.91 [#/sec] (mean)
Time per request: 4.41 [ms] (mean)
Time per request: 4.41 [ms] (mean, across all concurrent requests)
Transfer rate: 120.49 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 17.6 0 2852
Processing: 3 4 10.4 3 1270
Waiting: 3 4 10.4 3 1270
Total: 3 4 20.4 3 2858
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 4
95% 4
98% 7
99% 7
100% 2858 (last request)
Resources :
GlassFish JRuby wiki
JRuby wiki
Changshin Lee aka ias, has launched a JRuby on Rails (JROR) application, GlassFish User Group -Korea using the GlassFish V3 gem for JRuby. Changshin Lee has been an early adopter of the gem and provided a lot of feedback in terms of the gem. He also presented the gem at a conference in Korea over the past weekend. Thanks for your patience. Further details can be found here.
The ground work for the gem was laid down by Jerome Dochez and Charles Nutter last year. There is still a lot to be done, but sure helps when users come back to us and inform us of how they are using the gem to solve their business needs.
Changshin Lee aka ias, has launched a JRuby on Rails (JROR) application, GlassFish User Group -Korea using the GlassFish V3 gem for JRuby. Changshin Lee has been an early adopter of the gem and provided a lot of feedback in terms of the gem. He also presented the gem at a conference in Korea over the past weekend. Thanks for your patience. Further details can be found here.
The ground work for the gem was laid down by Jerome Dochez and Charles Nutter last year. There is still a lot to be done, but sure helps when users come back to us and inform us of how they are using the gem to solve their business needs.
Changshin Lee aka ias, has launched a JRuby on Rails (JROR) application, GlassFish User Group -Korea using the GlassFish V3 gem for JRuby. Changshin Lee has been an early adopter of the gem and provided a lot of feedback in terms of the gem. He also presented the gem at a conference in Korea over the past weekend. Thanks for your patience. Further details can be found here.
The ground work for the gem was laid down by Jerome Dochez and Charles Nutter last year. There is still a lot to be done, but sure helps when users come back to us and inform us of how they are using the gem to solve their business needs.
In my previous blog I had informed you all of the the GlassFish v3 gem v0.1.0. The first release was pushed out last week so that Charles Nutter to demo at the acts_as_conference held last weekend. The gem was very well received at the conference and based on the feedback provided by the attendees, have decided to release a new version to address many of the common issues that were reported.
Issues being addressed in v0.1.1
The following issues are being addressed in this version (v0.1.1) of the gem :
- The name of the gem is being changed from GlassFish to glassfish. The rails naming convention for the gems is with all lower case or with names that contain underscore.
- Support for the applications to be deployed at the Root Context ("/") of the server. The Webrick and Mongrel servers deploy the application to the root context by default.
- Change the default port the server to be 3000 from 8080. Port 8080 has been the default http port of the GlassFish application server, but since we are targetting the Ruby on Rails market with this space, it is better to have the http port set to 3000. At this stage I have also changed the SSL port from the GlassFish default of 8181 to 3131 and the admin default port of 4848 to be 3838.
- Provide command arguments to the script to specify the number of runtime to be created. In v0.1.0 of the gem one could specify the number of runtimes if it was passed in as a specified as a java system property. With this version use could use the command
jruby -S glassfish_rails mephisto -n 2
to create 2 rails instance. - Create instances of rails in parallel. This would speed up the startup of the v3 gem
Main issues I plan to address in v0.1.2
Some of the main items that I plan to work on as part of the gem v0.1.2 :
- I have created the gem from the v3 code that was checked out on 02/08/2008. All the local changes are currently on my laptop. Would be working on getting these chages checked into the v3 code base and would publish steps on how to create a gem from the trunk. Currently there is a manual step involved in setting up the port. I would have to fix this before checking the code in the svn trunk.
- As part of this release was planning to add support for specifying RAILS_ENV as a command argument. But was running into some issues. Would like to provide this in the next release.
- Provide a way for users to provide a port portion as one of the command argument. This would involve making changes in the v3 code since currently the logic is in place to read the port from the config/domain.xml.
- There is growing interest for Merb and plan to interact with Nick Sieger to see how we can add support for Merb in the gem.
If you have installed the previous version of the gem please uninstall the gem using the command
jruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Sample output from executing the glassfish gem v0.1.1 on my Macbook pro :
My JRuby environment :

Command line argument support :

Start Mephisto application :

Mephisto web request

Resources :
GlassFish JRuby wiki
JRuby wiki
In my previous blog I had informed you all of the the GlassFish v3 gem v0.1.0. The first release was pushed out last week so that Charles Nutter to demo at the acts_as_conference held last weekend. The gem was very well received at the conference and based on the feedback provided by the attendees, have decided to release a new version to address many of the common issues that were reported.
Issues being addressed in v0.1.1
The following issues are being addressed in this version (v0.1.1) of the gem :
- The name of the gem is being changed from GlassFish to glassfish. The rails naming convention for the gems is with all lower case or with names that contain underscore.
- Support for the applications to be deployed at the Root Context ("/") of the server. The Webrick and Mongrel servers deploy the application to the root context by default.
- Change the default port the server to be 3000 from 8080. Port 8080 has been the default http port of the GlassFish application server, but since we are targetting the Ruby on Rails market with this space, it is better to have the http port set to 3000. At this stage I have also changed the SSL port from the GlassFish default of 8181 to 3131 and the admin default port of 4848 to be 3838.
- Provide command arguments to the script to specify the number of runtime to be created. In v0.1.0 of the gem one could specify the number of runtimes if it was passed in as a specified as a java system property. With this version use could use the command
jruby -S glassfish_rails mephisto -n 2
to create 2 rails instance. - Create instances of rails in parallel. This would speed up the startup of the v3 gem
Main issues I plan to address in v0.1.2
Some of the main items that I plan to work on as part of the gem v0.1.2 :
- I have created the gem from the v3 code that was checked out on 02/08/2008. All the local changes are currently on my laptop. Would be working on getting these chages checked into the v3 code base and would publish steps on how to create a gem from the trunk. Currently there is a manual step involved in setting up the port. I would have to fix this before checking the code in the svn trunk.
- As part of this release was planning to add support for specifying RAILS_ENV as a command argument. But was running into some issues. Would like to provide this in the next release.
- Provide a way for users to provide a port portion as one of the command argument. This would involve making changes in the v3 code since currently the logic is in place to read the port from the config/domain.xml.
- There is growing interest for Merb and plan to interact with Nick Sieger to see how we can add support for Merb in the gem.
If you have installed the previous version of the gem please uninstall the gem using the command
jruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Sample output from executing the glassfish gem v0.1.1 on my Macbook pro :
My JRuby environment :

Command line argument support :

Start Mephisto application :

Mephisto web request

Resources :
GlassFish JRuby wiki
JRuby wiki
In my previous blog I had informed you all of the the GlassFish v3 gem v0.1.0. The first release was pushed out last week so that Charles Nutter to demo at the acts_as_conference held last weekend. The gem was very well received at the conference and based on the feedback provided by the attendees, have decided to release a new version to address many of the common issues that were reported.
Issues being addressed in v0.1.1
The following issues are being addressed in this version (v0.1.1) of the gem :
- The name of the gem is being changed from GlassFish to glassfish. The rails naming convention for the gems is with all lower case or with names that contain underscore.
- Support for the applications to be deployed at the Root Context ("/") of the server. The Webrick and Mongrel servers deploy the application to the root context by default.
- Change the default port the server to be 3000 from 8080. Port 8080 has been the default http port of the GlassFish application server, but since we are targetting the Ruby on Rails market with this space, it is better to have the http port set to 3000. At this stage I have also changed the SSL port from the GlassFish default of 8181 to 3131 and the admin default port of 4848 to be 3838.
- Provide command arguments to the script to specify the number of runtime to be created. In v0.1.0 of the gem one could specify the number of runtimes if it was passed in as a specified as a java system property. With this version use could use the command
jruby -S glassfish_rails mephisto -n 2
to create 2 rails instance. - Create instances of rails in parallel. This would speed up the startup of the v3 gem
Main issues I plan to address in v0.1.2
Some of the main items that I plan to work on as part of the gem v0.1.2 :
- I have created the gem from the v3 code that was checked out on 02/08/2008. All the local changes are currently on my laptop. Would be working on getting these chages checked into the v3 code base and would publish steps on how to create a gem from the trunk. Currently there is a manual step involved in setting up the port. I would have to fix this before checking the code in the svn trunk.
- As part of this release was planning to add support for specifying RAILS_ENV as a command argument. But was running into some issues. Would like to provide this in the next release.
- Provide a way for users to provide a port portion as one of the command argument. This would involve making changes in the v3 code since currently the logic is in place to read the port from the config/domain.xml.
- There is growing interest for Merb and plan to interact with Nick Sieger to see how we can add support for Merb in the gem.
If you have installed the previous version of the gem please uninstall the gem using the command
jruby -S gem uninstall GlassFishInstall the new version of the gem using the command :
jruby -S gem install glassfish
Sample output from executing the glassfish gem v0.1.1 on my Macbook pro :
My JRuby environment :

Command line argument support :

Start Mephisto application :

Mephisto web request

Resources :
GlassFish JRuby wiki
JRuby wiki
Effective from last Thursday, I have hosted the gem at RubyForge.
Since RubyForge is the primary location from where developers get the various gems, decided to push out the GlassFish V3 gem also out there. This would help many developers test drive the gem and provide feedback to help us improve the gem further.
The gem released on RubyForge is governed by the same licensing scheme as GlassFish.
As part of publishing the gem to RubyForge the version number of the gem has been changed to 0.1.0. For those of you who had downloaded the gem using my previous blog, you would notice the version of the gem being displayed as 10.0.0. The history here is that since the gem was being created for GlassFish V3, the thought was that we would call it 10.0.0 to reflect the version of GlassFish (since 9.x version refers to the GlassFish v2). But since the gem is now being hosted at RubyForge, have decided to start with a version of 0.1.0.
If you have already installed the older version of the gem please uninstall the gem by using the command
gem uninstall GlassFishTo run this command ensure that you have set the $JRUBY_HOME/bin directory to your PATH environment variable.
Some useful commands :
Install the new gem :
gem install GlassFishGet more details of the gem :
gem specification GlassFish
Once the gem has been installed ensure that you are at the root of the application directory and run the command
jruby -S glassfish_rails application_directory_name.
For further details refer to the GlassFish V3 section of the Getting Started Guide.
Effective from last Thursday, I have hosted the gem at RubyForge.
Since RubyForge is the primary location from where developers get the various gems, decided to push out the GlassFish V3 gem also out there. This would help many developers test drive the gem and provide feedback to help us improve the gem further.
The gem released on RubyForge is governed by the same licensing scheme as GlassFish.
As part of publishing the gem to RubyForge the version number of the gem has been changed to 0.1.0. For those of you who had downloaded the gem using my previous blog, you would notice the version of the gem being displayed as 10.0.0. The history here is that since the gem was being created for GlassFish V3, the thought was that we would call it 10.0.0 to reflect the version of GlassFish (since 9.x version refers to the GlassFish v2). But since the gem is now being hosted at RubyForge, have decided to start with a version of 0.1.0.
If you have already installed the older version of the gem please uninstall the gem by using the command
gem uninstall GlassFishTo run this command ensure that you have set the $JRUBY_HOME/bin directory to your PATH environment variable.
Some useful commands :
Install the new gem :
gem install GlassFishGet more details of the gem :
gem specification GlassFish
Once the gem has been installed ensure that you are at the root of the application directory and run the command
jruby -S glassfish_rails application_directory_name.
For further details refer to the GlassFish V3 section of the Getting Started Guide.







