I think I have found a serious bug in the code where beans are not correctly recycled. However, I do not know/understand all the details of how this is implemented in JBoss, so I would like to ask this to the person responsible for the MDB container to take a look at this.

My test case is very simple, on JBoss 3.2.0b3 I have this code:

public class OutgoingQueueHandlerBean implements MessageDrivenBean, MessageListener
{
private Logger mLogger;

private static int count = 0;

public void setMessageDrivenContext(MessageDrivenContext context)
{
mLogger = Logger.getLogger(this.getClass().getName());
}

public void ejbCreate()
{
mLogger.info("ejbCreate; count = " + ++count);
}

public void ejbRemove()
{
mLogger.info("ejbRemove; count = " + --count);
}

public void onMessage(Message message)
{
...
}
}

When I feed this MDB say 5000 messages, the counter goes up to 243. This is odd since this is a standard JBoss install, which has a MDB pool size of 100. Also, ejbRemove is *never* called. This leads to resource exhaustion since all my MDBs also connect to other beans or queues.

Can someone verify this behaviour?

Stefan



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to