Wednesday May 14, 2008
WAR-based
packaging and dispatching of Rails application on Java Application
Servers is going through third iteration based what is used for
packaging and dispatching:
| ~/testbed/jruby-1.1.1
>bin/jruby -S gem
install rails warbler --no-ri --no-rdoc JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL Updating metadata for 289 gems from http://gems.rubyforge.org/ .............................................................................................................................. .............................................................................................................................. ..................................... complete Successfully installed activesupport-2.0.2 Successfully installed activerecord-2.0.2 Successfully installed actionpack-2.0.2 Successfully installed actionmailer-2.0.2 Successfully installed activeresource-2.0.2 Successfully installed rails-2.0.2 Successfully installed warbler-0.9.9 7 gems installed |
| ~/testbed/jruby-1.1.1/samples/rails
>../../bin/jruby
-S rails hello -d mysql create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments . . . create doc/README_FOR_APP create log/server.log create log/production.log create log/development.log create log/test.log |
| config.frameworks -= [ :active_record, :active_resource, :action_mailer ] |
| ~/testbed/jruby-1.1.1/samples/rails/hello
>../../../bin/jruby
-S warble JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL jar cf hello.war -C tmp/war . |
| ~/testbed/glassfish/v2ur2/glassfish
>bin/asadmin
start-domain --verbose Starting Domain domain1, please wait. May 13, 2008 11:23:44 AM com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand INFO: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java . . . [#|2008-05-13T11:34:13.252-0700|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;4848;|WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848|#] [#|2008-05-13T11:34:13.691-0700|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;|SMGT0007: Self Management Rules service is enabled|#] [#|2008-05-13T11:34:13.718-0700|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application server startup complete.|#] |
| ~/testbed/jruby-1.1.1/samples/rails/hello
>~/testbed/glassfish/v2ur2/glassfish/bin/asadmin
deploy hello.war Command deploy executed successfully. |
| [#|2008-05-13T11:34:23.330-0700|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=14;_ThreadName=httpWorkerThread-4848-0;/private/tmp/s1astempdomain1server1547440193/hello.war;|ADM1006:Uploading
the file to:[/private/tmp/s1astempdomain1server1547440193/hello.war]|#] [#|2008-05-13T11:34:26.019-0700|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=15;_ThreadName=Thread-30;|deployed with moduleid = hello|#] [#|2008-05-13T11:34:30.626-0700|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|PWC1412: WebModule[/hello] ServletContext.log():Info: using runtime pool timeout of 30 seconds|#] [#|2008-05-13T11:34:30.626-0700|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|PWC1412: WebModule[/hello] ServletContext.log():Warning: no initial runtimes specified.|#] [#|2008-05-13T11:34:30.627-0700|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|PWC1412: WebModule[/hello] ServletContext.log():Warning: no max runtimes specified.|#] |

| ~/testbed/jruby-1.1.1/samples/rails/hello
>../../../bin/jruby
script/generate controller home index JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL exists app/controllers/ exists app/helpers/ create app/views/home exists test/functional/ create app/controllers/home_controller.rb create test/functional/home_controller_test.rb create app/helpers/home_helper.rb create app/views/home/index.html.erb |
| def
index @greeting = "Hello from Rack!!" # access Servlet Context @server_info = $servlet_context.get_server_info # alternative way to get Servlet Context #@server_info2 = request.env['java.servlet_context'].get_server_info # access Servlet Request @method = request.env['java.servlet_request'].get_method @request_uri = request.env['java.servlet_request'].get_request_uri @protocol = request.env['java.servlet_request'].get_protocol @port = request.env['java.servlet_request'].get_server_port end |
| <%=
@greeting %><br><br> Hosted on "<%= @server_info %>" on port "<%= @port %>"<br> <%= @method %> <%= @request_uri %> <%= @protocol %> |

|
<filter> <filter-name>RackFilter</filter-name> <filter-class>org.jruby.rack.RackFilter</filter-class> </filter> <filter-mapping> <filter-name>RackFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class> </listener> |
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Tuesday May 13, 2008
![]() |
GlassFish Globalization team in Japan has started translating some of my blogs (on reader's request basis) in Japanese. The first installment is now live on GlassFish Wiki. |
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
Monday May 12, 2008
JavaOne 2008 is finally over ... 9th consecutive one for me and
extremely busy as always!
Saturday May 10, 2008
Take 13 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
and the last lot of pictures from JavaOne
2008.
Music before Day 4 opening ...
Posted by Arun Gupta in photography | Comments[0]
|
|
|
|
Friday May 09, 2008
Take 12 - Smash Mouth @ JavaOne 2008
Enjoy some videos of Smash
Mouth @ JavaOne "After Dark" party.

All JavaOne 2008 pictures are available here.
Technorati: conf
javaone
javaone2008
smashmouth
sanfrancisco
Posted by Arun Gupta in photography | Comments[0]
|
|
|
|
Take 11 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6,
7,
8,
9,
10
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[2]
|
|
|
|
Thursday May 08, 2008
Take 10 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6,
7,
8,
9
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[2]
|
|
|
|
Take 9 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6,
7,
8
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[4]
|
|
|
|
Wednesday May 07, 2008
Take 8 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6,
7
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[4]
|
|
|
|
Take 7 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4,
5,
6
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[6]
|
|
|
|
Tuesday May 06, 2008
Take 6 - Pictures from JavaOne 2008
Enjoy the entertaining dance from JavaOne 2008 Day 1 kick off ...
Continuing from Take 1,
2,
3,
4,
5
and
more pictures from JavaOne
2008.
Posted by Arun Gupta in photography | Comments[6]
|
|
|
|
Take 5 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3,
4
and
more pictures from JavaOne
2008.
GlassFish Tooling session ...
Posted by Arun Gupta in photography | Comments[7]
|
|
|
|
Monday May 05, 2008
Take 4 - Pictures from JavaOne 2008
Continuing from Take 1,
2,
3
and
more pictures from JavaOne
2008.
GlassFish
Day Opening Session and GlassFish booth @ Community
One ...
Posted by Arun Gupta in photography | Comments[8]
|
|
|
|
Take 3 - Pictures from JavaOne 2008
Continuing from Take 1
and 2
and
more pictures from JavaOne
2008.
GlassFish Party @ Thirsty
Bear ...
Posted by Arun Gupta in photography | Comments[9]
|
|
|
|
Sunday May 04, 2008
Take 2 - Pictures from JavaOne 2008
Continuing from Take
1, more pictures from JavaOne 2008.
Agenda planning in GlassFish
Unconference ...
Posted by Arun Gupta in photography | Comments[10]
|
|
|
|