[jboss-user] [EJB 3.0] - stop a running/hanging MDB/EJB instance

Christian Lorenz do-not-reply at jboss.com
Thu Sep 9 07:06:15 EDT 2010

Christian Lorenz [http://community.jboss.org/people/ChrLorenz] created the discussion

"stop a running/hanging MDB/EJB instance"

To view the discussion, visit: http://community.jboss.org/message/560636#560636


I'm developing an application which must download some files via HTTP/FTP. This is done by an MDB, which uses a specific client for the protocols (e.g. Java URLConnection, etc.). As this downloads are triggered periodically via JBoss TimerService I have a problem, if the connection hangs. Because in this case I get no Exception, the MDB will simply hang infinitely.

*Is there any way to stop a running MDB instance from outside (at best automatically by JBoss)?* Because I'm using the "@Pool"-annotation with "maxSize=5" to reduce the number of concurrent network connections, I'm out of available instances if some MDBs hang.

I've tried some ideas so far, but without success:
* "@TransactionTimeout(...)" respectively "@ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue = "...")": This stops the transaction indeed, but the MDB is still running and not released/destroyed.
* "@Pool(timeout=...)": But this only rejects new requests from execution.

I'm using EJB3 on JBoss 5.1.0 AS.

Thanks in advance!

Reply to this message by going to Community

Start a new discussion in EJB 3.0 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100909/afe15569/attachment.html 

More information about the jboss-user mailing list