3 Replies Latest reply on Dec 15, 2007 3:46 PM by Go Deeper

    EJB with infinite loop does not timeout

    EIA EIA Newbie

      Hi to all,

      I have an application which calls other Statless Session Beans, and i want that my application be independent and be protected against EJB which have high executions times.

      My application has the EJB reference which will call and tests if the execution time of an EJB exceeds a defined timeout. My code tests the duration of the execution and calls the remove() method of that EJB.

      What i saw is that the remove() method is called and returns, but the CPU usage of that EJB is not freed. Apparently the EJB is NOT removed and stopped by the Container.

      I have tested with an Stateless Session Bean which has a method that implements a infinite loop. So this EJB never returns.

      I need help in order to know how to signal the Container to stop this EJB and to freed the resources used by it.

      Thanks in advance for your help.


        • 1. Re: EJB with infinite loop does not timeout
          Daniel Celentano Newbie

          1) thinks in JMS for decouple APPs.
          2) SLSB not support @Remove. Remove is a SFSB event.


          • 2. Re: EJB with infinite loop does not timeout
            EIA EIA Newbie


            Thank you for your reply.

            I have found a solution for decouple my App with the SLSB, but i want a way to kill that SLSB that is consuming 100% of CPU. Is there a way to signal the JBoss to kill that instance that is not functioning well ?

            Because i am dependent of external SLSB which are on my JBoss, i need a way to kill those that are not responding for a large period of time.
            My tests used the TransactionManager to reduce the transaction timeout, but that did not result. The timeout has passed and the resources were not freed.

            Now i am trying to found a way of having the SLSB reference a put it a NULL in order to kill it, but that is not working as well.....

            I am becoming without solutions to solve this problem....

            • 3. Re: EJB with infinite loop does not timeout
              Go Deeper Newbie

              Hi eia,

              I am having similar problem with SLSB calls that takes too much time and memory resources that renders the entire server useless. Other than good programming and testing (alas!), any way to deal with such problem, in production system?

              Did you find solution to your problem? If so, can you share please? O/w, any workarounds?