On Jun 25, 2012, at 11:41 AM, nemesis_sun wrote: > I have done some research and found a geronimo tutorial here discussing about > injecting an instance of EJB into a servlet, and using @EJB with a "name" > element. > In addition to that, geronimo-web.xml also has to be edited by adding a > <dependency> and a <ejb-ref> element. > I have done this similarly to the geronimo-application-client.xml in the App > Client module and tried running it, but nothing happened, still the same > null object was returned. > > One more thing is that I didn't add the App Client module to the server, as > there was some stupid error during deployment and I was able to run it using > "Run as Java Application". I don't know if there is any difference, if there > is then I will have to resolve that error too.
I'm not sure what you mean by that, I don't use eclipse and run everything from the command line. You need to include the app client in an ear with the ejb (or web including ejbs) module and deploy it as a unit, and you need to start the app client using geronimo. I'm not sure where the instructions are for this any more, basically aside from demos no one has ever used an app client, hopefully the bank sample Forrest pointed at has some instructions. I really doubt there is an easy way to run an app client through eclipse. It would look like starting some kind of server configuration if there is a way. An app client uses large parts of the geronimo server and even if you package it up like a Main-based application it won't work at all without running i through the geronimo app client container. thanks david jencks > > Please help. > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/Using-EJB-annotation-instead-of-looking-up-for-EJB-tp3985253p3985261.html > Sent from the Users mailing list archive at Nabble.com.
