@ Override public TransactionSupportLevel getTransactionSupport ( ) { // If ManagedConnectionFactory implements TransactionSupport, that takes priority TransactionSupportLevel transactionSupport = mcf instanceof TransactionSupport ? ( ( TransactionSupport ) mcf ) . getTransactionSupport ( ) : null ; // Otherwise get the value from the deployment descriptor String prop = ( String ) bootstrapContextRef . getReference ( ) . getProperty ( TRANSACTION_SUPPORT ) ; if ( prop != null ) { TransactionSupportLevel ddTransactionSupport = TransactionSupportLevel . valueOf ( prop ) ; if ( transactionSupport == null ) transactionSupport = ddTransactionSupport ; else if ( transactionSupport . ordinal ( ) > ddTransactionSupport . ordinal ( ) ) throw new IllegalArgumentException ( ManagedConnectionFactory . class . getName ( ) + ' ' + transactionSupport + ", " + Connector . class . getName ( ) + ' ' + ddTransactionSupport ) ; } if ( connectionFactoryTransactionSupport != null ) { if ( connectionFactoryTransactionSupport . ordinal ( ) > transactionSupport . ordinal ( ) ) throw new IllegalArgumentException ( ManagedConnectionFactory . class . getName ( ) + ' ' + transactionSupport + ", " + Connector . class . getName ( ) + ' ' + connectionFactoryTransactionSupport ) ; else transactionSupport = connectionFactoryTransactionSupport ; } // Otherwise choose NoTransaction return transactionSupport == null ? TransactionSupportLevel . NoTransaction : transactionSupport ; }
Indicates the level of transaction support .