4 Replies Latest reply on Oct 9, 2003 8:41 AM by cjz002

    catch container exception

    cjz002

      Hello, there,

      Is there any interface for an application to implement, so that when the container detects an exception, the application could be notified? I know JMS has an exception interface, what about the container? Anyway the container could notify an application?

      Thanks,
      -jz

        • 1. Re: catch container exception

          No standard mechanism.

          You could write your own interceptor, see the log interceptor
          that turns exceptions into the EJB spec specified exceptions.

          Regards,
          Adrian

          • 2. Re: catch container exception
            cjz002

            Thanks for your reply. Another question is if the DB is disconnectioned, and the JBoss container detect an exception and would be able to recover from the network disconnection, but when exactly the container be able to detect the error, is it as soon as the the network is down, or when an operation to access DB is performed.

            Thanks,
            -jz

            • 3. Re: catch container exception

              New Question == New Topic

              Please try to investigate things yourself rather getting everybody
              else to do your work.

              Regards,
              Adrian

              • 4. Re: catch container exception
                cjz002

                Thanks. I think I found the answer. The container does not detect the db disconnection without any operaiton, but JMS will detect it.

                Just wanted to confirm with the experts out there.

                Thanks,
                -jz