Java Code Examples for javax.jdo.Transaction#setIsolationLevel()

The following examples show how to use javax.jdo.Transaction#setIsolationLevel() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultJdoDialect.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This implementation invokes the standard JDO {@link Transaction#begin()}
 * method and also {@link Transaction#setIsolationLevel(String)} if necessary.
 * @see javax.jdo.Transaction#begin
 * @see org.springframework.transaction.InvalidIsolationLevelException
 */
@Override
public Object beginTransaction(Transaction transaction, TransactionDefinition definition)
		throws JDOException, SQLException, TransactionException {

	String jdoIsolationLevel = getJdoIsolationLevel(definition);
	if (jdoIsolationLevel != null) {
		transaction.setIsolationLevel(jdoIsolationLevel);
	}
	transaction.begin();
	return null;
}
 
Example 2
Source File: DefaultJdoDialect.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * This implementation invokes the standard JDO {@link Transaction#begin()}
 * method and also {@link Transaction#setIsolationLevel(String)} if necessary.
 * @see javax.jdo.Transaction#begin
 * @see org.springframework.transaction.InvalidIsolationLevelException
 */
@Override
public Object beginTransaction(Transaction transaction, TransactionDefinition definition)
		throws JDOException, SQLException, TransactionException {

	String jdoIsolationLevel = getJdoIsolationLevel(definition);
	if (jdoIsolationLevel != null) {
		transaction.setIsolationLevel(jdoIsolationLevel);
	}
	transaction.begin();
	return null;
}