Announcement Announcement Module
Collapse
No announcement yet.
EJB2 with ejbTimers (and transaction nightmare) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EJB2 with ejbTimers (and transaction nightmare)

    Hi,

    I have a SSB which implements the timedObject, and as such has an ejbTimeout method.
    Injected into this SSB (via spring) is a simple pojo which looks after opening a connection to jms queues, and in essence moves messages from 1 queue to the other with a bit of db action in between. This is called in the ejbTimeout method.

    I am trying to get this all to work in 1 XA transaction, but failing miserably.

    As the SSB is a timedObject, it requires a transaction setting to run, in this case RequiresNew. The SSB, once the pojo method has finished recreates the elapsed timer, so it will fire again in an interval.

    I have used the PlatformTransactionManager in the pojo and wrapped the code in a TransactionTemplate.

    However, I am getting a message about there being no JTA transaction, and as such NOTHING rolls back, db or queues.

    Any ideas? Apologies for the complexity....but its a challenge...

    Andy
Working...
X