[jboss-user] [Beginner's Corner] New message: "How to limit the stateful SB pool size?"

Tony Bryan do-not-reply at jboss.com
Thu Jan 14 02:42:40 EST 2010

User development,

A new message was posted in the thread "How to limit the stateful SB pool size?":


Author  : Tony Bryan
Profile : http://community.jboss.org/people/tonybryan

I'm trying to pick up the basics of EJB3 and JBoss.  I'm following a tutorial that demonstrates the stateful session bean lifecycle, forcing passivation and activation, by limiting the pool of stateful session beans to one less than the number in use.
How is this achieved?  With EJB3, can I write a +jboss.xml+ file as follows?

     <enterprise-beans >
               <configuration-name>Limited Poolsize Stateful SessionBean</configuration-name>
     <container-configurations >
          <container-configuration extends=+"Standard Stateful SessionBean"+>
               <container-name>Limited Poolsize Stateful SessionBean</container-name>
 If I deploy the bean with this jboss.xml file in the META-INF folder then the bean works but does not passivate and activate.  Is my +jboss.xml+ file correct?  Do I need to deploy it somewhere else?
I found this post online:  http://community.jboss.org/message/515942#515942
If I follow the direction in this post, to instead modify the +ejb3-interceptors-aop.xml+ file, then I get the desired result, but this method is more complex and I haven't read anything that says EJB3 doesn't suppor the jboss.xml file.
Can anyone confirm the simplest way to limit the pool of stateful session beans, both generically, and on a per bean class basis?


To reply to this message visit the message page: http://community.jboss.org/message/519955#519955

More information about the jboss-user mailing list