• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Monday, 11 Feb 2008 14:26
In my previous blog I had pushed out a gem for GlassFish v3. This gem was available at download.java.net.
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 GlassFish
To 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 GlassFish
Get 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.
Author: "pramodg" Tags: "Sun, gem, glassfish, jruby, rails, ruby,..."
Send by mail Print  Save  Delicious 
Date: Friday, 04 Jan 2008 18:09
Newer GlassFish V3 gem for JRuby

It has been a while since a new version of the GlassFish V3 gem for JRuby was last released. Since I have picked up the effort of maintaining this gem from Jerome, thought I would start by releasing a version based on the latest GlassFish V3 bits. Additionally I have made one change to the gem, by creating 2 Rails instances where only one was being created before.


Known Limitations of the gem

Since we are targeting this gem to be used in the development environment, the gem should at a minimum provide for the functionalities that Webrick provides. Below I have listed out the limitations of the gem in the curent form. I would be working on improving the gem to fix these issues.

  • The gem starts up by default on port 8080 and the only way to change the port is by manually editing the port entry in domain.xml. There should be support for --port option to provide a port to the gem.
  • If the default port is being used, then the gem should look for the sequential port that could be used to start up.
  • Requests made to the process launched using
        jruby -S glassfish_rails  
    are not being queued up. Hence if there is no rails instance available to satisfy the request, then the next request is returned with a blank page. This has already been reported by the users with the earlier gem.
  • Creating rails instances to be pooled is a time consuming process. Based on tests on my Macbook pro, found the following when using JRuby 1.0.3
    • 1 rails instance takes 8-9secs,
    • 2 rails instance 10-11secs,
    • 3 rails instance 12-13secs,
    • 4 rails instance 14-16secs,
    • 5 rails instance 16-18secs,
    We could use the Goldspike approach, where we start with a minimum number of pool instances and then grow based on demand. In this case we would need to provide means to the user to set/change these values


Please feel free to add your comments to this blog to improve the GlassFish gem.


Author: "pramodg" Tags: "Sun, gem, glassfish, jruby, v3"
Send by mail Print  Save  Delicious 
Date: Friday, 04 Jan 2008 18:09
Newer GlassFish V3 gem for JRuby

It has been a while since a new version of the GlassFish V3 gem for JRuby was last released. Since I have picked up the effort of maintaining this gem from Jerome, thought I would start by releasing a version based on the latest GlassFish V3 bits. Additionally I have made one change to the gem, by creating 2 Rails instances where only one was being created before.


Known Limitations of the gem

Since we are targeting this gem to be used in the development environment, the gem should at a minimum provide for the functionalities that Webrick provides. Below I have listed out the limitations of the gem in the curent form. I would be working on improving the gem to fix these issues.

  • The gem starts up by default on port 8080 and the only way to change the port is by manually editing the port entry in domain.xml. There should be support for --port option to provide a port to the gem.
  • If the default port is being used, then the gem should look for the sequential port that could be used to start up.
  • Requests made to the process launched using
        jruby -S glassfish_rails  
    are not being queued up. Hence if there is no rails instance available to satisfy the request, then the next request is returned with a blank page. This has already been reported by the users with the earlier gem.
  • Creating rails instances to be pooled is a time consuming process. Based on tests on my Macbook pro, found the following when using JRuby 1.0.3
    • 1 rails instance takes 8-9secs,
    • 2 rails instance 10-11secs,
    • 3 rails instance 12-13secs,
    • 4 rails instance 14-16secs,
    • 5 rails instance 16-18secs,
    We could use the Goldspike approach, where we start with a minimum number of pool instances and then grow based on demand. In this case we would need to provide means to the user to set/change these values


Please feel free to add your comments to this blog to improve the GlassFish gem.


Author: "pramodg" Tags: "Sun, gem, glassfish, jruby, v3"
Send by mail Print  Save  Delicious 
Date: Friday, 04 Jan 2008 16:09
Newer GlassFish V3 gem for JRuby

It has been a while since a new version of the GlassFish V3 gem for JRuby was last released. Since I have picked up the effort of maintaining this gem from Jerome, thought I would start by releasing a version based on the latest GlassFish V3 bits. Additionally I have made one change to the gem, by creating 2 Rails instances where only one was being created before.


Known Limitations of the gem

