-
1. Re: The issue of calling EJB from client
wesslan Feb 17, 2006 12:12 AM (in response to wangyi1031)Which version of JBoss are you running? I'll bet it is EJB3 RC5 or 4.0.4RC1. In those versions you don't lookup your EJB's with foo.class.getName(). See http://docs.jboss.org/ejb3/app-server/tutorial/jndibinding/jndi.html.
Regards Peter -
2. Re: The issue of calling EJB from client
gurrie09 Feb 17, 2006 6:00 AM (in response to wangyi1031)Hi,
I am also trying to run the same example (I assume it is the one from the javaworld article). I have managed to lookup up the session bean, however the object returned from InitialContext.lookup is of type org.jnp.interfaces.NamingContext and not of type SimpleSession as I expect?
I am running version 4.0.4RC1, and any help would be greatly appreciated as I have been trying to get this to run for days now! In the jmx console it shows the following for my bean
Domain Name: jboss.j2ee
service: EJB3
name: SimpleSessionBean
jar: SimpleSessionApp.ejb3
MBean Java Class: org.jboss.ejb3.ServiceDelegateWrapper
so I am guessing the session bean is deployed properly?
Regards,
Brian -
3. Re: The issue of calling EJB from client
wangyi1031 Feb 17, 2006 12:04 PM (in response to wangyi1031)Hi, Peter,
I also did lookup by calling: ejbName/remote in my client, however, I still get the same "not bound " exception. Any suggestions?
Thanks ahead. -
4. Re: The issue of calling EJB from client
instinct Feb 17, 2006 12:58 PM (in response to wangyi1031)please have a look at the logfile if you can find messages like this:
18:49:05,653 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=gecam.ejb3,name=ListManagerBean with dependencies: 18:49:05,653 INFO [JmxKernelAbstraction] persistence.units:jar=gecam.ejb3.jar,unitName=gecam
Then you can lookup the session bean like thisInitialContext ctx = new InitialContext(); (ListManagerRemote) listManager = (ListManagerRemote) ctx.lookup("ListManagerBean/remote");
-
5. Re: The issue of calling EJB from client
bdecoste Feb 20, 2006 10:53 AM (in response to wangyi1031)EJB3 RC4 and RC5 use the "bean/remote" default jndi binding, but are deployed using .jar files not .ejb3 files. Previous release candidates used the .ejb3 files, but used the bean.class.getName() default jndi binding. So it looks like you are using an older release candidate with the new versions default binding values.
I suggest you either upgrade to RC5 and deploy your beans as a .jar file.