According to the JTA 1.1 specification, the registerInterposedSynchronization must throw an IllegalStateException if the no transaction is active ( http://java.sun.com/javaee/5/docs/api/javax/transaction/TransactionSynchronizationRegistry.html#registerInterposedSynchronization(javax.transaction.Synchronization) ). The current code throw a RuntimeException. It's a problem because some third party framework, like Spring, only catch RollbackException, SystemException and IllegalStateException.
It'll be great to modify the registerInterposedSynchronization method for throwing the expected exception.
I attach the corrected source file.