|
![]() |
SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
Suman A Sarker<br />SCJP, SCWCD, SCBCD<br /> <br />If You Can't Beat Them ... Join Them!
Originally posted by Suman Sarker:
Hi Georg,
I think you have to cast it right. so, instead of doing
student = (StudentBeanLocalHome)ctx.lookup("StudentBean");
do the following
student = (StudentBean)ctx.lookup("StudentBean");
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Suman A Sarker<br />SCJP, SCWCD, SCBCD<br /> <br />If You Can't Beat Them ... Join Them!
SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
Originally posted by Georg Joo:
If I make the cast to the remote-home, it is ok (in a JSP File).
But I need the local-home (for create) to add the student to the class.
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
Context ctx = new InitialContext();
StudentBeanLocalHome student = (StudentBeanLocalHome) ctx.lookup("StudentBean");
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria