Hello Friends
I am facing a problem in coding a jsp which has to contact a deployed ejb bean.
The bean has a JNDI Name as "authentication"
In the JSP Code , I have written the following lines:
*****************************************************
Context ct = new InitialContext(h);
Object obj = ct.lookup("authentication");
System.out.println("After the JNDI Lookup");
VinayHome home = (VinayHome)PortableRemoteObject.narrow(obj,VinayHome.class);
*****************************************************
Code is executed till the statement mentioned above
"After the JNDI Lookup"
After that line of code, when I am trying to type cast the object in to a HomeInterface , the message thrown on the server console is:
******************************
java.lang.ClassCastException
******************************
Is this a wrong way of communicating with the ejb bean?
Please help me out regarding this aspect.
Regards
RadhaKrishna
-
Unable to communicate with deployed component (3 messages)
- Posted by: Pendyala Radha Krishna
- Posted on: October 19 2000 09:07 EDT
Threaded Messages (3)
- Unable to communicate with deployed component by Vid Desibhatla on October 19 2000 10:26 EDT
- Unable to communicate with deployed component by Lawrence Manickam on October 19 2000 18:06 EDT
- Unable to communicate with deployed component by Pendyala Radha Krishna on October 19 2000 23:18 EDT
-
Unable to communicate with deployed component[ Go to top ]
- Posted by: Vid Desibhatla
- Posted on: October 19 2000 10:26 EDT
- in response to Pendyala Radha Krishna
Try this out
VinayHome home = (VinayHome) ctx.lookup("authentication");
VinayRemote VRemote = home.create(..);
VinayRemote is your remote interface.
This works for me.
-
Unable to communicate with deployed component[ Go to top ]
- Posted by: Lawrence Manickam
- Posted on: October 19 2000 18:06 EDT
- in response to Pendyala Radha Krishna
Radha,
Please visit
http://www.geocities.com/lawrence143/jsp.html
You have answer to your question:)
Thanks
Lawrence -
Unable to communicate with deployed component[ Go to top ]
- Posted by: Pendyala Radha Krishna
- Posted on: October 19 2000 23:18 EDT
- in response to Lawrence Manickam
Thanx a lot
I will follow the example cited at http://www.geocities.com/lawrence143/jsp.html in my program
Regards
RadhaKrishna