Hibernate ORM TransactionException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM TransactionException class.

This code example shows how to use the following methods:
			final JtaPlatform jtaPlatform = transactionCoordinator 
					.getTransactionContext() 
					.getTransactionEnvironment() 
					.getJtaPlatform(); 
			if ( jtaPlatform == null ) { 
				throw new TransactionException( "Unable to check transaction status" ); 
			} 
			if ( jtaPlatform.retrieveTransactionManager() != null ) { 
				return JtaStatusHelper.isActive( jtaPlatform.retrieveTransactionManager().getStatus() ); 
			} 
			else { 
				final UserTransaction ut = jtaPlatform.retrieveUserTransaction(); 
				return ut != null && JtaStatusHelper.isActive( ut ); 
			} 
		} 
		catch ( SystemException se ) { 
			throw new TransactionException( "Unable to check transaction status", se ); 
		} 
	} 
 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java