File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes how do we specify the max stateful beans in the pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how do we specify the max stateful beans in the pool" Watch "how do we specify the max stateful beans in the pool" New topic
Author

how do we specify the max stateful beans in the pool

Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
Hi,
i am trying the simulate the scenario where ejbActivate() and ejbPassivate() would be triggered.i am using weblogic8.1.
my weblogic-ejb-jar.xml goes like this.

<weblogic-ejb-jar>
<weblogic-enterprise-bean >
<ejb-name>Second</ejb-name>
<stateful-session-descriptor>
<stateful-session-cache>
<max-beans-in-cache>2</max-beans-in-cache>
</stateful-session-cache>
</stateful-session-descriptor>
<jndi-name>myEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

And i am creating the remote objects thrice.As per my descriptor(the max bean in the pool is 2),passivation must happen.
But that is not happening.


when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Actually stateful Session Beans are not pooled, the exist only for one client. So when the client first looks up a Stateful bean, one gets created, not taken from any pool, and when the client is finished the bean gets destroyed.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Georgy Bolyuba
Ranch Hand

Joined: Feb 18, 2005
Posts: 162
According to EJB 2.1 spec SFSB can be passivated after timeout. Try to play with container settings.


SCJP 1.4 (100%) Done.<br />SCJD (URLyBird 1.2.3 Started)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do we specify the max stateful beans in the pool
 
Similar Threads
EJB Passivate and EJB Remove for stateful Bean are not called by weblogic
Why ejbPassivate and ejbRemove are not called by weblogic container?
Seting instance pool limit for stateful session bean
How to simulate stateful session bean program on weblogic server?
Restricting number of stateful session beans