users@glassfish.java.net

Re: java.lang.IllegalStateException for Transaction

From: <glassfish_at_javadesktop.org>
Date: Tue, 01 Jul 2008 16:58:05 PDT

We don't use a UserTransaction.

This isn't the exact code, but it's close enough.
[code]
            txManager = (TransactionManager) new InitialContext().lookup("java:appserver/TransactionManager");
            Transaction tx = txManager.getTransaction();
            tx.registerSynchronization(this);
[/code]

The audit data is sent in a single object to the JMS queue, where an MDB processes and actually persists the audit data. We do this to throttle the audit information (it can get noisy), so the intent is to get the audit data persisted "out of band" of the normal transaction data. That's why we don't simply commit the audit data directly.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=283829