/** * Constructor * * @param mcf The managed connection factory * @param cm The connection manager * @param type The connection type */ public ActiveMQRASessionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm, final TransactionManager tm, final int type) { this.mcf = mcf; this.tm = tm; if (cm == null) { this.cm = new ActiveMQRAConnectionManager(); } else { this.cm = cm; } this.type = type; if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ", " + type); } }
@Override @After public void tearDown() throws Exception { DummyTransactionManager.tm.tx = null; if (resourceAdapter != null) { resourceAdapter.stop(); } qraConnectionManager.stop(); super.tearDown(); }
@Override @After public void tearDown() throws Exception { if (resourceAdapter != null) { resourceAdapter.stop(); } qraConnectionManager.stop(); super.tearDown(); }
/** * Creates a Connection Factory instance * * @return javax.resource.cci.ConnectionFactory instance * @throws ResourceException Thrown if a connection factory can't be created */ @Override public Object createConnectionFactory() throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.debug("createConnectionFactory()"); } return createConnectionFactory(new ActiveMQRAConnectionManager()); }
@Override @After public void tearDown() throws Exception { ((DummyTransactionManager) ServiceUtils.getTransactionManager()).tx = null; if (resourceAdapter != null) { resourceAdapter.stop(); } qraConnectionManager.stop(); super.tearDown(); }
/** * Constructor * * @param mcf The managed connection factory * @param cm The connection manager * @param type The connection type */ public ActiveMQRASessionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm, final TransactionManager tm, final int type) { this.mcf = mcf; this.tm = tm; if (cm == null) { this.cm = new ActiveMQRAConnectionManager(); } else { this.cm = cm; } this.type = type; if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ", " + type); } }
@Override @After public void tearDown() throws Exception { ((DummyTransactionManager) ServiceUtils.getTransactionManager()).tx = null; if (resourceAdapter != null) { resourceAdapter.stop(); } qraConnectionManager.stop(); super.tearDown(); }
/** * Creates a Connection Factory instance * * @return javax.resource.cci.ConnectionFactory instance * @throws ResourceException Thrown if a connection factory can't be created */ @Override public Object createConnectionFactory() throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.debug("createConnectionFactory()"); } return createConnectionFactory(new ActiveMQRAConnectionManager()); }
@Override @After public void tearDown() throws Exception { ((DummyTransactionManager) ServiceUtils.getTransactionManager()).tx = null; if (resourceAdapter != null) { resourceAdapter.stop(); } qraConnectionManager.stop(); super.tearDown(); }
/** * Constructor * * @param mcf The managed connection factory * @param cm The connection manager */ public ActiveMQRAConnectionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm) { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ")"); } this.mcf = mcf; if (cm == null) { // This is standalone usage, no appserver this.cm = new ActiveMQRAConnectionManager(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Created new ConnectionManager=" + this.cm); } } else { this.cm = cm; } if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm); } }
/** * Constructor * * @param mcf The managed connection factory * @param cm The connection manager */ public ActiveMQRAConnectionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm) { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("constructor(" + mcf + ", " + cm + ")"); } this.mcf = mcf; if (cm == null) { // This is standalone usage, no appserver this.cm = new ActiveMQRAConnectionManager(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Created new ConnectionManager=" + this.cm); } } else { this.cm = cm; } if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm); } }
MyBootstrapContext ctx = new MyBootstrapContext(); qResourceAdapter.start(ctx); ActiveMQRAConnectionManager qraConnectionManager = new ActiveMQRAConnectionManager(); ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(qResourceAdapter);
MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); ActiveMQRAConnectionManager qraConnectionManager = new ActiveMQRAConnectionManager(); ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter);
MyBootstrapContext ctx = new MyBootstrapContext(); resourceAdapter.start(ctx); ActiveMQRAConnectionManager qraConnectionManager = new ActiveMQRAConnectionManager(); ActiveMQRAManagedConnectionFactory mcf = new ActiveMQRAManagedConnectionFactory(); mcf.setResourceAdapter(resourceAdapter);