@Override public JChannel run() { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class<?> aClass = loader.loadClass(locatorClass); Object o = aClass.newInstance(); Method m = aClass.getMethod("locateChannel", new Class[]{String.class}); return (JChannel) m.invoke(o, name); } catch (Throwable e) { ActiveMQRALogger.LOGGER.debug(e.getMessage(), e); return null; } } });
@Override public JChannel run() { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class<?> aClass = loader.loadClass(locatorClass); Object o = aClass.newInstance(); Method m = aClass.getMethod("locateChannel", new Class[]{String.class}); return (JChannel) m.invoke(o, name); } catch (Throwable e) { ActiveMQRALogger.LOGGER.debug(e.getMessage(), e); return null; } } });
private void locateRecoveryRegistry() { String[] locatorClasses = RESOURCE_RECOVERY_CLASS_NAMES.split(";"); for (String locatorClasse : locatorClasses) { try { ServiceLoader<ActiveMQRegistry> sl = ServiceLoader.load(ActiveMQRegistry.class); if (sl.iterator().hasNext()) { registry = sl.iterator().next(); } else { registry = ActiveMQRegistryImpl.getInstance(); } } catch (Throwable e) { ActiveMQRALogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); } if (registry != null) { break; } } if (registry != null) { ActiveMQRALogger.LOGGER.debug("Recovery Registry located = " + registry); } }
private void locateRecoveryRegistry() { String[] locatorClasses = RESOURCE_RECOVERY_CLASS_NAMES.split(";"); for (String locatorClasse : locatorClasses) { try { ServiceLoader<ActiveMQRegistry> sl = ServiceLoader.load(ActiveMQRegistry.class); if (sl.iterator().hasNext()) { registry = sl.iterator().next(); } else { registry = ActiveMQRegistryImpl.getInstance(); } } catch (Throwable e) { ActiveMQRALogger.LOGGER.debug("unable to load recovery registry " + locatorClasse, e); } if (registry != null) { break; } } if (registry != null) { ActiveMQRALogger.LOGGER.debug("Recovery Registry located = " + registry); } }
public XARecoveryConfig register(ActiveMQConnectionFactory factory, String userName, String password, Map<String, String> properties) { ActiveMQRALogger.LOGGER.debug("registering recovery for factory : " + factory); XARecoveryConfig config = XARecoveryConfig.newConfig(factory, userName, password, properties); resources.add(config); if (registry != null) { registry.register(config); } return config; }
public XARecoveryConfig register(ActiveMQConnectionFactory factory, String userName, String password, Map<String, String> properties) { ActiveMQRALogger.LOGGER.debug("registering recovery for factory : " + factory); XARecoveryConfig config = XARecoveryConfig.newConfig(factory, userName, password, properties); resources.add(config); if (registry != null) { registry.register(config); } return config; }
/** * 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()); }
/** * 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()); }
entry.getValue().stop(); } catch (Exception ignored) { ActiveMQRALogger.LOGGER.debug("Ignored", ignored);
entry.getValue().stop(); } catch (Exception ignored) { ActiveMQRALogger.LOGGER.debug("Ignored", ignored);
ActiveMQRALogger.LOGGER.debug("Error closing session " + this, e);
ActiveMQRALogger.LOGGER.debug("Error closing session " + this, e);
ActiveMQRALogger.LOGGER.debug("Using queue connection " + result);
ActiveMQRALogger.LOGGER.debug("Using queue connection " + result);
ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for discovery=" + groupConfiguration); if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { tc = new TransportConfiguration(connectorClassName.get(i), connectionParams.get(i)); ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations));
ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for discovery=" + groupConfiguration); if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { tc = new TransportConfiguration(connectorClassName.get(i), connectionParams.get(i)); ActiveMQRALogger.LOGGER.debug("Creating Recovery Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations));
ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha); if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { tc = new TransportConfiguration(connectorClassName.get(i), connectionParams.get(i)); ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations) + " with ha=" + ha);
ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha); if (connectionParams == null || i >= connectionParams.size()) { tc = new TransportConfiguration(connectorClassName.get(i)); ActiveMQRALogger.LOGGER.debug("No connector params provided using default"); } else { tc = new TransportConfiguration(connectorClassName.get(i), connectionParams.get(i)); ActiveMQRALogger.LOGGER.debug("Creating Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations) + " with ha=" + ha);