Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic