
com.oneandone.ejbcdiunit.EjbUnitTransactionServices Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ejb-cdi-unit Show documentation
Show all versions of ejb-cdi-unit Show documentation
A module that can be used together with cdiunit to build en ejb-test-environment.
The newest version!
package com.oneandone.ejbcdiunit;
import javax.transaction.Synchronization;
import javax.transaction.UserTransaction;
import org.jboss.weld.transaction.spi.TransactionServices;
import com.oneandone.ejbcdiunit.persistence.SimulatedTransactionManager;
import com.oneandone.ejbcdiunit.resourcesimulators.SimulatedUserTransaction;
/**
* @author aschoerk
*/
public class EjbUnitTransactionServices implements TransactionServices {
@Override
public void registerSynchronization(Synchronization synchronization) {
new SimulatedTransactionManager().registerSynchronisation(synchronization);
}
@Override
public boolean isTransactionActive() {
return false;
}
@Override
public UserTransaction getUserTransaction() {
return new SimulatedUserTransaction();
}
@Override
public void cleanup() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy