Arun Gupta's Blog
Arun Gupta is a Technology Evangelist for Web Services and Web 2.0 Apps at Sun. He was the spec lead for APIs in the Java platform, committer in multiple Open Source projects, participated in standard bodies and contributed to Java EE and SE releases.
WAR-based Packaging and Deployment of Rails on GlassFish - Goldspike, RailServlet, Warbler, Rack, ...
Posted by arungupta on May 15, 2008 at 06:32 AM | Permalink
| Comments (0)
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:
Goldspike + RailsServlet: The first iteration was
WAR-packaging of Rails app as defined by Goldspike
plugin (nee Rails-integration) and using RailsServlet (part
of Goldspike) for dispatching.
Warbler + RailsServlet: The second iteration (slightly
short lived) overcame the shortcomings
of Goldspike (packaging with sane defaults, fast,
light-weight, and flexible configuration) by using Warbler
for packaging. It decoupled packaging and dispatching by doing only
packaging and allowing for pluggable dispatching mechanism.
RailsServlet continues to be the default Servlet binding mechanism.
This is the version currently supported by GlassFish
v2 Update Center .
Warbler + Rack:
Nick released JRuby-Rack
(JRuby version of Rack ,
also see Introducing
Rack and Docs )
last week. And so the third iteration is using Warbler packaging and
Rack-based dispatching. JRuby-Rack provides a more seamless connection
between the Servlet environment and Rack.
The JRuby-Rack
wiki says "JRuby-Rack
is a lightweight adapter for the Java servlet environment that allows
any Rack-based application to run unmodified in a Java servlet
container. JRuby-Rack supports Rails, Merb, as well as any
Rack-compatible Ruby web framework. ".
This means that,
other than Rails, conceptually Merb applications (which also use Rack
for deployment) can now also be deployed on GlassFish . This blog
entry explains how to deploy a simple Rack-based Rails application.
Install Rails and JRuby-Rack (as part of Warbler )
as:
~/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
Create a template Rails app as:
~/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
Disable database access from the application by
uncommenting line 21 (remove "#" at the beginning) from
"config/environment.rb" as:
config.frameworks -= [ :active_record, :active_resource, :action_mailer
]
Create a WAR file as:
~/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 .
A new file "hello.war" is generated in the current directory.
The generated WAR file can be easily deployed on GlassFish.
Download and Install GlassFish v2 UR2 from here .
Start GlassFish Application Server as:
~/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.|#]
Deploy the WAR on GlassFish as:
~/testbed/jruby-1.1.1/samples/rails/hello
>~/testbed/glassfish/v2ur2/glassfish/bin/asadmin
deploy hello.war
Command deploy executed successfully.
The output in the GlassFish console looks like:
[#|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.|#]
The default Rails page is now visible at
"http://localhost:8080/hello" as shown below:
Add some functionality to the application to show Servlet
and Rack integration
Add a Controller and View as
~/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
Change the "index" helper method in
"app/controllers/home_controller.rb" as:
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
Add the following fragment as the last line in
"app/views/home/index.html.erb":
<%=
@greeting %><br><br>
Hosted on "<%= @server_info %>" on port "<%= @port
%>"<br>
<%= @method %> <%= @request_uri %>
<%= @protocol %>
Re-create and deploy the WAR file
Re-create the WAR file as explained in step 4.
Re-deploy the WAR file as explained in step 5.3.
Now "http://localhost:8080/hello/home/index" shows the
output as:
The magic fragment in "tmp/war/WEB-INF/web.xml" is:
<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>
And also "WEB-INF/lib/jruby-rack-0.9.jar" is bundled in the WAR.
Let us know if you try Rack-based deployment of Merb applications on
GlassFish.
Technorati: rubyonrails
jruby ruby rack merb glassfish
"Miles to go ..." in Japanese
Posted by arungupta on May 13, 2008 at 07:21 PM | Permalink
| Comments (0)
It's interesting to see that the first two translated entries are on Ruby-on-Rails . As of
this morning, there are 71
blog entries on Ruby-on-Rails . Send them an
email if you are interested in translation of other
entries. Alternatively, you can edit the wiki and create a new entry in
"Wishlist" section.
Let me know if you have suggestions on the type of GlassFish content
that you'd like to see on this blog.
Feel free to create translation in a different language and drop a
comment here.
Technorati: japanese
blog translation
rubyonrails
JavaOne 2008 Wrapup
Posted by arungupta on May 13, 2008 at 06:10 AM | Permalink
| Comments (0)
JavaOne 2008 is finally over ... 9th consecutive one for me and
extremely busy as always!
And now let me talk about my formal speaking engagements (including the
slides):
JavaU Bonus
Evening Course on GlassFish Application Server - Shreedhar
and I delivered a Bonus
Evening Course on GlassFish in JavaU. We talked about
GlassFish in depth - general overview, concepts, Metro Web services ,
dynamic
languages support , high availability/clustering and lots of
other details. The slides for the course are available here .
Read more details in Shreedhar's
Writeup .
GlassFish
Unconference - Vivek
and I led the "Scripting in GlassFish" session @ GlassFish
Unconference
and then I led the "Web services" session. It was very free-form forum,
basically answering questions/clarifications from the participants and
seeking feedback on our direction.
It was great to know that people love Metro support in NetBeans and are some
are using the IDE for that reason only.
Scripting in
GlassFish (BOF 5111) - Vivek
and I presented on "Scripting in GlassFish"and explained the support
for different dynamic languages such as Ruby/Rails, Groovy/Grails,
Python/Django on GlassFish. This preso showed bunch of demos including
GlassFish v3 gem installation and deployment (screencast coming soon),
GlassFish v3 Update Center, Rails Development/Deployment options,
Groovy/Grails and Python/Django deployment. The slides are available here .
You can find the latest information about support for different dynamic
languages on glassfish-scripting.dev.java.net .
Lab 4530:
Building Rich Web Applications with jMaki - Doris
and I delivered Lab
4530: Building Rich Web Applications with jMaki . If you could
not attend JavaOne, then you can follow the instructions
at your own pace and download
the entire lab .
The complete material for all JavaOne 2008 Hands-on-Labs is
available here .
The material is pretty comprehensive and of high quality. I highly
recommend refering to this material for sharpening your skills.
Tic Tac Tac @
General Session Keynote - I
presented "Tic Tac Toe Demo" at General Session Keynote on Tuesday
afternoon. This demo was a multi-player game developed in multiple
scripting languages (Ruby, Groovy and Python) and their associated Web
frameworks (Rails, Grails and Django) and all deployed on GlassFish v3
TP2. The main idea was to showcase multi-lingual support on GlassFish
v3 and still able to use GlassFish features such as GlassFish Comet
to push the events to browser. The entire source code for the demo will
be released shortly and I'll announce the availability.
You can watch the entire video here
(starting at approx 1:10 into it). Hope you enjoy the War Games -esque
look-and-feel. It was a keynote demo Hat-trick
for me (jMaki/Phobos
@ 2007 , .NET
Interoperability @ 2006 . I'm happy to be labeled as
"GlassFish Guy" :)
And
then of course I met lots of others at the booth, in
hallway/sessions/parties and elsewhere. I've taken few action items for
generating new blogs/screencasts and they'll appear shortly on this
blog.
I took lots of pictures through out the event and posted them
regularly. They are all available here .
A consolidated album is inlined:
Hope you had a great JavaOne and we were able to share our current
roadmap and future plans with you successfully.
Technorati: conf
javaone
javaone2008
glassfish
netbeans
Take 13 - Pictures from JavaOne 2008
Posted by arungupta on May 12, 2008 at 08:29 PM | Permalink
| Comments (0)
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 ...
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 12 - Smash Mouth @ JavaOne 2008
Posted by arungupta on May 12, 2008 at 08:28 PM | Permalink
| Comments (0)
Enjoy some videos of Smash
Mouth @ JavaOne "After Dark" party.
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
smashmouth
sanfrancisco
Take 11 - Pictures from JavaOne 2008
Posted by arungupta on May 09, 2008 at 09:14 AM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4 ,
5 ,
6 ,
7 ,
8 ,
9 ,
10
and
more pictures from JavaOne
2008 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 10 - Pictures from JavaOne 2008
Posted by arungupta on May 08, 2008 at 11:12 PM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4 ,
5 ,
6 ,
7 ,
8 ,
9
and
more pictures from JavaOne
2008 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 9 - Pictures from JavaOne 2008
Posted by arungupta on May 08, 2008 at 11:11 PM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4 ,
5 ,
6 ,
7 ,
8
and
more pictures from JavaOne
2008 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 8 - Pictures from JavaOne 2008
Posted by arungupta on May 07, 2008 at 07:19 AM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4 ,
5 ,
6 ,
7
and
more pictures from JavaOne
2008 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 7 - Pictures from JavaOne 2008
Posted by arungupta on May 07, 2008 at 12:02 AM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4 ,
5 ,
6
and
more pictures from JavaOne
2008 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 6 - Pictures from JavaOne 2008
Posted by arungupta on May 06, 2008 at 02:14 PM | Permalink
| Comments (0)
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 .
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 5 - Pictures from JavaOne 2008
Posted by arungupta on May 05, 2008 at 10:49 PM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3 ,
4
and
more pictures from JavaOne
2008 .
GlassFish Tooling session ...
... Stairs to Hall B/C ...
... Hands-on-Lab preparing session ...
... GlassFish JavaU Evening Course (delivered by Shreedhar
& myself) ...
And G2One party
@ W
...
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 4 - Pictures from JavaOne 2008
Posted by arungupta on May 05, 2008 at 01:58 PM | Permalink
| Comments (0)
Continuing from Take 1 ,
2 ,
3
and
more pictures from JavaOne
2008 .
GlassFish
Day Opening Session and GlassFish booth @ Community
One ...
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 3 - Pictures from JavaOne 2008
Posted by arungupta on May 05, 2008 at 01:47 PM | Permalink
| Comments (0)
Continuing from Take 1
and 2
and
more pictures from JavaOne
2008 .
GlassFish Party @ Thirsty
Bear ...
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 2 - Pictures from JavaOne 2008
Posted by arungupta on May 04, 2008 at 10:55 PM | Permalink
| Comments (0)
Continuing from Take
1 , more pictures from JavaOne 2008 .
Agenda planning in GlassFish
Unconference ...
Round 1 on GlassFish v3/OSGi and Clustering/High Availability ...
Round 2 on Community, Java EE and continues on v3/OSGi ...
And there were Round 3 & 4 where I participated actively so no
pictures :)
All JavaOne 2008 pictures are available here .
Technorati: conf
javaone
javaone2008
photography
Take 1 - Pictures from JavaOne 2008
Posted by arungupta on May 04, 2008 at 10:17 PM | Permalink
| Comments (0)
Now that JavaOne
2008 is almost here, I'll try to post regular pictures from
and around the show. This is the first lot ...
General session keynote speakers rehearsing ...
and the "boss" relaxing ...
Getting ready for rehearsals ...
Members of the production team who runs the show ...
Camera crew ...
And the registration desk ...
Technorati: conf
javaone
photography
GlassFish v3 Gem 0.2.0 now available
Posted by arungupta on May 04, 2008 at 02:28 PM | Permalink
| Comments (0)
A newer version of GlassFish
v3 Gem for Ruby
on Rails is now available.
What's new ?
Codebase aligned with GlassFish
v3 Technology Preview 2
Previous version (0.1.2) had some packaging issues which
increased the size but now it's back to sweet 2.8 Mb.
Check if previously installed by using the following command:
~/testbed/jruby-1.1.1
>bin/jruby -S gem
list glassfish
*** LOCAL GEMS ***
glassfish (0.1.2)
If already installed (as indicated by the list of gems) then uinstall
it using the following command:
~/testbed/jruby-1.1.1
>bin/jruby -S gem
uninstall
glassfish
Successfully uninstalled glassfish-0.1.2-universal-java
Remove executables:
glassfish_rails, asadmin, asadmin.bat
in addition to the gem? [Yn] y
Removing glassfish_rails
Removing asadmin
Removing asadmin.bat
And then install it again as:
~/testbed/jruby-1.1.1
>bin/jruby -S gem
install glassfish
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Successfully installed glassfish-0.2.0-universal-java
1 gem installed
Updating the gem is giving unpredictable results (mostly not updating)
and will be investigated later.
Rails
powered by the GlassFish Application Server explains why
GlassFish is a better deployment option for Rails applications.
All the latest information about the gem can be found at GlassFish
JRuby wiki or JRuby
wiki .
Please use the gem and send us feedback on GlassFish
forums , dev@glassfish
or gem
mailing list .
Technorati: rubyonrails
jruby ruby glassfish
v3 gem
Screencast #24: Getting Started with GlassFish v3 TP2
Posted by arungupta on May 04, 2008 at 08:11 AM | Permalink
| Comments (0)
GlassFish v3 Technology Preview 2 (aka TP2) is now
released ... yaaay! Dowload
it here .
GlassFish v3 has a modular
(based on OSGi framework), light-weight
(small kernel and fast startup time) and extensible (support
for dynamic languages like JRuby and Groovy) architecture. Along with
it, a new NetBeans
plug-in (that replaces the existing one) is also released. The plug-in
is available from the NetBeans Beta Update Center. It allows GlassFish
v3 TP2 download and install in a matter of few seconds, yep that's less
than a minute :)
A new GlassFish release with a new NetBeans plug-in deserve a new screencast
:) It shows how to install the plug-in, download and install GlassFish
v3 TP2, develop and deploy a simple web application with JSP and
Servlets on the newly installed GlassFish.
Enjoy
it here!
An offline version (downloadable zip file) of this screencast is
available here .
A complete list of GlassFish related screencasts is available on GlassFish
wiki .
Let us know your feedback on users@glassfish.dev.java.net
or GlassFish
Forum .
Technorati: screencast
glassfish
v3 netbeans
JRuby 1.1.1, Rails 2.0.2, Warbler now in GlassFish v2 Update Center
Posted by arungupta on May 03, 2008 at 07:17 AM | Permalink
| Comments (0)
Vivek updated
JRuby module in GlassFish v2 UR2
Update Center .
It now contains JRuby 1.1.1 + Rails 2.0.2 and Warbler (instead of
Goldspike) for packaging the app.
Read all details on how to download, install and getting started here .
The image below shows a snapshot of Update Center with the latest
module selected:
After following all
the steps (had to manually set executable perms on
jruby-1.1.1/bin/jruby), your application is now hosted at
"http://localhost:8080/HelloWorldRailsApp/say/hello" and shows the
following output:
The generated "HelloWorldRailsApp.war" is approx 8.5 Mb and could
quickly grow depending upon the gems installed and other factors. As an
alternative, you can consider shared deployment as explained in each
sample's GLASSFISH_README.txt.
Send us feedback at Forums
or webtier@glassfish .
Technorati: rubyonrails
jruby ruby glassfish
updatecenter
GlassFish Goodies @ JavaOne 2008
Posted by arungupta on May 03, 2008 at 06:42 AM | Permalink
| Comments (0)
Other than the impressive list of GlassFish
events/sessions @ JavaOne
2008 , we will also be giving out the following goodies ...
Tee-shirts, Phone gel pad, Memory stick, Hats and who knows there might
be last minute schwags ;-)
So stop by at any GlassFish booth
and take your pick!
Technorati: conf
javaone
sanfrancisco
glassfish
Get the Latest Updates on JavaOne 2008
Posted by arungupta on May 02, 2008 at 09:27 AM | Permalink
| Comments (0)
Here are several ways to stay on top of what's happening in JavaOne 2008 :
All the latest news in JavaOne
Conference Guide .
Register
today ! And let me know if you want to give my referral
:)
Technorati: conf
javaone
sanfrancisco
My JavaOne 2008 Schedule
Posted by arungupta on May 01, 2008 at 06:43 AM | Permalink
| Comments (0)
Here are my personal engagements during JavaOne. They are also the best
venues to catch me because I'm either speaking or mentoring:
Monday (May 4th)
Tuesday (May 5th)
1:30-3:00pm, Sun General Session
3:20 - 5:20pm: LAB
8400 - Designing JRuby on Rails Applications with NetBeans IDE
8:30-9:20pm, BOF
5111 - Scripting in GlassFish Project
Wednesday (May 6th)
2:50-4:50pm, LAB
4530 Building Rich Web Applications using jMaki
Thursday (May 7th)
Roberto highlighted
the list of Java EE 6 sessions. And then my "wish list" of
sessions/events to attend:
Time
Session
May 4, Sunday
3:00 PM - 6:00 PM
GlassFish
Unconference
7:00 PM - 9:00 PM
GlassFish Party @ Thirsty Bear
May 5, Monday
11:00 AM - 11:55 AM
S297768: GlassFish™ Application Server V2 and V3:
Status and Roadmap
12:25 PM - 13:20 PM
S297256: Developing JavaFX™Applications for the
Enterprise
1:30 PM - 2:25 PM
S297342: Ruby Panel
2:35 PM - 3:30 PM
S297403: Buiding Ajax Applications
4:00 PM - 4:55 PM
S296823: Asynchronous Ajax for Revolutionary Web
Applications
5:05 PM - 6:00 PM
S297551: NetBeans IDE Lightning Talks: Cool Stuff and
More
Tuesday, May 06
10:50 AM - 11:50 AM
TS-5416: JRuby: Why, What, How...Do It Now
12:10 PM - 1:10 PM
TS-6623: More "Effective Java"
3:20 PM - 4:20 PM
TS-4986: JavaScript™ Programming Language: The Language
Everybody Loves to Hate
4:40 PM - 5:40 PM
TS-5921: GlassFish™ Project v3 as an Extensible Server
Platform
6:00 PM - 7:00 PM
TS-5764: Grails in Depth
7:30 PM - 8:20 PM
BOF-7900: GlassFish Application Server: Open Source,
Fast, Easy and Reliable
8:30 PM - 9:20 PM
BOF-5111: Scripting in GlassFish™ Project
9:30 PM - 10:20 PM
BOF-7110: SoyLatte and OpenJDK™: Open-Source Java™
Technology for Mac OS X
Wednesday, May 7 th
8:30 AM - 9:15 AM
Oracle General Session Enterprise Application Platform
9:30 AM - 10:30 AM
PAN-5435: The Script Bowl: A Rapid-Fire Comparison of
Scripting
Languages
1:30 PM - 2:30 PM
TS-4806: JRuby on Rails: Web Development Evolved
2:50 PM - 3:50 PM
TS-7064: Future Challengers for Open Source and Java
Technology
4:10 PM - 5:10 PM
TS-6807: What’s New in Ajax
5:30 PM - 6:15 PM
AMD General Session The Role of the Microprocessor in
the Evolution of Java Technology
6:30 PM - 7:20 PM
BOF-5501: Java™ Champions BOF : The Latest Buzz,
Highlights, and Panel Discussion
7:30 PM - 8:20 PM
BOF-4807: JRuby at ThoughtWorks
8:30 PM - 9:20 PM
BOF-6584: Using Comet to Create a Two-Player Web Game
Thursday, May 8th
8:30 AM - 9:15 AM
Intel General Session Innovations through Software
9:30 AM - 10:30 AM
TS-6339: Top 10 Patterns for Scaling Out Java™
Technology-Based Applications
10:50 AM - 11:50 AM
TS-6490: JRuby on Rails Deployment: What They Didn’t
Tell You
2:50 PM - 3:50 PM
TS-7477: 101 Ways to Interoperate with Java™ Technology
and .NET
4:10 PM - 5:10 PM
TS-4868: From Java™ Technology to Ruby...and Back
5:30 PM - 6:15 PM
Motorola General Session Dial in,
Drive Deep: Using Motorola's Platforms to Reach Consumer and Enterprise
Markets
6:30 PM - 7:20 PM
BOF-4888: Taming the Leopard: Extending OSX the Java
Technology Way
7:30 PM - 8:20 PM
BOF-5578: Who Needs Standards in an Open Source World ?
8:30 PM - 9:20 PM
BOF-5403: PHP Development Environment: Extending Java
IDEs
Friday, May 9th
8:30 AM - 10:30 AM
Sun General Session Extreme Innovation
10:50 AM - 11:50 AM
TS-6157: Building SOA Applications with JAX-WS, JAX-RS,
JAXB, and Ajax
12:10 PM - 1:10 PM
TS-5234: LinkedIn Communication Architecture
1:30 PM - 2:30 PM
TS-6050: Comparing JRuby and Groovy
2:50 PM - 3:50 PM
TS-5425: JAX-WS: The Java API for RESTful Web Services
And you can always find me hanging around the following booths:
And then some events ...
Did you register for GlassFish Day - it's FREE. Register
now and get a free Pavilion pass + General Session on Tuesday
(May 6th ).
Technorati: conf
javaone
sanfrancisco
glassfishday
Java SE 6 U5 on Mac OS X Leopard
Posted by arungupta on April 30, 2008 at 12:01 PM | Permalink
| Comments (1)
Yesterday, Apple released
Java SE version 1.6.0_05 for 64-bit Intel-based Mac OS X 10.5.2 or
later. Download
it here !
It's restricted to 64-bit machines and Charles
is unhappy about it. Hopefully, they'll release a 32-bit
version as well.
Type "sw_vers" in a terminal to check the Mac OS X version as shown
below:
~
>sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.2
BuildVersion: 9C31
Alternatively, "About This Mac" in the Apple menu shows you the version
as well as shown below:
Anyway, after verifying the system requirements, download 57MB
bundle and install it following the standard instructions.
And now successfully installed:
It gets installed in
"/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0" and shows
the version number as:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin
>./java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)
The default Java version can be changed by using "Java Preferences" as
shown below:
/Applications/Utilities/Java/Java
Preferences.app/Contents/MacOS >./"Java Preferences"
The following window shows up:
Pick the version of your choice and that should get you going!
These are the days before JavaOne
and all my demos on this machine have been
tested using the default J2SE 5. But I'll play with the new release
after JavaOne anyway :)
Do you know sign
up for GlassFish
Day is FREE and gives you access to JavaOne
pavilion as well ? Do it now!
A complete archive of all Mac OS X tips on this blog are available here .
Technorati: oxstips
mac leopard javase6 javase jdk
GlassFish events @ JavaOne 2008
Posted by arungupta on April 28, 2008 at 06:56 AM | Permalink
| Comments (0)
Start counting in days now before the JavaOne frenzy
begins! In the mean while, here is a quick summary of GlassFish related
events:
Sunday (5/4)
GlassFish
Unconference (free registration)
Monday (5/5)
GlassFish
Day (free registration - also gives you free access to JavaOne
Pavilion and General
Sessions on Tuesday), Party @ Thirsy Bear in
the evening (just show up)
Tuesday - Thursday
(5/6 - 5/8)
Talk to us @ Booth
Tuesday (5/6), 7:30pm
GlassFish Application Server: Open
Source, Fast, Easy
and Reliable (BOF-7900)
Tuesday - Friday
(5/6 - 5/9)
Attend sessions - A simple
query shows 26 records and I'm sure there are some missing :)
Sunday - Friday
(5/4 - 5/9)
Mingle with GlassFish community all
days
Latest updates always available at GlassFish
wiki .
If you are a student, then you can attend the entire JavaOne completely
free . So if
you are a student and local to bay area, there is nothing to loose -
only gain. Register
now !
Also check out the following JavaOne
and Community
One and GlassFish
Facebook groups.
Technorati: javaone conf
glassfish
glassfishday
unconference
community
thirstybear
javaone2008
TOTD #32: Rails Deployment on GlassFish v3 from NetBeans IDE
Posted by arungupta on April 28, 2008 at 06:42 AM | Permalink
| Comments (0)
Rails
powered by the GlassFish Application Server explains all the
benefits of using GlassFish for developing and deploying your Rails
applications. If you are using NetBeans
6.1 builds then you can deploy your Rails application
directly on GlassFish
v3 from within NetBeans
IDE . No longer you need
to have different development and deployment options.
This blog explains how to install a bleeding-edge GlassFish v3 plugin
and use it to deploy your Rails app natively on GlassFish (no WAR or
anything :). Let's get started! Note, this plugin is bleeding edge and
will soon be released on the Beta Update Center.
Install "GlassFish v3 TP2" plugin in NetBeans 6.1
In NetBeans 6.1 IDE, go to "Tools", "Plugins" and click
on
"Settings". The following window is shown:
Click on "Add" and specify the URL of Bleeding
Edge Update Center values as shown (copy from
"http://deadlock.netbeans.org/hudson/job/javadoc-nbms/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz"):
Click on "OK". The updated "Plugins" window looks like:
Notice "Available Plugins" has changed from 58 to 140 as many
more bleeding edge plugins are now available.
Click on "Available Plugins" and search for "GlassFish"
in the top-right corner text box as shown below:
Select "GlassFish V3 JRuby Integration" and "GlassFish V3
JavaEE Integration" plugin and click on "Install" as shown below:
Follow the instructions to install the plugin. The IDE needs to restart
for successful plugin installation.
In
the restarted IDE, go to "Services" tab, right-click on
"Servers"
and select "Add Server...". Select "GlassFish v3 TP2" as shown below:
Select "Next >", accept the license agreement and
click on "Download V3 Now..."
Click on "Download V3 Now...". This downloads the latest GlassFish v3
TP2 build and installs in "/Users/arungupta/GlassFish_V3_TP2"
directory. This is only an interim build, final TP2 build will be
available soon !
The following screen is shown once GlassFish v3 is installed:
Click on "Finish". In 58 seconds, you downloaded and installed the
entire GlassFish v3 app server, cool isn't it!
Create a Rails app and deploy on GlassFish V3
In NetBeans IDE, in the "Projects" tab, right-click and
select "New Project...". Select "Ruby" in "Categories" and "Ruby on
Rails Applications" in "Projects" as shown:
Click on "Next".
Now comes the cool part. Enter the application name and
select the recently installed GlassFish v3 as shown:
This is a brand new feature in the "GlassFish v3 TP2" plugin available
only on "Bleeding Edge" Update Center. It'll soon replace the default
GlassFish v3 plugin from the Beta Update Center.
Click on "Finish" to take all other defaults.
On the newly created project, right-click and select
"Run" as shown:
The default browser page "http://localhost:8080/" shows
up. Change the URL to "http://localhost:8080/HelloRails" and the
following page shows up:
Now, NetBeans IDE and GlassFish v3 serves your need for a complete
development and deployment platform for Ruby-on-Rails applications.
If any part of the tooling is not working or you have suggestions and
improvement then please file bugs on IssueZilla
("serverplugins" component) and use "glassfish_v3" subcomponent. If any
part of the runtime is not working, then please file bugs on Issue
Tracker ("V3" component) and use "jruby" subcomponent.
Please leave suggestions on other TOTD (Tip Of The Day) that
you'd like to see.
A complete archive is available here .
Technorati: totd
glassfish
v3 netbeans rubyonrails
Welcome JWBlogs to Blogosphere!
Posted by arungupta on April 25, 2008 at 11:30 AM | Permalink
| Comments (0)
Over the past 10 years JavaWorld.com
is a great source for Java developers focusing on four areas - Java
SE , Java
EE , Java
ME and Developer
Tools . The 10 most recently published articles and tutorials
can be easily
subscribed .
As of yesterday they started a new blog platform - JWBlogs ! The
formal announcement in their newsletter
said:
The goal of the
JavaWorld blogs is to provide a daily mix of valuable reading from
around the Java world. Some of the blogs we're starting out with are
syndicated, while others are exclusive to JavaWorld.
I am delighted to be "picked" for the first iteration. This means
you'll hear a lot about GlassFish ,
NetBeans , JRuby , Metro , Groovy , jMaki and many
other technologies in GlassFish
ecosystem - now at JavaWorld as well. Of course, you can
continue to read all the latest & greatest about GlassFish @ TheAquarium ,
Adoption Stories ,
GlassFish
for Business and about NetBeans @ Planet NetBeans .
Subscribe to their aggregated
feed and send feedback to jwblogs@javaworld.com .
Technorati: javaworld
blogosphere
jwblogs
glassfish
netbeans
community
TOTD #31: CRUD Application using Grails - Hosted on GlassFish and MySQL
Posted by arungupta on April 23, 2008 at 07:00 AM | Permalink
| Comments (2)
TOTD
#30 explained how to create CRUD application using Grails and hosted using
in-built Jetty servlet
engine and in-memory HSQLDB
database. Jetty and HSQLDB are built into Grails and allows to start easily.
You can also use GlassFish and
MySQL for deploying your applications in
production environment.
This blog entry walks you through the steps of deploying a Grails
application on GlassFish and MySQL.
If MySQL
is already installed, then download GlassFish
v2 UR1 . Otherwise you can also Download GlassFish v2 UR1
and MySQL co-bundle
from usual Download
Page (instructions ).
Configure MySQL database
Download MySQL Connector/J 5.1.6 from here .
Extract the bundle and copy
"mysql-connector-java-5.1.6-bin.jar" to the "lib" directory of Grails
application.
Start MySQL database as:
~/testbed/grails-1.0.2/samples/crud
>sudo
/usr/local/mysql/bin/mysqld_safe --user root --console
Starting mysqld daemon with databases from /usr/local/mysql/data
Create database by giving the following command:
~/testbed/grails-1.0.2/samples/crud
>/usr/local/mysql/bin/mysqladmin
create crudProd --user root
Configure the Application
Edit
"grails-app/conf/DataSource.groovy" to specify MySQL
configuration. The updated file looks like (changes highlighted in bold ):
dataSource
{
pooled = false
driverClassName = "com.mysql.jdbc.Driver "
username = "root "
password = ""
dialect =
"org.hibernate.dialect.MySQL5InnoDBDialect"
}
hibernate {
cache.use_second_level_cache=true
cache.use_query_cache=true
cache.provider_class='org.hibernate.cache.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
url = "jdbc:hsqldb:mem:devDB"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:hsqldb:mem:testDb"
}
&