Since we are targeting this gem to be used in the development environment, the gem should at a minimum provide for the functionalities that Webrick provides. Below I have listed out the limitations of the gem in the curent form. I would be working on improving the gem to fix these issues.

  • The gem starts up by default on port 8080 and the only way to change the port is by manually editing the port entry in domain.xml. There should be support for --port option to provide a port to the gem.
  • If the default port is being used, then the gem should look for the sequential port that could be used to start up.
  • Requests made to the process launched using
        jruby -S glassfish_rails  
    are not being queued up. Hence if there is no rails instance available to satisfy the request, then the next request is returned with a blank page. This has already been reported by the users with the earlier gem.
  • Creating rails instances to be pooled is a time consuming process. Based on tests on my Macbook pro, found the following when using JRuby 1.0.3
    • 1 rails instance takes 8-9secs,
    • 2 rails instance 10-11secs,
    • 3 rails instance 12-13secs,
    • 4 rails instance 14-16secs,
    • 5 rails instance 16-18secs,
    We could use the Goldspike approach, where we start with a minimum number of pool instances and then grow based on demand. In this case we would need to provide means to the user to set/change these values


Please feel free to add your comments to this blog to improve the GlassFish gem.


Author: "pramodg" Tags: "Sun, gem, glassfish, jruby, v3"
Send by mail Print  Save  Delicious 
Date: Thursday, 20 Dec 2007 19:52
"JRuby on GlassFish" Updatecenter module (2.1) containing JRuby 1.0.3

Over the past weekend JRuby 1.0.3 was released and this time I wanted to ensure that we would have the GlassFish updatecenter module published at the earliest. This is version 2.1 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish installation.


Contents of the JRuby on GlassFish 2.1 module

This JRuby update center module primarily consists of JRuby 1.0.3 and Goldspike revision 858. The JRuby 1.0.3 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the directory structure after having installed the JRuby on GlassFish 2.1 module



If you had already installed the previous 2.0 module, updatetool would inform that there is an update available. In this case go to the "Available Updates" section and select JRuby on GlassFish 2.1 module and install it. In this case the directory structure would be


Web application modes
JRuby on GlassFish update center module bundles Goldspike and it supports the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). Run the following command to achieve this :
  ant -f $GLASSFISH_ROOT/jruby/install.xml setup-shared-env

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Thursday, 20 Dec 2007 17:52
"JRuby on GlassFish" Updatecenter module (2.1) containing JRuby 1.0.3

Over the past weekend JRuby 1.0.3 was released and this time I wanted to ensure that we would have the GlassFish updatecenter module published at the earliest. This is version 2.1 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish installation.


Contents of the JRuby on GlassFish 2.1 module

This JRuby update center module primarily consists of JRuby 1.0.3 and Goldspike revision 858. The JRuby 1.0.3 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the directory structure after having installed the JRuby on GlassFish 2.1 module



If you had already installed the previous 2.0 module, updatetool would inform that there is an update available. In this case go to the "Available Updates" section and select JRuby on GlassFish 2.1 module and install it. In this case the directory structure would be


Web application modes
JRuby on GlassFish update center module bundles Goldspike and it supports the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). Run the following command to achieve this :
  ant -f $GLASSFISH_ROOT/jruby/install.xml setup-shared-env

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Thursday, 20 Dec 2007 11:52
"JRuby on GlassFish" Updatecenter module (2.1) containing JRuby 1.0.3

Over the past weekend JRuby 1.0.3 was released and this time I wanted to ensure that we would have the GlassFish updatecenter module published at the earliest. This is version 2.1 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish installation.


Contents of the JRuby on GlassFish 2.1 module

This JRuby update center module primarily consists of JRuby 1.0.3 and Goldspike revision 858. The JRuby 1.0.3 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the directory structure after having installed the JRuby on GlassFish 2.1 module



If you had already installed the previous 2.0 module, updatetool would inform that there is an update available. In this case go to the "Available Updates" section and select JRuby on GlassFish 2.1 module and install it. In this case the directory structure would be


Web application modes
JRuby on GlassFish update center module bundles Goldspike and it supports the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). Run the following command to achieve this :
  ant -f $GLASSFISH_ROOT/jruby/install.xml setup-shared-env

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Thursday, 13 Dec 2007 06:22
"JRuby on GlassFish" Updatecenter module containing JRuby 1.0.2

