public void authorize(boolean validateClientId) throws JMSException { try { initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0); if (clientID != null) { if (validateClientId) { validateClientID(initialSession, clientID); } else { initialSession.addMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } } addSessionMetaData(initialSession); initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromActiveMQException(me); } }
@Override public void setClientID(final String clientID) throws JMSException { checkClosed(); if (this.clientID != null) { throw new IllegalStateException("Client id has already been set"); } if (!justCreated) { throw new IllegalStateException("setClientID can only be called directly after the connection is created"); } validateClientID(initialSession, clientID); this.clientID = clientID; try { this.addSessionMetaData(initialSession); } catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); ex.initCause(e); throw ex; } justCreated = false; }
this.addSessionMetaData(session);
public void authorize(boolean validateClientId) throws JMSException { try { initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0); if (clientID != null) { if (validateClientId) { validateClientID(initialSession, clientID); } else { initialSession.addMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } } addSessionMetaData(initialSession); initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromActiveMQException(me); } }
public void authorize(boolean validateClientId) throws JMSException { try { initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0); if (clientID != null) { if (validateClientId) { validateClientID(initialSession, clientID); } else { initialSession.addMetaData(JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } } addSessionMetaData(initialSession); initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromActiveMQException(me); } }
public void authorize(boolean validateClientId) throws JMSException { try { initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0); if (clientID != null) { if (validateClientId) { validateClientID(initialSession, clientID); } else { initialSession.addMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } } addSessionMetaData(initialSession); initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromActiveMQException(me); } }
public void authorize(boolean validateClientId) throws JMSException { try { initialSession = sessionFactory.createSession(username, password, false, false, false, false, 0); if (clientID != null) { if (validateClientId) { validateClientID(initialSession, clientID); } else { initialSession.addMetaData(JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } } addSessionMetaData(initialSession); initialSession.addFailureListener(listener); initialSession.addFailoverListener(failoverListener); } catch (ActiveMQException me) { throw JMSExceptionHelper.convertFromActiveMQException(me); } }
@Override public void setClientID(final String clientID) throws JMSException { checkClosed(); if (this.clientID != null) { throw new IllegalStateException("Client id has already been set"); } if (!justCreated) { throw new IllegalStateException("setClientID can only be called directly after the connection is created"); } try { validateClientID(initialSession, clientID); this.clientID = clientID; this.addSessionMetaData(initialSession); } catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); ex.initCause(e); throw ex; } justCreated = false; }
@Override public void setClientID(final String clientID) throws JMSException { checkClosed(); if (this.clientID != null) { throw new IllegalStateException("Client id has already been set"); } if (!justCreated) { throw new IllegalStateException("setClientID can only be called directly after the connection is created"); } validateClientID(initialSession, clientID); this.clientID = clientID; try { this.addSessionMetaData(initialSession); } catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); ex.initCause(e); throw ex; } justCreated = false; }
@Override public void setClientID(final String clientID) throws JMSException { checkClosed(); if (this.clientID != null) { throw new IllegalStateException("Client id has already been set"); } if (!justCreated) { throw new IllegalStateException("setClientID can only be called directly after the connection is created"); } validateClientID(initialSession, clientID); this.clientID = clientID; try { this.addSessionMetaData(initialSession); } catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); ex.initCause(e); throw ex; } justCreated = false; }
@Override public void setClientID(final String clientID) throws JMSException { checkClosed(); if (this.clientID != null) { throw new IllegalStateException("Client id has already been set"); } if (!justCreated) { throw new IllegalStateException("setClientID can only be called directly after the connection is created"); } try { validateClientID(initialSession, clientID); this.clientID = clientID; this.addSessionMetaData(initialSession); } catch (ActiveMQException e) { JMSException ex = new JMSException("Internal error setting metadata jms-client-id"); ex.setLinkedException(e); ex.initCause(e); throw ex; } justCreated = false; }
this.addSessionMetaData(session);
this.addSessionMetaData(session);
this.addSessionMetaData(session);