/** * Get the topic session * * @return The topic session * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ TopicSession getTopicSessionInternal() throws JMSException { Session s = getSessionInternal(); if (!(s instanceof TopicSession)) { throw new InvalidDestinationException("Attempting to use TopicSession methods on: " + this); } return (TopicSession) s; }
/** * Get the queue session * * @return The queue session * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ QueueSession getQueueSessionInternal() throws JMSException { Session s = getSessionInternal(); if (!(s instanceof QueueSession)) { throw new InvalidDestinationException("Attempting to use QueueSession methods on: " + this); } return (QueueSession) s; }
/** * Get the queue session * * @return The queue session * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ QueueSession getQueueSessionInternal() throws JMSException { Session s = getSessionInternal(); if (!(s instanceof QueueSession)) { throw new InvalidDestinationException("Attempting to use QueueSession methods on: " + this); } return (QueueSession) s; }
/** * Get the topic session * * @return The topic session * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ TopicSession getTopicSessionInternal() throws JMSException { Session s = getSessionInternal(); if (!(s instanceof TopicSession)) { throw new InvalidDestinationException("Attempting to use TopicSession methods on: " + this); } return (TopicSession) s; }
/** * Create a text message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public TextMessage createTextMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createTextMessage" + session); } return session.createTextMessage(); }
/** * Create a text message * * @param string The text * @return The message * @throws JMSException Thrown if an error occurs */ @Override public TextMessage createTextMessage(final String string) throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createTextMessage(" + string + ")" + session); } return session.createTextMessage(string); }
/** * Create a text message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public TextMessage createTextMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createTextMessage" + session); } return session.createTextMessage(); }
/** * Returns the ID of the Node that this session is associated with. * * @return Node ID */ public String getNodeId() throws JMSException { ActiveMQSession session = (ActiveMQSession) getSessionInternal(); ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal) session.getCoreSession().getSessionFactory(); return factory.getLiveNodeId(); }
/** * Returns the ID of the Node that this session is associated with. * * @return Node ID */ public String getNodeId() throws JMSException { ActiveMQSession session = (ActiveMQSession) getSessionInternal(); ClientSessionFactoryInternal factory = (ClientSessionFactoryInternal) session.getCoreSession().getSessionFactory(); return factory.getLiveNodeId(); }
/** * Create a stream message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public StreamMessage createStreamMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createStreamMessage" + session); } return session.createStreamMessage(); }
/** * Create a map message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public MapMessage createMapMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createMapMessage(), " + session); } return session.createMapMessage(); }
/** * Create an object message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public ObjectMessage createObjectMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createObjectMessage" + session); } return session.createObjectMessage(); }
/** * Get the acknowledge mode * * @return The mode * @throws JMSException Thrown if an error occurs */ @Override public int getAcknowledgeMode() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } getSessionInternal(); return cri.getAcknowledgeMode(); }
/** * Create an object message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public ObjectMessage createObjectMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createObjectMessage" + session); } return session.createObjectMessage(); }
/** * Get the acknowledge mode * * @return The mode * @throws JMSException Thrown if an error occurs */ @Override public int getAcknowledgeMode() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); } getSessionInternal(); return cri.getAcknowledgeMode(); }
/** * Create a message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public Message createMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createMessage" + session); } return session.createMessage(); }
/** * Get transacted * * @return True if transacted; otherwise false * @throws JMSException Thrown if an error occurs */ @Override public boolean getTransacted() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getTransacted()"); } getSessionInternal(); return cri.isTransacted(); }
/** * Create a bytes message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public BytesMessage createBytesMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createBytesMessage" + session); } return session.createBytesMessage(); }
/** * Create a message * * @return The message * @throws JMSException Thrown if an error occurs */ @Override public Message createMessage() throws JMSException { Session session = getSessionInternal(); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createMessage" + session); } return session.createMessage(); }
/** * Get transacted * * @return True if transacted; otherwise false * @throws JMSException Thrown if an error occurs */ @Override public boolean getTransacted() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getTransacted()"); } getSessionInternal(); return cri.isTransacted(); }