EJB is meant to run as a service inside JavaEE-Servers to serve e.g. a web application inside the server or a number of coupled servers. In general you won't expose EJBs directly to a standard java remote client application.
I guess you've done this tutorial already? http://cwiki.apache.org/GMOxSAMPLES/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html Then you've got your working client already, namely the MyServlet.class! If you want to use them with a plain standard Java application (that's what I think you want to do?), there's not a defined and easy way to do it. WebSphere has something like that (http://www-128.ibm.com/developerworks/websphere/library/techarticles/0409_bhogal/0409_bhogal.html), but I don't know about Geronimo. The best way to do what you want to do is to build webservice around your EJBs, e.g. with SOAP, RMI or similar technologies. -Johannes On Tue, 4 Dec 2007 20:48:20 -0800 (PST), beyondjusitn <[EMAIL PROTECTED]> wrote: > > Then, how can I make it to access the remote EJB interface in my > application > client? I would really appreciate if you could write an step-by-step > tutorial to me, of course use eclipse and Geronimo. I'm totally desperate > now. > Thanks a lot! > > Johannes Lietz wrote: >> >> >> Simply said: You can't just add a main method to an EJB class and expect >> it >> to run in the same way as it would inside an application server. >> >> You need the whole infrastructure an application server provides, which >> does a lot of things behind the scenes. In your class, the server would >> "magically" instantiate an object for your member remoteBusinessIntf, >> which >> will do a sayHello(). In your case remoteBusinessIntf is null, and the >> error is thrown. >> >> -Johannes >> >> >> >> > > > ----- > -- > Best Wishes! > Justin Tsao > -- > View this message in context: > http://www.nabble.com/Exception-in-thread-%22main%22-java.lang.NullPointerException--tf4943169s134.html#a14165282 > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
