wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes InitialContext.lookup(string) different on Stateless and Stateful session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "InitialContext.lookup(string) different on Stateless and Stateful session bean" Watch "InitialContext.lookup(string) different on Stateless and Stateful session bean" New topic
Author

InitialContext.lookup(string) different on Stateless and Stateful session bean

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240

1) for the above code, if LogSearchRemote implementation bean is stateful, then

has no error, but if LogSearchRemote implementation bean is stateless, then exception
"$Proxy53 cannot be cast to hk.gov.ehr.service.tch.als.admin.logsearch.ejb.LogSearchRemote"
is thrown, why?
2) for stateful session bean, I find each time the

return different logSearchRemote implementation bean,
but if stateless session bean, each time the

return the same bean!!
why is this case? I expect stateless session bean should not keep state and each lookup should return a different implementation bean.


 
Consider Paul's rocket mass heater.
 
subject: InitialContext.lookup(string) different on Stateless and Stateful session bean
 
Similar Threads
not able to execute the ejb plz help!
jndi name in ejb3?
JNDI lookup problem from SessionBean
Application Client Naming Exception
Jboss5 EJB3 security just wouldn't work