0 Replies Latest reply on Sep 6, 2010 11:43 AM by Christian Lorenz

    stop a running/hanging MDB/EJB instance

    Christian Lorenz Newbie

      Hi!

       

      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!

      CHRISTIAN