Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

how do we specify the max stateful beans in the pool

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to EJB 2.1 spec SFSB can be passivated after timeout. Try to play with container settings.
 
Pay attention! Tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic