Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NameNotFoundException on Handle of a Stateful EJB  RSS feed

 
Sanjay Ksingh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks !

Our design is like this:

A server keeps a cache of javax.ejb.Handle objects of Stateful Session Beans.
Clients (a different JVM) get the handle by a key using:

javax.ejb.Handle handle - SessionEngineEJB.getHandle(key).
UserProxyEJB ejbProxy = (UserProxyEJB) PortableRemoteObject(handle.getEJBObject(), UserProxyEJB.class);

This used to work out of box in JBoss 4.0.1.
But is not always working in JBoss 4.3.0.GA (we get sporadic exceptions)

I checked that Handle object (at least inside server JVM instance) is valid.

Exact error is in getEJBObject:

NameNotFoundException: Name UserproxyEJB is not bound in this context
at org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:184)

First I had to add following two lines in JBoss server/conf/jndi.properties file for it to work at all:
java.naming.factory.initial=org.jboss.naming.NamingContextFactory
java.naming.provider.url=jnp://host:port

What else needs to be done so serialization of EJB handle from server to client (for Stateful Session beans) work ?

thanks,

-Sanjay
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!