• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless session bean in onMessage() of MDB

 
Anurag Bhatia
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Within the onMessage() of the MDB there are 2 stateless session beans which are called. These session beans are never removed from the memory even after the onMessage() has finished execution. Each new call to onMessage() cause a new stateless session bean to be created. Eventually the server crashes as it runs out of memory.

I am using ejb3 and jboss. Is there is some setting that missed out or is there something extra I need to do to make the session beans go back to the bean pool?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably this?
 
Anurag Bhatia
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaikiran Pai,

Your post heled me solve the issue. Looks there was an existing jira, the work around was to change -


<domain name="Stateless Bean">

<annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
@org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30,
timeout=10000)
</annotation>

to use strictMaxPool in the ejb3-aop-interceptors.xml

Thanks a lot for your help.

--Anurag
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!