OK guys, I need to know if this is ok in WebLogic. Essentially I'm using a member variable in a stateless session bean to store a remote interface to another stateless session bean. I have a feeling that the container could remove the bean implementation, and the UserAdmin bean would throw an EJBException. Will WebLogic's remote stubs automatically plug in another implementation? I've left out most of the code, but the important bits are:
The code hasn't caused any problems, even under load, but I didn't think I could do this. Thanks, Ronak
Hmm, that's a tricky one, it depends on how you've configured your instance pools, whether you call ejbRemove and when WebLogic calls ejbRemove. The problem is that if WebLogic decides that a UserAdminBean can be removed from it's instance pool (because it's not being used) then I don't know if it will remove the PM bean as well. You could end up with the PM instance pool being depleted (because you keep doing ejbCreate's each time you get a UserAdminBean that has been removed). I don't know if WebLogic calls ejbRemove on PM automatically upon doing ejbRemove on UserAdminBean, you could call it explicitly I guess... Hope this makes sense and helps... P.