Hi there,

we have two j2ee applications running on different orion servers (say orion1 and
orion2). Both 1.5.2 orions run under JDK1.3.0 on winnt 4.0
Now we want 'cross' functionality...
We build a sessionBean  'myGreatBean', deploy it on orion1, create an
test-application client.... Everything works fine :-)
But now I want to call 'myGreatBean' from a sessionBean 'greatBeanUser' living
on orion2.

Here the code from 'myGreatBeanUser':

....
Hashtable jndi_props = new Hashtable();
jndi_props.put("dedicated.connection", "true");
jndi_props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
jndi_props.put(Context.PROVIDER_URL, "ormi://orion1/App1");
jndi_props.put(Context.SECURITY_PRINCIPAL, "admin");
jndi_props.put(Context.SECURITY_CREDENTIALS, "123");

Context ctx = new InitialContext(jndi_props);
Object ref = ctx.lookup("myGreatBean");
GreatBeanHome home = (GreatBeanHome ) PortableRemoteObject.narrow(ref,
GreatBeanHome .class);
....

narrow() throws the following exception:

java.lang.ClassCastException at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)


at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at
de.lsgermany.Products.SiteMarket.GUI.internal.RadioPlanning.Feasibility.FeasibilityDataBean.calculate(FeasibilityDataBean.java:87)


at __jspPage0_internal_feasibility_data_jsp._jspService
(__jspPage0_internal_feasibility_data_jsp.java:164)
at com.orionserver.http.OrionHttpJspPage.service(Unknown Source)
at com.evermind._ah._rad(Unknown Source)
at com.evermind.server.http.JSPServlet.service(Unknown Source)
at com.evermind._cxb._abe(Unknown Source)
at com.evermind._cxb._uec(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)



What the hell is the difference between calling ejb's from appclient and calling
from a 'foreign' ejb?
I have seen a lot about this topic in the list, but unfortunately this problem
isn't discussed to my satisfaction.

One of the most important reason for developing EJB's is reusing in an
ENTERPRISE environment.... (IMHO)

Help  (hello orionsupport!!!) would be appreciated,
Michael

==================================================
LS telcom AG
Michael Rist
Im Gewerbegebiet 31-35
D-77839 LICHTENAU
Germany

Phone: +49 7227 9535-242
FAX:     +49 7227 8982
email:    [EMAIL PROTECTED]
==================================================




Reply via email to