Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling a BAS EJB from a Weblogic EJB

1 view
Skip to first unread message

Robert Double

unread,
Nov 6, 2002, 11:45:04 PM11/6/02
to
Hi,

I have the situation whereby I have a machine running Borland
Application Server that has an EJB located on it. I have written a
simple java application client to ensure I can connect and access the
EJB, and it works with no problems. For the java application to work
correctly I needed to have asrt.jar and vbjorb.jar as the 1st items on
the classpath and basically the code was made up of :

System.setProperty("vbroker.agent.port", "14000");
System.setProperty("vbroker.agent.addr", "10.121.2.35");
Context ctx = new InitialContext();
Object RemoteObj = ctx.lookup("TestEJB");

All worked fine. Now what I want to to do is do this call from within
a stateless session bean running on Weblogic.

The problem is getting the InitialContext to BAS. By default if you
do a x = new InitialContext() within the WL container it automatically
uses the WebLogic Jndi Factory. Of course if I put the asrt.jar as
the 1st item on the classpath it overrides WL's implementation and
would work, but it means that the default nature of the "new
InitialContext()" changes so it returns a BAS InitialContext rather
than a WL. So if I need a WL Context so I could access local
resources I couldnt just do a new InitialContext anymore without
setting up the PROVIDER_URL and CONTEXT_FACTORY to be WL.

Is there any easy way for me to get the InitialContext for the BAS
server without replacing WL's default implementation of
InitialContext??

I am sure someone must of come across this problem.

Thanks in advance for any help

Robert Double

0 new messages