Skip to content

Commit f8ca10a

Browse files
committed
we probably don't really need suspend()/resume() anymore
- table generators should work without it, though performance poor without a large enough block size - suspend/resume no longer used for temp table bulk operations - very doubtful that this is needed for reading JDBC metadata
1 parent f0823a2 commit f8ca10a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/JakartaStandardJtaPlatform.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import jakarta.transaction.TransactionSynchronizationRegistry;
1111
import jakarta.transaction.UserTransaction;
1212
import org.hibernate.Incubating;
13+
import org.jboss.logging.Logger;
1314

1415
import javax.transaction.xa.XAResource;
1516

@@ -30,6 +31,8 @@ public class JakartaStandardJtaPlatform extends AbstractJtaPlatform
3031
public static final String TRANSACTION_SYNCHRONIZATION_REGISTRY =
3132
"java:comp/TransactionSynchronizationRegistry";
3233

34+
private static final Logger LOG = Logger.getLogger( JakartaStandardJtaPlatform.class );
35+
3336
@Override
3437
protected TransactionManager locateTransactionManager() {
3538
return this;
@@ -100,12 +103,15 @@ public boolean enlistResource(XAResource xaRes) {
100103

101104
@Override
102105
public Transaction suspend() throws SystemException {
103-
throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
106+
LOG.debug( "Cannot really suspend (JakartaStandardJtaPlatform does not have access to the TransactionManager)" );
107+
return this;
108+
// throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
104109
}
105110

106111
@Override
107112
public void resume(Transaction tobj) {
108-
throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
113+
LOG.debug( "Cannot really resume (JakartaStandardJtaPlatform does not have access to the TransactionManager)" );
114+
// throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
109115
}
110116

111117
}

0 commit comments

Comments
 (0)