I'm trying to bind a class remotely to the JNDI running in JBoss, but what gets bound is not the Remote object but the object itself.
public interface TestOperations extends Remote
public class TestImpl extends TestObject implements TestOperations
and a test class that does:
TestImpl impl = new TestImpl();
mContext.bind( "TestName", impl );
and I've compiled the Impl stub classes using rmic.
- When I define the Impl to extend the Serializable interface (which it shouldn't have to), the binding exports the actual Impl object, not the Remote object
- If I define the Impl to not extend the Serialzable interface the bind operation throws and java.io.NotSerializable exception
- I've also tried explicitly binding the Remote object using PortableRemoteObject.toStub() method, but then the bind operation throws a Null Pointer Exception.
The exact same code works in Weblogic. Does the Naming Provider (org.jnp.interfaces.NamingContextFactory) allow stubs to be exported?
In jboss 3.0 with enabled iiop-services there are actually 2 different nameservers running (someone correct me if i am wrong): the default JNDI-server on Port 1099 AND the nameserver of the integrated JacORB - I think you should register your IIOP-Server objects in the JacORB nameserver not the default JNDIServer.....