mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
#2424 Preserve using PersistenceException when transaction register(Callback) called with no active transaction
This commit is contained in:
1 parent
fcda419abb
commit
64108aac40
1 file changed
+1
-1
@@ -691,7 +691,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
|
||||
@Override
|
||||
public void register(TransactionCallback transactionCallback) {
|
||||
Transaction transaction = currentTransaction();
|
||||
Transaction transaction = transactionManager.active();
|
||||
if (transaction == null) {
|
||||
throw new PersistenceException("Not currently active transaction when trying to register transactionCallback");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user