Hello,

I have been trying to solve the following problem for some time now.

I am running two applications on Orion.  (Application A has the EJBs and
Application B is the client).  I use the following JNDI properties to
connect to application A JNDI context within application B:

java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://localhost/A
java.naming.security.principal=admin
java.naming.security.credentials=123

I seem to be able to locate the bean's EJB Home object but cannot cast the
returned stub to the the EJB Home interface.  I get a remote reference
(stub) type of SessionHomeWrapper1.
I've used the instanceof operator but it does not evaluate to true for my
EJB Home interface.  I've decompiled this stub class, it does implement my
EJB Home interface.  But for same reason I cannot cast it back to my home
interface in the client code:


Context context = new javax.naming.InitialContext(conProperties);
Object ref = context.lookup("PropertyBrokerEJB");

if (ref instanceof PropertyBrokerEJB)
      System.out.println ("\nReturned remote ref: " +
ref.getClass().getName() );


// this line throws ClassCastException
PropertyBrokerEJBHome propertyBrokerEJBHome =
(PropertyBrokerEJBHome)javax.rmi.PortableRemoteObject.narrow(ref,
PropertyBrokerEJBHome.class);


Following advice form the other developers:
- I have manually compiled all EJB classes and deployed the same version
(same compiled class codes) in both applications.
- I have used Orion1.0, Orion1.0.3 and Orion1.2 with combination of JDK1.2
and JDK1.3.
- And ofcourse, I have checked my deployment descriptors countless times.


I will really  appreciate any comments on this problem as I urgently need to
solve it

Regards

Bulent



Reply via email to