users@glassfish.java.net

Re: Reg: Appclient main method in Glassfish V3

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Mar 2010 08:26:54 PDT

The answer is more complicated in GlassFish 3 than in 2 because in GlassFish 3 the appclient command, while consistent with GlassFish 2, behaves more like the java command.

As a result, there is not a main class for the app client container any more. The appclient script uses a Java agent to do some of the early work before the developer's client gains control.

I'll return to my earlier question... What exactly are you trying to accomplish by accessing the app client container's main class directly? You should use only published and supported interfaces of GlassFish, and the class that happened to be the main class in GlassFish 2 is not part of the published and supported interface.

For example, you can use the appclient command to launch app clients, and then there would be no difference in the results between GlassFish 2 and GlassFish 3.

Or you can use the embedded app client API to write your own Java SE app that launches the app client container. This is new in GlassFish 3.

Or, if you are using a Java SE client often called a stand-alone client (that is, not a Java EE app client but a regular Java app) that does its own JNDI look-ups for EJBs, then please see the EJB FAQ (https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#AppClientDef) which describes what JAR to place on the class path.

- Tim
[Message sent by forum member 'tjquinn']

http://forums.java.net/jive/thread.jspa?messageID=393324