1 Reply Latest reply on Mar 4, 2008 1:08 PM by Izak van Langevelde

    TimerService in Transaction?

    Izak van Langevelde Newbie

      I'm stuck on the following: I have two message-driven beans MDB1 and MDB2 connected through two JMS queues (each MDB has its own queue). MDB uses a timer service to poll a database every now and then. Both beans have Container as its transaction type, with transaction attribute Required for their method onMessage.

      Whenever I happen to erroneously create a second timer for MDB2, I see that new instances of MDB2 are created (I'm logging the ejbCreate method) which finally hog my server, bringing it to a grinding halt.

      I suspect duplicate MDB2 beans are created though transaction rollback, but as I don't see any other error messages, I'm completely clueless.

      Also, I'd like to associate one single timer with MDB2, but I cannot seem to create it in the ejbCreate method. What is the standard approach here?

      Any help is appreciated...