RE: getting EJB home from JSP

2000-10-11 Thread Reddy Krishnan
Title: 



sorry 
for the typo. I am getting classcastexception.

  -Original Message-From: Al Fogleson 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, October 09, 1995 9:24 
  PMTo: Orion-InterestSubject: Re: getting EJB home from 
  JSP
  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 - 
From: 
Reddy Krishnan 
To: Orion-Interest 
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 AMTo: Orion-InterestSubject: 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...
  
  CategoryManagerHomehome;
  
  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 - 
From: 
Jitendra Kothari 
To: Orion-Interest 
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.ClassCastExceptionat 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)at 
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
This isbecause Orionis returning some 
wrapper class instead of 
thehome.(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 



RE: getting EJB home from JSP

2000-10-11 Thread Nick Newman

Hi Krishnan,

Is that REALLY your code?  If so, the problem is probably that you declare the
variable on the left to be a CategoryHome, but the right hand side is a
CategoryManagerHome.

The fact that Orion returns a CategoryManagerHome_StatelessSessionHomeWrapper3
rather than a CategoryManagerHome is expected; after all, the home is an
interface, not a class, and so cannot be instantiated.

Nick

At 11:14 AM 10/9/00 -0700, you wrote: 

 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
  






RE: getting EJB home from JSP

2000-10-11 Thread Jitendra Kothari

Hi Nick,

sorry i just (mis)typed out the equivalent of my code. Have
CategoryManagerHome on both sides of the expression ( the code compiles and
works fine for a test java client).

I can understand that Orion has some intermediate classes but it should
resolve to proper class when you look up the Home interface from the JNDI
which is not happening.

Another intresting thing is the intermediate class returned is __proxy3 for
a java client but sessionwrapper3 for a jsp client?

Thanks
Krishnan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nick Newman
Sent: Wednesday, October 11, 2000 7:49 AM
To: Orion-Interest
Subject: RE: getting EJB home from JSP


Hi Krishnan,

Is that REALLY your code?  If so, the problem is probably that you declare
the
variable on the left to be a CategoryHome, but the right hand side is a
CategoryManagerHome.

The fact that Orion returns a
CategoryManagerHome_StatelessSessionHomeWrapper3
rather than a CategoryManagerHome is expected; after all, the home is an
interface, not a class, and so cannot be instantiated.

Nick

At 11:14 AM 10/9/00 -0700, you wrote:

 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









RE: getting EJB home from JSP

2000-10-09 Thread Reddy Krishnan
Title: 



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 
  AMTo: Orion-InterestSubject: 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...
  
  CategoryManagerHomehome;
  
  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 - 
From: 
Jitendra 
Kothari 
To: Orion-Interest 
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.ClassCastExceptionat 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)at 
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
This isbecause Orionis returning some wrapper 
class instead of thehome.(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 



Re: getting EJB home from JSP

2000-10-09 Thread Al Fogleson
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 - 
  From: 
  Reddy Krishnan 
  To: Orion-Interest 
  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 AMTo: Orion-InterestSubject: 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...

CategoryManagerHomehome;

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 - 
  From: 
  Jitendra 
  Kothari 
  To: Orion-Interest 
  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.ClassCastExceptionat 
  com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)at 
  javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
  This isbecause Orionis returning some wrapper 
  class instead of 
  thehome.(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 
  


Re: getting EJB home from JSP

2000-10-08 Thread Al Fogleson
Title: 



The only time I have ever seen this is when I 
forgot to cast my PortableRemoteObject.narrow() call it should be something 
like...

CategoryManagerHomehome;

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 - 
  From: 
  Jitendra 
  Kothari 
  To: Orion-Interest 
  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.ClassCastExceptionat 
  com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)at 
  javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
  This isbecause Orionis returning some wrapper 
  class instead of thehome.(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