Since JRuby 1.0.2 has been released for some time it was time that the GlassFish updatecenter module was updated to make use of these JRuby bits. As of last week we now have a new version of the "JRuby in GlassFish" updatecenter module. This is version 2.0 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish v2 Update Release installation.


Contents of the JRuby on GlassFish 2.0 module

This JRuby update center module primarily consists of JRuby 1.0.2 and Goldspike revision 808. The JRuby 1.0.2 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 Update Release run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the JRuby module directory


The layout of the directory created by the update center module 2.0 is different from the previous module to help support multiple jruby installations.


Web application modes
Since this JRuby update center module bundles Goldspike we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
  asadmin stop-domain domain1    (Stop the application server if it is running)
  cp $GLASSFISH_ROOT/jruby/jruby-1.0.2/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
  asadmin start-domain domain1   (Start the application server instance)

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Thursday, 13 Dec 2007 04:22
"JRuby on GlassFish" Updatecenter module containing JRuby 1.0.2

Since JRuby 1.0.2 has been released for some time it was time that the GlassFish updatecenter module was updated to make use of these JRuby bits. As of last week we now have a new version of the "JRuby in GlassFish" updatecenter module. This is version 2.0 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish v2 Update Release installation.


Contents of the JRuby on GlassFish 2.0 module

This JRuby update center module primarily consists of JRuby 1.0.2 and Goldspike revision 808. The JRuby 1.0.2 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 Update Release run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the JRuby module directory


The layout of the directory created by the update center module 2.0 is different from the previous module to help support multiple jruby installations.


Web application modes
Since this JRuby update center module bundles Goldspike we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
  asadmin stop-domain domain1    (Stop the application server if it is running)
  cp $GLASSFISH_ROOT/jruby/jruby-1.0.2/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
  asadmin start-domain domain1   (Start the application server instance)

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Wednesday, 12 Dec 2007 22:22
"JRuby on GlassFish" Updatecenter module containing JRuby 1.0.2

Since JRuby 1.0.2 has been released for some time it was time that the GlassFish updatecenter module was updated to make use of these JRuby bits. As of last week we now have a new version of the "JRuby in GlassFish" updatecenter module. This is version 2.0 of the module and would be available when you launch the updatetool from your GlassFish installation/updatecenter/bin directory of your GlassFish v2 Update Release installation.


Contents of the JRuby on GlassFish 2.0 module

This JRuby update center module primarily consists of JRuby 1.0.2 and Goldspike revision 808. The JRuby 1.0.2 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 Update Release run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby" created under your GlassFish root directory. A screenshot of the JRuby module directory


The layout of the directory created by the update center module 2.0 is different from the previous module to help support multiple jruby installations.


Web application modes
Since this JRuby update center module bundles Goldspike we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. For this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
  asadmin stop-domain domain1    (Stop the application server if it is running)
  cp $GLASSFISH_ROOT/jruby/jruby-1.0.2/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
  cp $GLASSFISH_ROOT/jruby/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
  asadmin start-domain domain1   (Start the application server instance)

Sample Applications
This module comes with 3 sample applications -
  • HelloWorldRailsApp - a simple hello world application
  • cookbook - sample created using instructions from O'Reilly OnLamp
  • mephisto - version 0.7.3 of Mephisto blogging
In each of these sample application directory there is a file GLASSFISH_README, which provides information on how to deploy and run the application.
Author: "pramodg" Tags: "Sun, cookbook, glassfish, goldspike, jru..."
Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Sep 2007 17:44
JRuby Updatecenter module for Glassfish V2

With the official release of GlassFish V2, I wanted to inform you all about the availability of a new GlassFish update center module to support JRuby. This module is called "JRuby on GlassFish". This module will make it is easier to deploy a Ruby on Rails (ROR) application to a GlassFish application server. Thanks to Rajeshwar, who actually pushed the module on the net.


Contents of the JRuby module

This JRuby update center module primarily consists of JRuby 1.0.1 and Goldspike (nee Rails Integration) revision 735. The JRuby 1.0.1 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby-1_0" created under your GlassFish root directory. A screenshot of the JRuby module directory


The top level directory name (jruby-1_0) corresponds to the version of the update center module e.g. for the 1.0 version of the updatecenter, the top level directory is named jruby-1_0. Subsequent release of the updatecenter module would have different version number and corresponding different directory name.


