[jboss-dev-forums] [Design of JBoss IIOP on JBoss] - JBAS-4992: ORB reference prevents stateful session passivati

sguilhen@redhat.com do-not-reply at jboss.com
Thu Dec 27 14:34:59 EST 2007


Jira issue: http://jira.jboss.org/jira/browse/JBAS-4992

When configuring the jndi.properties to use the org.jboss.iiop.naming.ORBInitialContextFactory, stateful session beans that hold a reference to the java:comp/env context fail to passivate because the factory sets the "java.naming.corba.orb" env property with a reference to the ORB used by JBoss. This is needed so that the NamingContexts (and thus, the IIOP stubs) retrieved by the lookup process are registered with JacORB (and not with Sun's ORB). This is important because JacORB is where all interceptors are configured, and if the stubs get registered with a different ORB instance some services may not work because of the absence of the correct interceptors.

When a stateful session that holds a reference to the java:comp/env context is passivated, an error occurs because it tries to serialize the context and the ORB ref is not serializable. As the specs make it clear that references to the java:comp/env context must be passivated, we need to find a way to fix this. My first idea is to implement the writeObject and readObject methods in org.jboss.jnp.interfaces.NamingContext, so that writeObject removes the ORB reference and readObject restores it (doing some very similar to CorbaORB.getInstace()).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115777#4115777

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115777



More information about the jboss-dev-forums mailing list