You shouldnt need to duplicate the javax.* classes these are standard across
containers.  Rather you instead need to simply load the EAServer
InitialContextFactory.  This is  installed by the jagclient.exe, or you can
just make sure jagclient.zip is in the CLASSPATH.  If you do that, it should
return the proper Home and Remote interface.  Have you done

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sybase.ejb.InitialContextFact
ory");
props.put(Context.PROVIDER_URL,"iiop://someserver:9000");
props.put(Context.SECURITY_PRINCIPAL,user);
props.put(Context.SECURITY_CREDENTIALS,pass);
Context sybCtx = new InitialContext(props);

Now lookup using this context.

Dave Wolf
Internet Applications Division
Sybase

----- Original Message -----
From: "Sosnowski, Andrew P [IT]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 10:40 AM
Subject: FW: Retrofitting EJB to existing App OR gluing two EJB servers to
gether; Architectural question


> > We are trying to integrate a third part package (written using EJBs on
> > Sybase's EA Server) with an existing app that uses BEA Weblogic 4.5.
> >
> > From the existing app we need to invoke an EJB in the third party
software
> > app. However to do this we need to add the EA Server implementation of
> > CORBA, JNDI, and EJB to the CLASSPATH for the weblogic app.
> > This means we have 2 versions of CORBA, JNDI, and EJB and especially
> > javax/ejb classes that are incompatible.
> > When we try invoke the EJB on the EA Server, we have already loaded the
> > EJBHome interface from the weblogic server's implementation of
javax/ejb.
> >
> > This means that when we try cast the object returned from the JNDI
lookup,
> > the cast fails,  i.e.:
> >
> > home = (com.sybase. ... FIX40SendHome) ctx.lookup(beanHomeName);
> >
> > throws a ClassCastException.
> >
> > The bean returned from the lookup is the correct one.
> >
> > This way of invoking a bean in another EJB server seems architecturally
> > flawed. What would be a more flexible way of doing this? Isn't this the
> > same problem that CORBA struggled with until the invention of iiop? How
is
> > this solved with EJBs?
> >
> > Thanks in advance for your help,
> >
> > Andy Sosnowski
> >
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to