Discussion:
EJB communication between weblogic and websphere
(too old to reply)
nebs om
2004-12-22 18:04:49 UTC
Permalink
Hello:

I have weblogic 7.1 instance running in machine A and websphere running in machine B. I want to make a call to the ejb deployed from weblogic to websphere. Any experience in this would be very helpful. Or pl. post the procedure.

Thx in advance.
bill kemp
2004-12-22 18:54:37 UTC
Permalink
I don't think that there is any magic here, although I've never tried it.
All you need is the compiled EJBHome and EJBObject interfaces in the
classpath of the calling EJB, get an InitialContext in the JNDI namespace of
the target EJB container using the name of the JNDI InitialContext Factory,
do a lookup on the bean making sure to do a PortableRemoteObject.narrow when
you are casting the Home stub with the vendor specific version of
PortableRemoteObject(and that may be the real trick), call the appropriate
create method, and you are rolling.

I guess the question becomes how to make sure that when you are calling
PortableRemoteObject.narrow on the Home stub, that you get the vendor
specific version for the EJB container and JNDI namespace from which you are
doing the lookup.

I guess the answer is, I'm guessing. Have you tried it?

bill
Post by nebs om
I have weblogic 7.1 instance running in machine A and websphere running
in machine B. I want to make a call to the ejb deployed from weblogic to
websphere. Any experience in this would be very helpful. Or pl. post the
procedure.
Post by nebs om
Thx in advance.
Andy Piper
2004-12-22 19:12:36 UTC
Permalink
Post by nebs om
I have weblogic 7.1 instance running in machine A and websphere running in machine B. I want to make a call to the ejb deployed from weblogic to websphere. Any experience in this would be very helpful. Or pl. post the procedure.
Do you mean 8.1? This works fine. The main points are:

a) do NOT use the target vendor's InitialContextFactory. I.e. in WLS
use WLInitialContextFactory NOT the WAS thing. You get this for free
if you use ejb-refs instead of doing explicit JNDI lookups. For
instance you can specify an EJB ref using a URL to the foreign EJB.

b) use iiop URLs for JNDI lookups.

c) For EJB Handles and meta data you will have to put an appropriate
jar in your server's classpath. For WLS this is wl-j2ee-client.jar and
it needs to go in WAS classpath. There will be an equivalent for WAS.

d) If you are calling EJBs that do not exist locally then you will
need an appropriate EJB client jar locally.

Security and transactions get more complicated. It does work but there
is some complexity in the setup, especially with security. In
particular you should use 8.1sp4 and WAS 5.1.3 (possibly with some
fixpack).

HTH

andy

--
nebs om
2004-12-22 21:27:25 UTC
Permalink
All,
Thaks for the response. Is it possible to provide some examples. What would be the JNDI?

Thanks.

Loading...