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 Object pooling 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 "Object pooling" Watch "Object pooling" New topic

Object pooling

mohit joshi
Ranch Hand

Joined: Sep 23, 2000
Posts: 243
Why Doesnt Stateful Session beans use Object Pooling. I know that they are activated and passivated by saving the state, but why not have a pool of objects to avoid creating objects again and again, the way it is with Entity and Stateless session beans
mohit joshi
Ranch Hand

Joined: Sep 23, 2000
Posts: 243
I have another basic questions ( these pop up in your head when you read a book for the first time, and never again )
why dont we have something like RMI over HTTP or RMI over IIOP over HTTP, so that the firewalls can be tackled and we can have distributed transactions possible.
Sagar Sharma
Ranch Hand

Joined: Aug 31, 2000
Posts: 92
Stateful session beans maintain conversational state between subsequent method invocations by the same client. This makes the methods interdependent so that changes made by methods to the bean's state can affect the results of subsequent method invocations.
The difference between the Staeful and the Stateless session bean instance variable is that the instance fields of a stateless bean are not specific to one client.
So if we have object pooling for a stateful session bean then also there will be no meaning as we shall have to maintain the conversational state between method calls.

hope this helps

I agree. Here's the link:
subject: Object pooling
It's not a secret anymore!