@Initialize public void intitialize() { if(datasourceJndi == null) { datasourceJndi = name; } datasource = (DataSource) lookup(datasourceJndi); if(transactionManagerType == TransactionManagerType.JTA) { if(transactionJndi == null || transactionJndi.length() == 0) { throw new SmooksConfigurationException("The transactionJndi attribute must be set when the JTA transaction manager is set."); } //On JTA transaction manager then the autoCommit is always false autoCommit = false; } }
@Initialize public void intitialize() { if(datasourceJndi == null) { datasourceJndi = name; } datasource = (DataSource) lookup(datasourceJndi); if(transactionManagerType == TransactionManagerType.JTA) { if(transactionJndi == null || transactionJndi.length() == 0) { throw new SmooksConfigurationException("The transactionJndi attribute must be set when the JTA transaction manager is set."); } //On JTA transaction manager then the autoCommit is always false autoCommit = false; } }
@Initialize public void intitialize() { if(datasourceJndi == null) { datasourceJndi = name; } datasource = (DataSource) lookup(datasourceJndi); if(transactionManagerType == TransactionManagerType.JTA) { if(transactionJndi == null || transactionJndi.length() == 0) { throw new SmooksConfigurationException("The transactionJndi attribute must be set when the JTA transaction manager is set."); } //On JTA transaction manager then the autoCommit is always false autoCommit = false; } }
@Initialize public void intitialize() { if(datasourceJndi == null) { datasourceJndi = name; } datasource = (DataSource) lookup(datasourceJndi); if(transactionManagerType == TransactionManagerType.JTA) { if(transactionJndi == null || transactionJndi.length() == 0) { throw new SmooksConfigurationException("The transactionJndi attribute must be set when the JTA transaction manager is set."); } //On JTA transaction manager then the autoCommit is always false autoCommit = false; } }
@Override public TransactionManager createTransactionManager(Connection connection) { switch(transactionManagerType) { case JDBC: return new JdbcTransactionManager(connection, isAutoCommit()); case JTA: return new JtaTransactionManager(connection, (UserTransaction)lookup(transactionJndi), setAutoCommitAllowed); case EXTERNAL: return new ExternalTransactionManager(connection, isAutoCommit(), setAutoCommitAllowed); default: throw new SmooksException("The TransactionManager type '" + transactionManagerType + "' is unknown. This is probably a bug!"); } } }
@Override public TransactionManager createTransactionManager(Connection connection) { switch(transactionManagerType) { case JDBC: return new JdbcTransactionManager(connection, isAutoCommit()); case JTA: return new JtaTransactionManager(connection, (UserTransaction)lookup(transactionJndi), setAutoCommitAllowed); case EXTERNAL: return new ExternalTransactionManager(connection, isAutoCommit(), setAutoCommitAllowed); default: throw new SmooksException("The TransactionManager type '" + transactionManagerType + "' is unknown. This is probably a bug!"); } } }
@Override public TransactionManager createTransactionManager(Connection connection) { switch(transactionManagerType) { case JDBC: return new JdbcTransactionManager(connection, isAutoCommit()); case JTA: return new JtaTransactionManager(connection, (UserTransaction)lookup(transactionJndi), setAutoCommitAllowed); case EXTERNAL: return new ExternalTransactionManager(connection, isAutoCommit(), setAutoCommitAllowed); default: throw new SmooksException("The TransactionManager type '" + transactionManagerType + "' is unknown. This is probably a bug!"); } } }
@Override public TransactionManager createTransactionManager(Connection connection) { switch(transactionManagerType) { case JDBC: return new JdbcTransactionManager(connection, isAutoCommit()); case JTA: return new JtaTransactionManager(connection, (UserTransaction)lookup(transactionJndi), setAutoCommitAllowed); case EXTERNAL: return new ExternalTransactionManager(connection, isAutoCommit(), setAutoCommitAllowed); default: throw new SmooksException("The TransactionManager type '" + transactionManagerType + "' is unknown. This is probably a bug!"); } } }