This rule detects manual handling of transactions in SAP Commerce. This is error-prone and SAP commerce provides a reasonable alternative out of the box.

Noncompliant Code Example

	Transaction transaction = Transaction.current();
	transaction.begin();
	try {
	    // some stuff that might fail
	    transaction.commit();
	} catch (Exception e) {
	    transaction.rollback();
	    // handle the exception
	}

Compliant Solution

	Transaction transaction = Transaction.current();
	transaction.begin();
	Object result = null;
	try {
	    // some shifty stuff that might fail
	    result = transaction.execute(new TransactionBody() {
	        // do some stuff that might fail
	    });
	} catch (Exception e) {
	    // handle exception without transaction hustling.
	}