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. ---> <dep:server-environment> <dep:moduleId> <dep:groupId>HRManager</dep:groupId> <dep:artifactId>client-server</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>car</dep:type> </dep:moduleId> </dep:server-environment> 2012/6/26 Forrest Xia <[email protected]> > > > On Mon, Jun 25, 2012 at 1:34 PM, nemesis_sun <[email protected]>wrote: > >> Hi Forrest, >> >> I couldn't find an example in the given link on how to use @EJB instead of >> InitialContext.lookup() >> 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. >> > > > > -- > Thanks! > > Regards, Forrest > > -- Ivan
