S2Tx provides the automatic transaction management by using Aspect for POJOs. You can use the transaction management that the EJB container offers without adding the code to POJOs. Showing as follows is a transaction attribute offered with S2tx.
If the method's caller is already part of a transaction, it does not create a new transaction, but continues in the same transaction as its caller. If the caller is not in a transaction, a new transaction is created.
RequiresNew
j2ee.requiresNewTx
A new transaction is created always, regardless of the transactional state of the caller. If the caller was operating in a transaction, its transaction is suspended until the method completes.
Mandatory
j2ee.mandatoryTx
The method will not even start unless its caller is in a transaction. It will throw a Exception instead.
J2ee.dicon file is in S2(under src directory). You only specify the component name of Advice for the body of the aspect tag. Thus, it is very easy to manage the transaction with POJO by using S2tx.