File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Chaining stateless session beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Chaining stateless session beans" Watch "Chaining stateless session beans" New topic

Chaining stateless session beans

Ronak Shah

Joined: Jun 04, 2001
Posts: 3
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.
Paul Rhoades

Joined: Aug 01, 2002
Posts: 20
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...
I agree. Here's the link:
subject: Chaining stateless session beans
It's not a secret anymore!