Web application modes
Since this JRuby update center module contains GoldSpike (nee Rails Integration) we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. Additionally for this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
    asadmin stop-domain domain1    (Stop the application server if it is running)
    cp $GLASSFISH_ROOT/jruby-1_0/jruby-1.0.1/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
    asadmin start-domain domain1   (Start the application server instance)

Deploy and run an application (Shared mode)
Now lets look at the steps that are required to deploy an application to GlassFish in the "Shared" mode. Ensure that you have followed the steps listed under the section "Post Installation steps".
For the purpose of this blog lets use the "helloworld-1.2.3" sample present under $GLASSFISH_ROOT/goldspike/samples directory. Execute these steps to get the helloworld-1.2.3 sample deployed :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-shared 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome
which would result in the following html page being displayed



Deploy and run an application (Standalone mode)
If you are planning to use the "Standalone" mode of WAR creation, you do not have to do the Post Installation steps. After the update center module has been successfully installed you could directly start using it w/o any restart of the GlassFish application server instance. The steps to be followed are :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-standalone 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome

You would notice the only difference is the ant task that you specify - "create-shared" or "create-standalone".
The "create-shared" task -
  • creates a WEB-INF directory under the application directory
  • copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-shared.template under the WEB-INF as web.xml and ensures that the "jruby.home" points to the correct location of $GLASSFISH_ROOT/jruby-1_0

The "create-standalone" task -
  • creates a WEB-INF directory and copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-standalone.template into WEB-INF as web.xml
  • creates directories - WEB-INF/lib and WEB-INF/gems and copies the required libraries and gems into them
Author: "pramodg" Tags: "Sun, glassfish, jruby, updatecenter"
Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Sep 2007 15:44
JRuby Updatecenter module for Glassfish V2

With the official release of GlassFish V2, I wanted to inform you all about the availability of a new GlassFish update center module to support JRuby. This module is called "JRuby on GlassFish". This module will make it is easier to deploy a Ruby on Rails (ROR) application to a GlassFish application server. Thanks to Rajeshwar, who actually pushed the module on the net.


Contents of the JRuby module

This JRuby update center module primarily consists of JRuby 1.0.1 and Goldspike (nee Rails Integration) revision 735. The JRuby 1.0.1 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby-1_0" created under your GlassFish root directory. A screenshot of the JRuby module directory


The top level directory name (jruby-1_0) corresponds to the version of the update center module e.g. for the 1.0 version of the updatecenter, the top level directory is named jruby-1_0. Subsequent release of the updatecenter module would have different version number and corresponding different directory name.


Web application modes
Since this JRuby update center module contains GoldSpike (nee Rails Integration) we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. Additionally for this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
    asadmin stop-domain domain1    (Stop the application server if it is running)
    cp $GLASSFISH_ROOT/jruby-1_0/jruby-1.0.1/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
    asadmin start-domain domain1   (Start the application server instance)

Deploy and run an application (Shared mode)
Now lets look at the steps that are required to deploy an application to GlassFish in the "Shared" mode. Ensure that you have followed the steps listed under the section "Post Installation steps".
For the purpose of this blog lets use the "helloworld-1.2.3" sample present under $GLASSFISH_ROOT/goldspike/samples directory. Execute these steps to get the helloworld-1.2.3 sample deployed :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-shared 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome
which would result in the following html page being displayed



Deploy and run an application (Standalone mode)
If you are planning to use the "Standalone" mode of WAR creation, you do not have to do the Post Installation steps. After the update center module has been successfully installed you could directly start using it w/o any restart of the GlassFish application server instance. The steps to be followed are :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-standalone 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome

You would notice the only difference is the ant task that you specify - "create-shared" or "create-standalone".
The "create-shared" task -
  • creates a WEB-INF directory under the application directory
  • copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-shared.template under the WEB-INF as web.xml and ensures that the "jruby.home" points to the correct location of $GLASSFISH_ROOT/jruby-1_0

The "create-standalone" task -
  • creates a WEB-INF directory and copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-standalone.template into WEB-INF as web.xml
  • creates directories - WEB-INF/lib and WEB-INF/gems and copies the required libraries and gems into them
Author: "pramodg" Tags: "Sun, glassfish, jruby, updatecenter"
Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Sep 2007 10:44
JRuby Updatecenter module for Glassfish V2

