Monday May 25, 2009
JVB #06: Jiandong Guo on GlassFish at JavaOne 2009

Learn what Jiandong
Guo will be doing at JavaOne 2009.
His session details are available here.
All previous entries are tagged javaone+vidblog.
Technorati: conf
javaone
vidblog
sanfrancisco
glassfish
portfolio
Posted by Arun Gupta in Finance | Comments[0]
|
|
|
|
|
Friday April 03, 2009
TOTD # 77: Running Seam examples with GlassFish
![]() |
Seam is a full-stack solution to assemble complex web applications using simple annotated classes, a rich set of UI components, and very little XML. It integrates Ajax and Business Process Modeling with several Java EE technologies such as Java Server Faces (JSF), Java Persistence API (JPA), and Enterprise Java Beans (EJB 3.0). |
| ~/tools/jboss-seam-2.1.1.GA/examples/jpa >ant glassfish Buildfile: build.xml glassfish: initcopy: initpoms: [echo] Setting up dependencies [mkdir] Created dir: /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms [copy] Copying 1 file to /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms [artifact:install] [INFO] Installing /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms/root.pom to . . . . . . init.war: war: [copy] Copying 27 files to /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/exploded-archives-glassfish/jboss-seam-jpa.war [copy] Copying 7 files to /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/exploded-archives-glassfish/jboss-seam-jpa.war/WEB-INF/lib noejb.war: [copy] Copying 18 files to /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/exploded-archives-glassfish/jboss-seam-jpa.war/WEB-INF/lib [copy] Copying 2 files to /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/exploded-archives-glassfish/jboss-seam-jpa.war [copy] Copying 4 files to /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/exploded-archives-glassfish/jboss-seam-jpa.war distributable.war: noejb.archive: [jar] Building jar: /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jpa/dist-glassfish/jboss-seam-jpa.war BUILD SUCCESSFUL Total time: 5 seconds |
| ~/tools/jboss-seam-2.1.1.GA/examples/jpa >~/tools/glassfish/v2.1/glassfish/bin/asadmin
deploy dist-glassfish/jboss-seam-jpa.war Command deploy executed successfully. |



| ~/tools/jboss-seam-2.1.1.GA/examples/hibernate
>ant glassfish Buildfile: build.xml glassfish: initcopy: initpoms: [echo] Setting up dependencies [copy] Copying 1 file to /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms [artifact:install] [INFO] Installing /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms/root.pom to /Users/arungupta/.m2/repository/org/jboss/seam/root/2.1.1.GA/root-2.1.1.GA.pom . . . distributable.war: noejb.archive: [jar] Building jar: /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/hibernate/dist-glassfish/jboss-seam-hibernate.war BUILD SUCCESSFUL Total time: 6 seconds |
| ~/tools/jboss-seam-2.1.1.GA/examples/hibernate
>~/tools/glassfish/v2.1/glassfish/bin/asadmin
deploy dist-glassfish/jboss-seam-hibernate.war Command deploy executed successfully. |
| ~/tools/jboss-seam-2.1.1.GA/examples/jee5/booking
>ant Buildfile: build.xml initcopy: initpoms: [echo] Setting up dependencies [copy] Copying 1 file to /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms [artifact:install] [INFO] Installing /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms/root.pom to /Users/arungupta/.m2/repository/org/jboss/seam/root/2.1.1.GA/root-2.1.1.GA.pom [copy] Copying 1 file to /Users/arungupta/tools/jboss-seam-2.1.1.GA/classes/poms . . . archive: [jar] Building jar: /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jee5/booking/dist/jboss-seam-jee5-booking.jar [jar] Building jar: /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jee5/booking/dist/jboss-seam-jee5-booking.war [jar] Building jar: /Users/arungupta/tools/jboss-seam-2.1.1.GA/examples/jee5/booking/dist/jboss-seam-jee5-booking.ear BUILD SUCCESSFUL Total time: 5 seconds ~/tools/jboss-seam-2.1.1.GA/examples/jee5/booking >~/tools/glassfish/v2.1/glassfish/bin/asadmin deploy dist/jboss-seam-jee5-booking.ear Command deploy executed successfully. |
Posted by Arun Gupta in Finance | Comments[13]
|
|
|
|
|
Thursday February 12, 2009
TOTD
#67 shows how to configure GlassFish High Availability using
Apache httpd + mod_jk on Mac OS X. Even though that's a standard and
supported configuration, there are several
advantages for replacing
Apache httpd with Sun Web Server and mod_jk with Load Balancer plugin
that comes with GlassFish.
This Tip Of The Day (TOTD) shows how
to configure Clustering and Load Balancing using GlassFish
v2.1, Sun
Web Server, Load
Balancer plugin on Windows Vista. This blog is using JDK 6 U7,
GlassFish v2.1 (cluster profile), Sun Web
Server 7 U4, and Load Balancer plug-in with Sun
GlassFish Enterprise
Server 2.1 Enterprise Profile (with HADB link).
Lets get started!

