class TransactionStrategyProvider implements StrategyProvider<TransactionStrategyExecutor> {

    @Override
    public TransactionStrategyExecutor rollbackStrategy() {
        return new TransactionStrategyExecutor() {

            @Override
            public void begin() {
                tx.begin();
            }

            @Override
            public void commit() {
                if (tx.isActive()) {
                    tx.rollback();
                }
            }
        };
    }

      TransactionStrategyProvider(final EntityTransaction tx);

}