With the official release of GlassFish V2, I wanted to inform you all about the availability of a new GlassFish update center module to support JRuby. This module is called "JRuby on GlassFish". This module will make it is easier to deploy a Ruby on Rails (ROR) application to a GlassFish application server. Thanks to Rajeshwar, who actually pushed the module on the net.


Contents of the JRuby module

This JRuby update center module primarily consists of JRuby 1.0.1 and Goldspike (nee Rails Integration) revision 735. The JRuby 1.0.1 source bits that are part of this module, have been updated with the following gems :



Installing the JRuby on GlassFish module

Let us refer to GlassFish root directory location as $GLASSFISH_ROOT for the course of this blog. After installing GlassFish V2 run the Update Center client

  $GLASSFISH_ROOT/updatecenter/bin/updatetool

Then you should see "JRuby on GlassFish" as one of the available modules.



Accept the license agreement to install this module. After the successful installation of this module, you would see a new directory "jruby-1_0" created under your GlassFish root directory. A screenshot of the JRuby module directory


The top level directory name (jruby-1_0) corresponds to the version of the update center module e.g. for the 1.0 version of the updatecenter, the top level directory is named jruby-1_0. Subsequent release of the updatecenter module would have different version number and corresponding different directory name.


Web application modes
Since this JRuby update center module contains GoldSpike (nee Rails Integration) we also support the 2 modes - "Standalone" and "Shared", of deploying a RubyOnRails (ROR) application to a GlassFish application server instance. Additionally for this blog we would be using the directory deployment feature of GlassFish.
  • "Standalone" mode implies that the resulting Web application archive (WAR) would be self contained, i.e. it would contain not only the application, but also the JRuby, Rails, Goldspike libraries.
  • "Shared" mode implies that the WAR would just contain the WEB-INF/web.xml file along with the application. The libraries required for the application to run successfully would be picked up from the classpath of the GlassFish application server instance.

Post Installation steps
If you plan to use the "Shared" mode you would have to perform one additional step. After the successful installation of the JRuby update center module copy the required libraries to the GlassFish library directory and restart the GlassFish application server instance (for these libraries to be picked up by the running instance). The commands to be used are :
    asadmin stop-domain domain1    (Stop the application server if it is running)
    cp $GLASSFISH_ROOT/jruby-1_0/jruby-1.0.1/lib/jruby-complete.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/goldspike-1.4-SNAPSHOT.jar $GLASSFISH_ROOT/lib
    cp $GLASSFISH_ROOT/jruby-1_0/goldspike/target/commons-pool-1.3.jar $GLASSFISH_ROOT/lib
    asadmin start-domain domain1   (Start the application server instance)

Deploy and run an application (Shared mode)
Now lets look at the steps that are required to deploy an application to GlassFish in the "Shared" mode. Ensure that you have followed the steps listed under the section "Post Installation steps".
For the purpose of this blog lets use the "helloworld-1.2.3" sample present under $GLASSFISH_ROOT/goldspike/samples directory. Execute these steps to get the helloworld-1.2.3 sample deployed :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-shared 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome
which would result in the following html page being displayed



Deploy and run an application (Standalone mode)
If you are planning to use the "Standalone" mode of WAR creation, you do not have to do the Post Installation steps. After the update center module has been successfully installed you could directly start using it w/o any restart of the GlassFish application server instance. The steps to be followed are :
    cd $GLASSFISH_ROOT/jruby-1_0/goldspike/samples/helloworld-1.2.3
    ant -f $GLASSFISH_ROOT/jruby-1_0/install.xml create-standalone 
    cd ..
    asadmin start-domain
    (If the application server is already running this command would safely exit)
    asadmin deploy helloworld-1.2.3

From a browser access the web page : http://localhost:8080/helloworld-1.2/welcome

You would notice the only difference is the ant task that you specify - "create-shared" or "create-standalone".
The "create-shared" task -
  • creates a WEB-INF directory under the application directory
  • copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-shared.template under the WEB-INF as web.xml and ensures that the "jruby.home" points to the correct location of $GLASSFISH_ROOT/jruby-1_0

The "create-standalone" task -
  • creates a WEB-INF directory and copies the $GLASSFISH_ROOT/jruby-1_0/web.xml-standalone.template into WEB-INF as web.xml
  • creates directories - WEB-INF/lib and WEB-INF/gems and copies the required libraries and gems into them
Author: "pramodg" Tags: "Sun, glassfish, jruby, updatecenter"
Send by mail Print  Save  Delicious 
Previous page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader