geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: How does the Client Container work?
Date Mon, 28 Sep 2009 20:14:47 GMT

On Sep 27, 2009, at 3:42 AM, Juergen Weber wrote:

> as I understand, the Client Container is to provide a mapping for EJB
> references via [geronimo-]application-client.xml. Is this done on  
> the client
> side or server side? Where is the XML file parsed? Or is the Client
> Container something virtual at server side?

XML processing and annotation scanning all happen at deploy time on  
the server side.

>
> http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+Java+EE+application+client
> says "an application client that runs in the Apache Geronimo  
> application
> client container rather than running in your local Java environment."
> But the sample client does nothing in main, so I do not see how any
> container can get control (e.g. to provide an EJB mapping or do  
> client EJB
> injections).
>
> If you run
> http://svn.apache.org/viewvc/geronimo/sandbox/magicGball/magicGball-client/src/main/java/org/acme/MagicGBallClient.java?view=markup
> main() goes into
> Context ctx = new InitialContext();
> Object o = ctx.lookup("java:comp/env/mGball");
>
> How does the lookup work? by having a jndi.properties in the  
> classpath and
> the factory doing magic?
>
> I'd expect that you'd have to start some Geronimo classes' main as  
> entry
> from command line which sets up JNDI and injections and then calls  
> you own
> main client class, but I did not see this in any examples

Right.  You boot the app client container from the command line, the  
app client container does all the work to setup the environment,  
injects the required things into your main class, then calls your main  
method.

For all intense purposes the app client is really like a mini-server  
with a little Geronimo kernel and everything.

-David


Mime
View raw message