Hello,

I have an MDB that does a lookup on a stateless session bean, calls some method 
on the session bean and returns. The MDB and the SLSB are running in the same 
EJB container.

However, everytime an MDB looks up the SLSB, a new instance of the bean is 
created instead of using the available beans.

I have observed this using the jmx-console application running in JBoss. By 
choosing the SLSB (JMX Bean View) and observing the Available Count, Create 
Count and Current Size properties.

I am seeing that even when the beans are available, every lookup request from 
the MDB is resulting in a new bean getting created. (Also the bean creation 
does not obey the MaxSize property).

On a side note, I don't see this behavior when one SLSB looks up another SLSB. 
The beans are re-used in this case.

Is there a particular way to consume SLSBs from MDBs? Do I have to explicitly 
release them?

Any help would be appreciated.

JBoss 5.0.0.0CR2
RHEL4 & Windows XP

Thanks,

Shreyas

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206778#4206778

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206778
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to