wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes jndi settings for statefull session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "jndi settings for statefull session bean" Watch "jndi settings for statefull session bean" New topic

jndi settings for statefull session bean

Mohamed Amri

Joined: Feb 17, 2006
Posts: 11
In the following code, I could get reference to the stateless session bean "CalculatorBean", but if the bean is stefull, I could not get a reference to it using the same JNDI settings, how should I change the following code in order to be able to get a reference to the statefull bean? I am using Jboss


Properties props = new Properties();
props.put("java.naming.factory.url.pkgs","org.jboss.naming rg.jnp.interfaces");
InitialContext ic = new InitialContext(props);
CalculatorRemote calculator = (CalculatorRemote) ic.lookup("example/CalculatorBean/remote");
Bhaskar Rao

Joined: Apr 25, 2005
Posts: 23

As far as I know, type of bean (stateless or stateful) or any other for that matter has nothing to do with JNDI. There might be some other issue.
Sandip Sarkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 55
Can you please put in your jboss.xml and ejb-jar.xml files?
How you look up does not have to change.
It is all in what you have put in these files.

subject: jndi settings for statefull session bean
Similar Threads
Can't access remote Sessionbean
EXCEPTION "Name Not Found Exception: ejb not bound "
problem with ejb client in Jboss
How can my Applet get in touch with an EJB onJboss?
I have deployed my ejb with Weblogic and I have a problem with my client