/** * Get XA connection from the provided factory and wrap it with {@link ConnectionProxy}. * * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection() throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }
/** * Simply create a session with an XA connection if there is no active transaction. Or create a proxied session and register * it with an active transaction. * * @see SessionProxy * @see Connection#createSession(boolean, int) */ @Override public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException { if (transactionHelper.isTransactionAvailable()) { return createAndRegisterSession(); } return xaConnection.createSession(transacted, acknowledgeMode); }
/** * Simply create a session with an XA connection if there is no active transaction. Or create a proxied session and register * it with an active transaction. * * @see SessionProxy * @see Connection#createSession(boolean, int) */ @Override public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException { if (transactionHelper.isTransactionAvailable()) { return createAndRegisterSession(); } return xaConnection.createSession(transacted, acknowledgeMode); }
/** * Get XA connection from the provided factory and wrap it with {@link ConnectionProxy}. * * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection() throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }
/** * Simply create a session with an XA connection if there is no active transaction. Or create a proxied session and register * it with an active transaction. * * @see SessionProxy * @see Connection#createSession(boolean, int) */ @Override public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException { if (transactionHelper.isTransactionAvailable()) { return createAndRegisterSession(); } return xaConnection.createSession(transacted, acknowledgeMode); }
/** * Get XA connection from the provided factory and wrap it with {@link ConnectionProxy}. * * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection() throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }
/** * Get XA connection from the provided factory with credentials and wrap it with {@link ConnectionProxy}. * * @param userName * @param password * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection(String userName, String password) throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(userName, password), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }
/** * Get XA connection from the provided factory with credentials and wrap it with {@link ConnectionProxy}. * * @param userName * @param password * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection(String userName, String password) throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(userName, password), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }
/** * Get XA connection from the provided factory with credentials and wrap it with {@link ConnectionProxy}. * * @param userName * @param password * @return XA connection wrapped with {@link ConnectionProxy}. * @throws JMSException if failure occurred creating XA connection. */ @Override public Connection createConnection(String userName, String password) throws JMSException { Connection connection = new ConnectionProxy(xaConnectionFactory.createXAConnection(userName, password), transactionHelper); if (jtaLogger.logger.isTraceEnabled()) { jtaLogger.logger.trace("Created new proxied connection: " + connection); } return connection; }