| <?xml version="1.0"
encoding="UTF-8"?> <!DOCTYPE loadbalancer PUBLIC "-//Sun Microsystems Inc.//DTD Sun Java System Application Server 9.1//EN" "file:///C:/Sun/WebServer7/https-LH-KRKZDW6CJE1V/config/sun-loadbalancer_1_2.dtd "> <loadbalancer> <cluster name="cluster1" policy="round-robin" policy-module=""> <instance name="instance1" enabled="true" disable-timeout-in-minutes="60" listeners="http://localhost:38080" weight="100"/> <instance name="instance2" enabled="true" disable-timeout-in-minutes="60" listeners="http://localhost:38081" weight="100"/> <web-module context-root="/clusterjsp" disable-timeout-in-minutes="30" enabled="true" error-url=""/> <health-checker interval-in-seconds="7" timeout-in-seconds="5" url="/"/> </cluster> <property name="response-timeout-in-seconds" value="120"/> <property name="reload-poll-interval-in-seconds" value="7"/> <property name="https-routing" value="false"/> <property name="require-monitor-data" value="false"/> <property name="active-healthcheck-enabled" value="false"/> <property name="number-healthcheck-retries" value="3"/> <property name="rewrite-location" value="true"/> </loadbalancer> |







Posted by Arun Gupta in Finance | Comments[4]
|
|
|
|
|
Thursday January 15, 2009
GlassFish spotted on Salvador, Bahia - a Brazilian beach!
Marcelo Souza (a GlassFish
team member) spotted GlassFish on Salvador,
Bahia beach in Brazil during his personal vacation :)

Thanks to Marcelo for taking this picture :)
Here are couple of shots of the beach itself:
Posted by Arun Gupta in Finance | Comments[2]
|
|
|
|
|
Wednesday November 26, 2008
TOTD #57: Jersey Client API - simple and easy to use
TOTD
#56 explains how to create a RESTful Web service endpoint
using Jersey
and publish the resource using JSON representation. The blog entry
showed how the endpoint can be accessed from a Web browser. This Tip Of The Day explains how to
use Jersey
Client APIs to invoke the published endpoint.
Lets get started!
| package org.glassfish.samples; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue(true); } } |
| private
WebResource createResource() { Client client = Client.create(); WebResource resource = client.resource("http://localhost:8080/helloworld-webapp/webresources/myresource"); return resource; } |
|
Greeting result = createResource().get(Greeting.class); assertTrue(result.greeting.equals("Hi there!")); |
| import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.WebResource; |
| ~/samples/jersey/helloworld-webapp >mvn test [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building helloworld-webapp Jersey Webapp [INFO] task-segment: [test] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 1 source file to /Users/arungupta/samples/jersey/helloworld-webapp/target/test-classes [INFO] [surefire:test] [INFO] Surefire report directory: /Users/arungupta/samples/jersey/helloworld-webapp/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.glassfish.samples.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.587 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Mon Nov 24 16:50:17 PST 2008 [INFO] Final Memory: 18M/43M [INFO] ------------------------------------------------------------------------ |
|
Client client = Client.create(); WebResource resource = client.resource("http://localhost:8080/helloworld-webapp/webresources/myresource"); resource.addFilter(new LoggingFilter()); return resource; |
| Running org.glassfish.samples.AppTest 1 * Out-bound request 1 > GET http://localhost:8080/helloworld-webapp/webresources/myresource 1 > 1 < 200 1 < X-Powered-By: Servlet/2.5 1 < Transfer-Encoding: chunked 1 < Content-Type: application/json 1 < Server: GlassFish/v3 1 < Date: Tue, 25 Nov 2008 07:07:51 GMT 1 < {"greeting":"Hi there!"} 1 * In-bound response Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.074 sec |
Posted by Arun Gupta in Finance | Comments[9]
|
|
|
|
|
Tuesday November 04, 2008

I voted this morning, did you ?
The entire process was quite seamless. A house couple of blocks away
was set up as the polling station. There was no queue around 8:45am
this morning and everything took less than 10 minutes (including
taking pictures ;).
Google Fight is not able to predict the winner:

Some other trends:




Watch similar trends from Aug
4, 2008.
Dont forget voting stations close @ 8pm tonight!
Check out flickr
photostream from fellow voters.
Technorati: elections
2008 vote
Posted by Arun Gupta in Finance | Comments[3]
|
|
|
|
|
Wednesday August 13, 2008
GlassFish v3 Community Acceptance Testing - FishCAT
![]() |
Would
you like to influence the quality of GlassFish ? The GlassFish Quality Group is starting Community Acceptance Testing - a community based testing of upcoming GlassFish v3. This is your chance to provide an early feedback on stability and usability of GlassFish v3. GlassFish v3 is modular (OSGi-compliant), embeddable (runs in-VM) and extensible (hosts non-Java apps) currently under development in the GlassFish community. This is the next major vesion of GlassFish v2. |
Posted by Arun Gupta in Finance | Comments[1]
|
|
|
|
|
Tuesday July 01, 2008
Replacing the original auto-play movie with the youtube version (as mentioned in the comments):
Currently planned to be released on Jul 11!
Technorati: apple
iphone
Posted by Arun Gupta in Finance | Comments[1]
|
|
|
|
|
Monday June 02, 2008
Mihir Gupta is born ... ta da!
I'm glad to announced that yesterday afternoon there was a new addition
to our family.
Mihir Gupta, our 2nd son, was born.
Big brother is "extremely happy" and waiting for young one to come
home. And mom and dad are revising their
skills :)
| Date | Jun 1, 2008 |
| Weight | 7 lb 3 oz |
| Length | 20.5 inches |
Sunday March 02, 2008
Hyderabad in Pictures and Traffic
Shahi
Qutbi Tomb, Golconda
Fort and Charminar.
Ate biryani @ Cafe
Bahar in Basheer Bagh. This place served real good biryani
with a good variety. I went there with a friend who ate at Paradise
Biryani earlier in the week and he liked it much better at Cafe Bahar.
Posted by Arun Gupta in Finance | Comments[3]
|
|
|
|
|
Monday November 19, 2007
TOTD #18: How to Build The GlassFish v3 Gem for JRuby ?
Jerome posted the instructions to build GlassFish v3 Gem for JRuby - very simple and easy. A binary version of Gem is available here.
JRUBY_HOME). Make sure
JRUBY_HOME/bin is in your path.As explained in
Jerome's
entry, you can check out complete GlassFish v3 workspace or just the
Gem code. Here is how you'll check out only the Gem code on a Windows
machine using Tigris Subversion client:

