Hi,

I wanted to try out how RuntimeExceptions of Transactional-tagged methods in my service layer are handled by the Transaction Manager.

I assumed that the Transaction Manager rollbacks the transaction and propagates the Exception.

Here's my code:

// ... ServiceBean:

@Transactional
public synchronized void persistNewFileEntry(FileEntry fileEntry) {
fileEntryDao.insert(fileEntry);
throw new RuntimeException("test");
}


After the RuntimeException occurs, the Transaction Manager rolls back the Transaction as assumed.
But then the Service Layer method is executed again resulting in an inifinite loop.

Anyone an idea?


Many thx in advance.

rgds, thomas