我有延長BaseRepository多個倉庫如下: public abstract class IsoRepository<T extends Serializable> {
@PersistenceContext
protected EntityManager entityManager;
public void persist(T obj) {
en
我有一個涉及全局事務的EJB。 有一部分代碼,如果失敗,我想顯式回滾,儘管我不希望整個事務失敗。 由於回滾在CMT禁止我創建了一個BMT,並試圖下面的代碼: connection.setAutoCommit(false);
Savepoint sp= connection.setSavepoint();
try{
//my code editing DB that could pos