users@glassfish.java.net

calling a weblogic ejb from glassfish

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Jan 2010 15:36:41 PST

I'd like to be able to call a stateless session bean from a glassfishV3 server that is residing on weblogic 9.2.3. (Ejb spec 2.1 NOT 3.0 please)

I've done this successfully from Tomcat to weblogic, but there are a few hiccups when trying this on glassfish.

Basically what I've attempted is this:

1.) I add these jvm properties to the glassfish startup:
-Dorg.omg.CORBA.ORBClass=weblogic.corba.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
-Djavax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
-Djavax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl

2.) Copy weblogic.jar, tools.jar, and webservices.jar from the weblogic/server/lib directory to the glassfish lib/ext directory

...glassfish won't start then because of the weblogic.jar...

3.) Move the weblogic.jar to the WEB-INF/lib directory of my war in glassfish.

Now I try it and get:
(I'm skipping some of the stacktrace at the start)

.....java.lang.IllegalAccessError: tried to access method weblogic.kernel.KernelStatus.initialized()V from class weblogic.kernel.Kernel at weblogic.kernel.Kernel.ensureInitialized......

I'm guessing that this has to do with the "weblogic kernel" not being initialized. So now I'm stuck.

Am I going down the wrong path?

I've also tried these other proposed solutions:

1.) Changing the connection properties of the InitialContext to use these properties:
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
env.put(Context.SECURITY_PRINCIPAL, "weblogic");
env.put(Context.SECURITY_CREDENTIALS, "weblogic");

2.) Using RMI over IIOP instead of T3.

None of these with any luck.

If anyone has done this successfully I'd appreciate some insight.

Regards,
Eric
[Message sent by forum member 'slantedwalker' (slantedwalker_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=382051