@Override public void setExceptionListener(ExceptionListener listener) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } }
@Override public JMSContext createContext(int sessionMode) { boolean inJtaTx = inJtaTransaction(); int sessionModeToUse; switch (sessionMode) { case Session.AUTO_ACKNOWLEDGE: case Session.DUPS_OK_ACKNOWLEDGE: case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: case ActiveMQJMSConstants.PRE_ACKNOWLEDGE: sessionModeToUse = sessionMode; break; //these are prohibited in JEE unless not in a JTA tx where they should be ignored and auto_ack used case Session.CLIENT_ACKNOWLEDGE: if (!inJtaTx) { throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; case Session.SESSION_TRANSACTED: if (!inJtaTx) { throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; default: throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(sessionMode); } incrementRefCounter(); return new ActiveMQRAJMSContext(this, sessionModeToUse, threadAwareContext); }
throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntimeAllowLocal(); throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(acknowledgeMode);
public synchronized void init() throws ActiveMQException { if (initialized) return; if (password != null) { try { password = PasswordMaskingUtil.resolveMask(useMaskedPassword, password, passwordCodec); } catch (Exception e) { throw ActiveMQRABundle.BUNDLE.errorDecodingPassword(e); } } initialized = true; }
/** * 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(); }
} catch (Exception e) { if (destinationName == null) { throw ActiveMQRABundle.BUNDLE.noDestinationName();
@Override public JMSContext createContext(int sessionMode) { boolean inJtaTx = inJtaTransaction(); int sessionModeToUse; switch (sessionMode) { case Session.AUTO_ACKNOWLEDGE: case Session.DUPS_OK_ACKNOWLEDGE: case ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE: case ActiveMQJMSConstants.PRE_ACKNOWLEDGE: sessionModeToUse = sessionMode; break; //these are prohibited in JEE unless not in a JTA tx where they should be ignored and auto_ack used case Session.CLIENT_ACKNOWLEDGE: if (!inJtaTx) { throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; case Session.SESSION_TRANSACTED: if (!inJtaTx) { throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); } sessionModeToUse = Session.AUTO_ACKNOWLEDGE; break; default: throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(sessionMode); } incrementRefCounter(); return new ActiveMQRAJMSContext(this, sessionModeToUse, threadAwareContext); }
throw ActiveMQRABundle.BUNDLE.invalidClientAcknowledgeModeRuntime(); throw ActiveMQRABundle.BUNDLE.invalidSessionTransactedModeRuntimeAllowLocal(); throw ActiveMQRABundle.BUNDLE.invalidAcknowledgeMode(acknowledgeMode);
public synchronized void init() throws ActiveMQException { if (initialized) return; if (password != null) { try { password = PasswordMaskingUtil.resolveMask(useMaskedPassword, password, passwordCodec); } catch (Exception e) { throw ActiveMQRABundle.BUNDLE.errorDecodingPassword(e); } } initialized = true; }
/** * 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(); }
} catch (Exception e) { if (destinationName == null) { throw ActiveMQRABundle.BUNDLE.noDestinationName();
@Override public void setExceptionListener(ExceptionListener listener) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); } }
@Override public void stop() { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }
@Override public JMSContext createContext(int sessionMode) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }
@Override public void setClientID(String clientID) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }
@Override public JMSContext createContext(int sessionMode) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }
@Override public void setClientID(String clientID) { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }
@Override public void stop() { throw ActiveMQRABundle.BUNDLE.illegalJEEMethod(); }