Hello,
I have a stateful SessionBean (EJB 2.x) called "MySession" being accessed via
IIOP and having a Property "MySessionID".
Within it's ejbCreate() it should register itself within the JNDI under
"mysessions/" + its "MySessionID", just like
"mysessions/mysessionid_123", from where it can be looked up again by a client
and invoked (via IIOP).
The reason for this is a C#-Client (talking IIOP via the "IIOP.Net" - Tool)
doing some jobs and a Web-Application acting as "Client" to the C#-Client again
by invoking its methods. Therefore all the Communication has to be IIOP.
Within the ejbCreate() i bind the MySession-Instance to the JNDI via
| Context ctx = new InitialContext();
| Object mysession_ref = this.context.getEJBObject();
| MySessionRemote ms = (MySessionRemote)
| PortableRemoteObject.narrow(
| mysession_ref,
| MySessionRemote.class );
| String jndi = "mysessions/" + mysessionid;
| try {
| ctx.rebind( jndi, ms );
| } catch (NameNotFoundException nnfe) {
| // create subcontext and try rebinding
| ctx.createSubContext( "mysessions" );
| ctx.rebind( jndi, ms );
| }
|
This works fine, the Instance is bound to JNDI (says the JNDIView-MBean),
BUT the problem is:
The MySessionHome is bound to "iiop/MySession", as the DeploymentDescriptor
states it should be accessible via JRMP AND IIOP,
whereas the Instances are bound to mysessions/mysessionid_123", and therefore cannot
be looked up via the IIOP-Client.
How do i tell JBoss to bind them as "iiop/mysessions/mysessionid_123" ?
I don't want to put the "common iiop-necessary" properties like
"corbaloc::hostname:port/JBoss/Naming/root" to the Constructor of the
InitialContext (I think this spoils clustering??)
Please help me, it's my diploma-thesis and I'm running out of time (like every
college-student I think ... ), I really appreciate any help ;) !
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962389#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...