public String toString() { return "Serializable Variable: " + this.getText(); }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); } }
public DroolsSpringJpaManager(Environment env) { this.env = env; this.emf = (EntityManagerFactory) env.get( EnvironmentName.ENTITY_MANAGER_FACTORY ); isJTA = true; Boolean bool = (Boolean) env.get("IS_JTA_TRANSACTION"); if (bool != null) { isJTA = bool.booleanValue(); } getApplicationScopedPersistenceContext(); // we create this on initialisation so that we own the EMF reference // otherwise Spring will close it after the transaction finishes }
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }
public boolean begin() { if( nestedTransactions || getStatus() != TransactionManager.STATUS_ACTIVE ) { try { currentTransaction.push(this.ptm.getTransaction( td )); return true; } catch ( Exception e ) { logger.warn( "Unable to begin transaction", e ); throw new RuntimeException( "Unable to begin transaction", e ); } } return false; }
public boolean begin() { try { if ( getStatus() == TransactionManager.STATUS_NO_TRANSACTION ) { // If there is no transaction then start one, we will commit within the same Command // it seems in spring calling getTransaction is enough to begin a new transaction currentTransaction = this.ptm.getTransaction( td ); return true; } else { return false; } } catch ( Exception e ) { logger.warn( "Unable to begin transaction", e ); throw new RuntimeException( "Unable to begin transaction", e ); } }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); } }
public DroolsSpringJpaManager(Environment env) { this.env = env; this.emf = (EntityManagerFactory) env.get( EnvironmentName.ENTITY_MANAGER_FACTORY ); isJTA = true; Boolean bool = (Boolean) env.get("IS_JTA_TRANSACTION"); if (bool != null) { isJTA = bool.booleanValue(); } getApplicationScopedPersistenceContext(); // we create this on initialisation so that we own the EMF reference // otherwise Spring will close it after the transaction finishes }
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }
public boolean begin() { if( nestedTransactions || getStatus() != TransactionManager.STATUS_ACTIVE ) { try { currentTransaction.push(this.ptm.getTransaction( td )); return true; } catch ( Exception e ) { logger.warn( "Unable to begin transaction", e ); throw new RuntimeException( "Unable to begin transaction", e ); } } return false; }
public boolean begin() { try { if ( getStatus() == TransactionManager.STATUS_NO_TRANSACTION ) { // If there is no transaction then start one, we will commit within the same Command // it seems in spring calling getTransaction is enough to begin a new transaction currentTransaction = this.ptm.getTransaction( td ); return true; } else { return false; } } catch ( Exception e ) { logger.warn( "Unable to begin transaction", e ); throw new RuntimeException( "Unable to begin transaction", e ); } }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); } }
public DroolsSpringJpaManager(Environment env) { this.env = env; this.emf = (EntityManagerFactory) env.get( EnvironmentName.ENTITY_MANAGER_FACTORY ); isJTA = true; Boolean bool = (Boolean) env.get("IS_JTA_TRANSACTION"); if (bool != null) { isJTA = bool.booleanValue(); } getApplicationScopedPersistenceContext(); // we create this on initialisation so that we own the EMF reference // otherwise Spring will close it after the transaction finishes }
public void endCommandScopedEntityManager() { if ( TransactionSynchronizationManager.hasResource( "cmdEM" ) ) { TransactionSynchronizationManager.unbindResource( "cmdEM" ); if ( this.env.get( EnvironmentName.CMD_SCOPED_ENTITY_MANAGER ) != null ) { getCommandScopedPersistenceContext().close(); } } }
public boolean begin() { if( nestedTransactions || getStatus() != TransactionManager.STATUS_ACTIVE ) { try { currentTransaction.push(this.ptm.getTransaction( td )); return true; } catch ( Exception e ) { logger.warn( "Unable to begin transaction", e ); throw new RuntimeException( "Unable to begin transaction", e ); } } return false; }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); } }
public void registerTransactionSynchronization(TransactionSynchronization ts) { TransactionSynchronizationManager.registerSynchronization( new SpringTransactionSynchronizationAdapter( ts ) ); }