Hi, just have a close look at your sample application, with the changes below, I could invoke the application client and the @EJB also works.

a. Add Class-Path: HRManager-EJB.jar in the MANIFEST.MF file in the client application

From the spec side, client application may have access to other components in the same EAR application, that is not must. The changes above is just to make sure that it could see the classes from the EJB application. Another possible solution is to add those ejb client API in the client application file.

b. Update the client deployment plan with below, the server-environment does NOT mean the dependency configuration, think you could find more description for that in the wiki.


2012/6/26 Forrest Xia <forrestxm@gmail.com>

On Mon, Jun 25, 2012 at 1:34 PM, nemesis_sun <nemesis_sun@yahoo.com> wrote:
Hi Forrest,

I couldn't find an example in the given link on how to use @EJB instead of
The client there still uses lookup() to get EJB.
Just made some updates to bank sample in the 3.0 branch -> https://svn.apache.org/repos/asf/geronimo/samples/branches/3.0/samples/javaee5/bank/

You can compile it and run against 3.0.0-SNAPSHOT build, for app client run, just execute a command like this:
$GEORNIMO_HOME/bin/client org.apache.geronimo.samples.javaee5/bank-tomcat_bank-client-3.0.0-SNAPSHOT.jar/3.0.0-SNAPSHOT/car

View this message in context: http://apache-geronimo.328035.n3.nabble.com/Using-EJB-annotation-instead-of-looking-up-for-EJB-tp3985253p3985255.html
Sent from the Users mailing list archive at Nabble.com.


Regards, Forrest