geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Jiang" <genspr...@gmail.com>
Subject Re: ejb client
Date Wed, 31 Dec 2008 07:06:52 GMT
Sure you'll want to put your remote interface classes(here is the
ShoppingCart) in your client classpath.

2008/12/31 axiez <lesaient@gmail.com>

>
> This time it threw Exception as follows:
> Exception in thread "main" javax.naming.NamingException: Cannot lookup
> '/ShoppongCartBeanRemote'. [Root exception is java.rmi.RemoteException:
> Cannot read the response from the server. The class for an object being
> returned is not located in this system:; nested exception is:
> java.lang.ClassNotFoundException: ShoppingCart]
> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:240)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at Client.main(Client.java:12)
>
> axiez wrote:
> >
> > I want to run sample code to understand ejb 3.0 basics. I am new to ejb.
> I
> > have the following java files: ShoppingCartBean.java, ShoppingCart.java
> > and Client.java. The Client.java file has the following code:
> > import javax.naming.InitialContext;
> > public class Client {
> >     public static void main(String[] args) throws Exception {
> >         InitialContext ctx = new InitialContext();
> >         ShoppingCart cart = (ShoppingCart)
> > ctx.lookup("ShoppingCartBean/remote");
> >         ...
> >     }
> >     My plan is to have client on a different JVM than ejb container. I
> > wonder how the client can execute bean method without even knowing IP
> > address etc of the JVM that has the other code on ejb container.
> >
>
> --
> View this message in context:
> http://www.nabble.com/ejb-client-tp21193112s134p21227784.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>


-- 
Shawn

Mime
View raw message