Title:
hmmm interensting. of course i assume that is just a typo where you have the semicolon and comma after the proable remote object.narrow as it would not compile that way.
 
I remember getting these wrapper classes returned, but I am sure when I was doing it I was not casting correctly. I assume you are getting an exception on execution?
 
Al
----- Original Message -----
Sent: Monday, October 09, 2000 2:14 PM
Subject: RE: getting EJB home from JSP

Hi,
 
I am casting the narrowed object properly my code is
 
CategoryHome catHome =
    (CategoryManagerHome)PortableRemoteObject.narrow( ctx.lookup("java:comp/env/CategoryManager");, CategoryManagerHome.class);
 
but this throws up a wrong ( maybe intermediate class) .(CategoryManagerHome_StatelessSessionHomeWrapper3).
 
I am using Resin as the servlet/ web server now and it works fine ( as resin acts like any other java client would do).
I would rather use orion for the full setup if i can get over with this problem.
 
Thanks
Krishnan
 
-----Original Message-----
From: Al Fogleson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 08, 1995 7:57 AM
To: Orion-Interest
Subject: Re: getting EJB home from JSP

The only time I have ever seen this is when I forgot to cast my PortableRemoteObject.narrow() call.... it should be something like...
 
CategoryManagerHome home;
 
home = (CategoryManagerHome) PortableRemoteObject.narrow(ctx.lookup("myhome"), CategoryManagerHome.class);
 
 
 
you still have to cast it to a thisHome object even using a portableRemoteObject.narrow()
 
Al
 
----- Original Message -----
Sent: Saturday, October 07, 2000 10:59 PM
Subject: getting EJB home from JSP

Hi,

I am deploying ejbs, and jsps using a source-directory method with development set to "true"( instead of packages classes into ears or wars). When i try to get a handle from JNDI for EJB home class within my jsp i am getting following error:

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

This is because Orion is returning some wrapper class instead of the home .(CategoryManagerHome_StatelessSessionHomeWrapper3).

The same code works fine if i call from a standalone java test client, in which case Orion returns some _proxy3 class which gets casted to the proper class.

Would appreciate any help and insights on this problem.

Thanks Much,

Krishnan                        

Reply via email to