Yes, I had the same problem before.

If you step through your code. You will see that the enumeration is actually
a class of _EJBObject_Stub or _YOurEJB_Stub. You need to do another 'narrow'
to get the EJB Object. Try the following:

MyEjb myEjb = (MyEjb)javax.rmi.PortableObject.narrow((org.omg.CORBA.Object)
stubObject, MyEjb.class)

Hope this works.

Andy


-----Original Message-----
From: Sharan, Abhishek [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 12:55 PM
To: [EMAIL PROTECTED]
Subject: Class cast expection problem during finder methods


Hi All
 i am facing a very typical yet strange problem.


Scenario
-----------
 in the websphere test environment in VAge

Inside Servlet ,a finder method is invoked say findByUserID which returns
Enumeration of RemoteReferneces to entitybean.
 at the ejb layer the enumeration is being constructed properly( confirmed
through using VAge Debugger).

when the enumeration is recieved at servlet end and we try to reterive
remoteref from enumeration by casting it to appropraite remoteRef class.
 ClassCastException is thrown.


Enironment
------------------
Win NT workstation 4.0
Visual Age Enterprise Edition 3.0


anybody faced similiar problem.
any pointer/help is very much apprecaited

Thank you
Abhishek Sharan

===========================================================================
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