Skip to content

Commit 4236a7f

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 41616b6 commit 4236a7f

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
@@ -14,6 +14,7 @@
1414
import jakarta.transaction.TransactionSynchronizationRegistry;
1515
import jakarta.transaction.UserTransaction;
1616
import org.hibernate.Incubating;
17+
import org.jboss.logging.Logger;
1718

1819
import javax.transaction.xa.XAResource;
1920

@@ -34,6 +35,8 @@ public class JakartaStandardJtaPlatform extends AbstractJtaPlatform
3435
public static final String TRANSACTION_SYNCHRONIZATION_REGISTRY =
3536
"java:comp/TransactionSynchronizationRegistry";
3637

38+
private static final Logger LOG = Logger.getLogger( JakartaStandardJtaPlatform.class );
39+
3740
@Override
3841
protected TransactionManager locateTransactionManager() {
3942
return this;
@@ -104,12 +107,15 @@ public boolean enlistResource(XAResource xaRes) {
104107

105108
@Override
106109
public Transaction suspend() throws SystemException {
107-
throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
110+
LOG.debug( "Cannot really suspend (JakartaStandardJtaPlatform does not have access to the TransactionManager)" );
111+
return this;
112+
// throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
108113
}
109114

110115
@Override
111116
public void resume(Transaction tobj) {
112-
throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
117+
LOG.debug( "Cannot really resume (JakartaStandardJtaPlatform does not have access to the TransactionManager)" );
118+
// throw new UnsupportedOperationException( "JakartaStandardJtaPlatform does not have access to the TransactionManager" );
113119
}
114120

115121
}

0 commit comments

Comments
 (0)