Refer to bank sample, for example, https://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.2.1/samples/bank/
On Mon, Jun 25, 2012 at 12:55 PM, nemesis_sun <[email protected]> wrote: > Hi guys, > > I'm new and on the way of learning Geronimo. I have this simple > application, > there is one EJB application and one App Client. In the EJB app, I have one > remote interface (with "@Remote"), one EJB(with "@Stateless"). In the App > Client, I have a Main class which accesses the EJB and calls some of its > functions. > > The problem is, I am able to use InitialContext.lookup() to retrieve an > instance of the EJB, but not so with the @EJB annotation. It returns a NULL > value. > > So can someone help me on this issue, how to use @EJB instead of lookup()? > Please also note that all the annotations I just listed are without any > element. I know with this alone the server may not have enough info on > where > to look for the EJB, so maybe there is some way to specify it, either in > those annotations or the the deployment plan (my priority is in the > annotations, if there is any) > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/Using-EJB-annotation-instead-of-looking-up-for-EJB-tp3985253.html > Sent from the Users mailing list archive at Nabble.com. > -- Thanks! Regards, Forrest