And after the check out is complete, you'll see:

mvn install[INFO] (in
C:/workspaces/glassfish/gem/target/dependency/glassfish)
[WARNING] mkdir -p pkg
[INFO] Successfully built RubyGem
[INFO] Name: GlassFish
[WARNING] mv GlassFish-10.0.0-java.gem pkg/GlassFish-10.0.0-java.gem
[INFO] Version: 10.0.0
[INFO] File: GlassFish-10.0.0-java.gem
[INFO] [install:install]
[INFO] Installing
C:\workspaces\glassfish\gem\target\gem-10.0-SNAPSHOT.jar to C:\Users\Arun
Gupta\.m2\repository\org\glassfish\distributions\gem\10.0-SNAPSHOT\gem-10.0-SNAPSHOT.jar
[INFO] [install:install-file {execution: install-gem}]
[INFO] Installing
C:\workspaces\glassfish\gem\target\dependency\glassfish\pkg\GlassFish-10.0.0-java.gem
to C:\Users\Arun
Gupta\.m2\repository\org\glassfish\distributions\GlassFish-Gem\10.0-SNAPSHOT\GlassFish-Gem-10.0-SNAPSHOT.gem
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 minutes 2 seconds
[INFO] Finished at: Fri Nov 16 17:56:12 PST 2007
[INFO] Final Memory: 11M/20M
[INFO]
------------------------------------------------------------------------
The Gem is available in target\dependency\glassfish\pkg
directory.cd target\dependency\glassfish\pkgC:\testbed\ruby\jruby-1.0.2\bin\jruby -S gem install
GlassFish-10.0.0-java.gem
Successfully installed GlassFish, version 10.0.0And use it!
Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.
Technorati: totd v3 jruby ruby rubyonrails glassfish gem jrubyonglassfish
Posted by Arun Gupta in Finance | Comments[2]
|
|
|
|
|
Thursday November 01, 2007
I arrived in Beijing for Sun Tech Days earlier this week. Here are some travel tips:
| Item | Quoted | Paid |
| Tee-shirts | 1 for 130 RMB | 3 for 50 RMB |
| Cashmere Scarf (can't be original ;) | 1 for 160 RMB | 5 for 80 RMB |
| Great Wall Memento | 350 RMB | 20 RMB |
| Refrigerator Magnet | 20 RMB | 5 RMB |
Generally the shopkeepers will give a counter offer but be straight-faced and maintain your price. To keep it easy, just stick to your price and pretend walk away. In all the cases, I was approached with my quoted price :)
If you plan to visit Great Wall during November, make sure to carry good warm clothing including gloves and an ear-long cap and a good hiking/walking shoe. It is extremely windy and certain portions of the Wall are really steep.
There is no tipping in restaurants and taxi. Don't be surprised if you see a confused look on the person serving if you leave the tip.
And here are the pictures so far:
Sun Tech Days Beijing kick started this morning and a subsequent entry will talk about that.
Technorati: conf traveltips beijing suntechdays
Posted by Arun Gupta in Finance | Comments[1]
|
|
|
|
|
Thursday January 04, 2007
New category added - "Finance"
I'm planning to build and expand my knowledge of personal finance planning, investment options, jargons, tools, tips and tricks. And so I'm adding a new Finance category to my blog to share this knowledge with you. I hope you find the information useful.
Technorati: personal finance finance investing
Posted by Arun Gupta in Finance | Comments[0]
|
|
|
|
|
Today's Page Hits: 1159
Total # blog entries: 1002