2 Replies Latest reply on Jul 5, 2011 12:45 PM by jova73

    Terminate EJB execution

    jova73

      Hi,

      I have a J2EE application (with EJB 2.0) running on JBoss 3.2.1 and 4.2.2: is there the possibility to terminate the execution of an EJB?

       

      My problem comes from SQL queries, executed from the EJB, that can take too much time to execute so I want to give to the user the possibility to terminate the execution.

       

      I've seen in the forums answers related to using asynchronous invocations but I would like not to change the architecture of the application (all the requests are synchronous), so I'm looking for the way to terminate an EJB.

       

      Thanks in advance,

      Andrea

        • 1. Re: Terminate EJB execution
          wdfink

          Hi Andrea,

          no, there is no way to interrupt the EJB, also the SQL statement will not interrupted (in case of Oracle I'm sure) if the connection is closed!

           

          You have the possibillity with a async. call e.g. MDB or you might call the EJB in a different thread to handle the GUI different.

          • 2. Re: Terminate EJB execution
            jova73

            Hi Wolf-Dieter,

            thank you very much for your reply.

             

            Andrea