/** * Endpoint activation * * @param endpointFactory The endpoint factory * @param spec The activation spec * @throws ResourceException Thrown if an error occurs */ @Override public void endpointActivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) throws ResourceException { if (spec == null) { throw ActiveMQRABundle.BUNDLE.noActivationSpec(); } if (!configured.getAndSet(true)) { try { setup(); } catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); } } if (logger.isTraceEnabled()) { logger.trace("endpointActivation(" + endpointFactory + ", " + spec + ")"); } ActiveMQActivation activation = new ActiveMQActivation(this, endpointFactory, (ActiveMQActivationSpec) spec); activations.put(spec, activation); activation.start(); }
/** * Endpoint activation * * @param endpointFactory The endpoint factory * @param spec The activation spec * @throws ResourceException Thrown if an error occurs */ @Override public void endpointActivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) throws ResourceException { if (spec == null) { throw ActiveMQRABundle.BUNDLE.noActivationSpec(); } if (!configured.getAndSet(true)) { try { setup(); } catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); } } if (logger.isTraceEnabled()) { logger.trace("endpointActivation(" + endpointFactory + ", " + spec + ")"); } ActiveMQActivation activation = new ActiveMQActivation(this, endpointFactory, (ActiveMQActivationSpec) spec); activations.put(spec, activation); activation.start(); }