From user-return-14012-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Mon Sep 28 20:15:20 2009 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 96041 invoked from network); 28 Sep 2009 20:15:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Sep 2009 20:15:20 -0000 Received: (qmail 14187 invoked by uid 500); 28 Sep 2009 20:15:20 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 14139 invoked by uid 500); 28 Sep 2009 20:15:20 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 14131 invoked by uid 99); 28 Sep 2009 20:15:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 20:15:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.blevins@visi.com designates 208.42.176.212 as permitted sender) Received: from [208.42.176.212] (HELO g2host.com) (208.42.176.212) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 20:15:10 +0000 Received: from [71.106.81.39] (account dblevins@visi.com HELO [192.168.42.6]) by mailfront1.g2host.com (CommuniGate Pro SMTP 5.1.16) with ESMTPSA id 119174908 for user@geronimo.apache.org; Mon, 28 Sep 2009 15:14:48 -0500 Message-Id: From: David Blevins To: user@geronimo.apache.org In-Reply-To: <25632603.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: How does the Client Container work? Date: Mon, 28 Sep 2009 13:14:47 -0700 References: <25632603.post@talk.nabble.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org 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