Class WmConnectionImpl

    • Field Detail

      • _started

        protected volatile java.util.concurrent.atomic.AtomicBoolean _started
      • _closed

        protected volatile boolean _closed
      • _closeInProgress

        protected volatile boolean _closeInProgress
      • _setClientIDProhibited

        protected volatile boolean _setClientIDProhibited
      • _logApi

        protected boolean _logApi
      • _username

        protected java.lang.String _username
      • _password

        protected java.lang.String _password
      • _accessLabelHint

        protected java.lang.String _accessLabelHint
      • _exceptionListener

        protected volatile javax.jms.ExceptionListener _exceptionListener
      • _clientID

        protected volatile java.lang.String _clientID
      • _sessions

        protected java.util.Vector<javax.jms.Session> _sessions
      • _uniqueID

        protected java.lang.String _uniqueID
      • _brokerURLs

        protected java.util.List _brokerURLs
      • _isXA

        public boolean _isXA
      • _isXACloseCalled

        public boolean _isXACloseCalled
      • _closeClusterConnection

        protected volatile boolean _closeClusterConnection
      • isSSLEnabled

        public boolean isSSLEnabled
      • _exceptionListenerCalledOnce

        protected volatile java.util.concurrent.atomic.AtomicBoolean _exceptionListenerCalledOnce
        A boolean to check whether the exception listener has been called.
    • Constructor Detail

      • WmConnectionImpl

        protected WmConnectionImpl​(WmConnectionFactoryImpl factory,
                                   java.lang.String username,
                                   java.lang.String password)
                            throws javax.jms.JMSException
        Constructor.
        Parameters:
        factory - the factory that created this connection
        username - the caller's user name
        password - the caller's password
        Throws:
        javax.jms.JMSException
      • WmConnectionImpl

        protected WmConnectionImpl​(WmConnectionFactoryImpl factory,
                                   java.lang.String username,
                                   java.lang.String password,
                                   java.lang.String accessLabelHint)
                            throws javax.jms.JMSException
        Constructor
        Parameters:
        factory -
        username -
        password -
        accessLabelHint -
        Throws:
        javax.jms.JMSException
      • WmConnectionImpl

        protected WmConnectionImpl()
        Called only by subclass constructors.
    • Method Detail

      • initConnection

        protected void initConnection​(boolean enableCluster)
                               throws javax.jms.JMSException
        Moved the initialization of out the constructor so subclasses can have a chance to override some of the behaviors.
        Throws:
        javax.jms.JMSException
      • createSession

        public javax.jms.Session createSession​(boolean transacted,
                                               int acknowledgeMode)
                                        throws javax.jms.JMSException
        Creates a Session object.
        Specified by:
        createSession in interface javax.jms.Connection
        Parameters:
        transacted - indicates whether the session is transacted
        acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
        Returns:
        a newly created session
        Throws:
        javax.jms.JMSException - if the Connection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
      • createXASession

        public javax.jms.XASession createXASession()
                                            throws javax.jms.JMSException
        Creates an XASession object.
        Returns:
        a newly created XASession
        Throws:
        javax.jms.JMSException - if the XAConnection object fails to create an XASession due to some internal error.
      • createTopicSession

        public javax.jms.TopicSession createTopicSession​(boolean transacted,
                                                         int acknowledgeMode)
                                                  throws javax.jms.JMSException
        Creates a TopicSession object.
        Parameters:
        transacted - indicates whether the session is transacted
        acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
        Returns:
        a newly created topic session
        Throws:
        javax.jms.JMSException - if the TopicConnection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
      • createXATopicSession

        public javax.jms.XATopicSession createXATopicSession()
                                                      throws javax.jms.JMSException
        Creates an XATopicSession object.
        Returns:
        a newly created XA topic session
        Throws:
        javax.jms.JMSException - if the XATopicConnection object fails to create an XA topic session due to some internal error.
      • createQueueSession

        public javax.jms.QueueSession createQueueSession​(boolean transacted,
                                                         int acknowledgeMode)
                                                  throws javax.jms.JMSException
        Creates a QueueSession object.
        Parameters:
        transacted - indicates whether the session is transacted
        acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
        Returns:
        a newly created queue session
        Throws:
        javax.jms.JMSException - if the QueueConnection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
      • createXAQueueSession

        public javax.jms.XAQueueSession createXAQueueSession()
                                                      throws javax.jms.JMSException
        Creates an XAQueueSession object.
        Returns:
        a newly created XAQueueSession
        Throws:
        javax.jms.JMSException - if the XAQueueConnection object fails to create an XA queue session due to some internal error.
      • getClientID

        public java.lang.String getClientID()
                                     throws javax.jms.JMSException
        Gets the client identifier for this connection.

        This value is specific to the JMS provider. It is either preconfigured by an administrator in a ConnectionFactory object or assigned dynamically by the application by calling the setClientID method.

        Specified by:
        getClientID in interface javax.jms.Connection
        Returns:
        the unique client identifier
        Throws:
        javax.jms.JMSException - if the JMS provider fails to return the client ID for this connection due to some internal error.
      • getClientIDUnsafe

        public java.lang.String getClientIDUnsafe()
        This is to obtain the clientID without any checkstate.
      • setClientID

        public void setClientID​(java.lang.String clientID)
                         throws javax.jms.JMSException
        Sets the client identifier for this connection.

        The preferred way to assign a JMS client's client identifier is for it to be configured in a client-specific ConnectionFactory object and transparently assigned to the Connection object it creates.

        Alternatively, a client can set a connection's client identifier using a provider-specific value. The facility to set a connection's client identifier explicitly is not a mechanism for overriding the identifier that has been administratively configured. It is provided for the case where no administratively specified identifier exists. If one does exist, an attempt to change it by setting it must throw an IllegalStateException. If a client sets the client identifier explicitly, it must do so immediately after it creates the connection and before any other action on the connection is taken. After this point, setting the client identifier is a programming error that should throw an IllegalStateException.

        The purpose of the client identifier is to associate a connection and its objects with a state maintained on behalf of the client by a provider. The only such state identified by the JMS API is that required to support durable subscriptions.

        If another connection with the same clientID is already running when this method is called, the JMS provider should detect the duplicate ID and throw an InvalidClientIDException.

        Specified by:
        setClientID in interface javax.jms.Connection
        Parameters:
        clientID - the unique client identifier
        Throws:
        javax.jms.JMSException - if the JMS provider fails to set the client ID for this connection due to some internal error.
        javax.jms.InvalidClientIDException - if the JMS client specifies an invalid or duplicate client ID.
        javax.jms.IllegalStateException - if the JMS client attempts to set a connection's client ID at the wrong time or when it has been administratively configured.
      • getMetaData

        public javax.jms.ConnectionMetaData getMetaData()
                                                 throws javax.jms.JMSException
        Gets the metadata for this connection.
        Specified by:
        getMetaData in interface javax.jms.Connection
        Returns:
        the connection metadata
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the connection metadata for this connection.
      • getExceptionListener

        public javax.jms.ExceptionListener getExceptionListener()
                                                         throws javax.jms.JMSException
        Gets the ExceptionListener object for this connection. Not every Connection has an ExceptionListener associated with it.
        Specified by:
        getExceptionListener in interface javax.jms.Connection
        Returns:
        the ExceptionListener for this connection, or null. if no ExceptionListener is associated with this connection.
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the ExceptionListener for this connection.
      • getNotificationListener

        public WmNotificationListener getNotificationListener()
                                                       throws javax.jms.JMSException
        Gets the NotificationListener object for this connection. Not every Connection has an NotificationListener associated with it.
        Returns:
        the NotificationListener for this connection, or null. if no NotificationListener is associated with this connection.
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the NotificationListener for this connection.
      • setExceptionListener

        public void setExceptionListener​(javax.jms.ExceptionListener listener)
                                  throws javax.jms.JMSException
        Sets an exception listener for this connection.

        If a JMS provider detects a serious problem with a connection, it informs the connection's ExceptionListener, if one has been registered. It does this by calling the listener's onException method, passing it a JMSException object describing the problem.

        An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn their connection has failed.

        A connection serializes execution of its ExceptionListener.

        A JMS provider should attempt to resolve connection problems itself before it notifies the client of them.

        Specified by:
        setExceptionListener in interface javax.jms.Connection
        Parameters:
        listener - the exception listener
        Throws:
        javax.jms.JMSException - if the JMS provider fails to set the exception listener for this connection.
      • setNotificationListener

        public void setNotificationListener​(WmNotificationListener listener)
                                     throws javax.jms.JMSException
        Sets an notification listener for this connection.

        An notification listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn their connection has failed.

        A connection serializes execution of its ExceptionListener.

        A JMS provider should attempt to resolve connection problems itself before it notifies the client of them.

        Parameters:
        listener - the exception listener
        Throws:
        javax.jms.JMSException - if the JMS provider fails to set the exception listener for this connection.
      • start

        public void start()
                   throws javax.jms.JMSException
        Starts (or restarts) a connection's delivery of incoming messages. A call to start on a connection that has already been started is ignored.
        Specified by:
        start in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to start message delivery due to some internal error.
      • stop

        public void stop()
                  throws javax.jms.JMSException
        Temporarily stops a connection's delivery of incoming messages. Delivery can be restarted using the connection's start method. When the connection is stopped, delivery to all the connection's message consumers is inhibited: synchronous receives block, and messages are not delivered to message listeners.

        This call blocks until receives and/or message listeners in progress have completed.

        Stopping a connection has no effect on its ability to send messages. A call to stop on a connection that has already been stopped is ignored.

        A call to stop must not return until delivery of messages has paused. This means that a client can rely on the fact that none of its message listeners will be called and that all threads of control waiting for receive calls to return will not return with a message until the connection is restarted. The receive timers for a stopped connection continue to advance, so receives may time out while the connection is stopped.

        If message listeners are running when stop is invoked, the stop call must wait until all of them have returned before it may return. While these message listeners are completing, they must have the full services of the connection available to them.

        Specified by:
        stop in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to stop message delivery due to some internal error.
      • markForClosure

        public void markForClosure​(boolean exceptionOccurred)
                            throws javax.jms.JMSException
        Marks the connection for closure.
        Throws:
        javax.jms.JMSException
      • close

        public void close()
                   throws javax.jms.JMSException
        Closes the connection.

        Since a provider typically allocates significant resources outside the JVM on behalf of a connection, clients should close these resources when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

        There is no need to close the sessions, producers, and consumers of a closed connection.

        Closing a connection causes all temporary destinations to be deleted.

        When this method is invoked, it should not return until message processing has been shut down in an orderly fashion. This means that all message listeners that may have been running have returned, and that all pending receives have returned. A close terminates all pending message receives on the connection's sessions' consumers. The receives may return with a message or with null, depending on whether there was a message available at the time of the close. If one or more of the connection's sessions' message listeners is processing a message at the time when connection close is invoked, all the facilities of the connection and its sessions must remain available to those listeners until they return control to the JMS provider.

        Closing a connection causes any of its sessions' transactions in progress to be rolled back. In the case where a session's work is coordinated by an external transaction manager, a session's commit and rollback methods are not used and the result of a closed session's work is determined later by the transaction manager. Closing a connection does NOT force an acknowledgment of client-acknowledged sessions.

        Invoking the acknowledge method of a received message from a closed connection's session must throw an IllegalStateException. Closing a closed connection must NOT throw an exception.

        Specified by:
        close in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to close the connection due to some internal error. For example, a failure to release resources or to close a socket connection can cause this exception to be thrown.
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Destination destination,
                                                                     java.lang.String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.
        Specified by:
        createConnectionConsumer in interface javax.jms.Connection
        Parameters:
        destination - the destination to access
        messageSelector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
        sessionPool - the server session pool to associate with this connection consumer
        maxMessages - the maximum number of messages that can be assigned to a server session at one time
        Returns:
        the connection consumer
        Throws:
        javax.jms.JMSException - if the Connection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
        javax.jms.InvalidDestinationException - if an invalid destination is specified.
        javax.jms.InvalidSelectorException - if the message selector is invalid.
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Topic topic,
                                                                     java.lang.String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.
        Parameters:
        topic - the topic to access
        messageSelector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
        sessionPool - the server session pool to associate with this connection consumer
        maxMessages - the maximum number of messages that can be assigned to a server session at one time
        Returns:
        the connection consumer
        Throws:
        javax.jms.JMSException - if the TopicConnection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
        javax.jms.InvalidDestinationException - if an invalid topic is specified.
        javax.jms.InvalidSelectorException - if the message selector is invalid.
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Queue queue,
                                                                     java.lang.String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.
        Parameters:
        queue - the queue to access
        messageSelector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
        sessionPool - the server session pool to associate with this connection consumer
        maxMessages - the maximum number of messages that can be assigned to a server session at one time
        Returns:
        the connection consumer
        Throws:
        javax.jms.JMSException - if the QueueConnection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
        javax.jms.InvalidDestinationException - if an invalid queue is specified.
        javax.jms.InvalidSelectorException - if the message selector is invalid.
      • createDurableConnectionConsumer

        public javax.jms.ConnectionConsumer createDurableConnectionConsumer​(javax.jms.Topic topic,
                                                                            java.lang.String subscriptionName,
                                                                            java.lang.String messageSelector,
                                                                            javax.jms.ServerSessionPool sessionPool,
                                                                            int maxMessages)
                                                                     throws javax.jms.JMSException
        Create a durable connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.
        Specified by:
        createDurableConnectionConsumer in interface javax.jms.Connection
        Parameters:
        topic - topic to access
        subscriptionName - durable subscription name
        messageSelector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
        sessionPool - the server session pool to associate with this durable connection consumer
        maxMessages - the maximum number of messages that can be assigned to a server session at one time
        Returns:
        the durable connection consumer
        Throws:
        javax.jms.JMSException - if the Connection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
        javax.jms.InvalidDestinationException - if an invalid destination is specified.
        javax.jms.InvalidSelectorException - if the message selector is invalid.
      • getFactory

        public javax.jms.ConnectionFactory getFactory()
                                               throws javax.jms.JMSException
        Returns the connection factory used to create this connection.
        Specified by:
        getFactory in interface WmConnection
        Returns:
        the ConnectionFactory used to create his Connection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the connection factory for this connection.
      • getBroker

        public java.lang.String getBroker()
                                   throws javax.jms.JMSException
        Get the Broker to which this connection is currently connected.
        Specified by:
        getBroker in interface WmConnection
        Returns:
        the Broker name
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the Broker for this connection
      • getBrokerName

        public java.lang.String getBrokerName()
                                       throws javax.jms.JMSException
        Get the Broker name to which this connection is currently connected.
        Returns:
        the Broker short name
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the Broker name for this connection
      • getTerritory

        public java.lang.String getTerritory()
                                      throws javax.jms.JMSException
        Get the territory of the Broker to which this connection is currently connected.
        Specified by:
        getTerritory in interface WmConnection
        Returns:
        the territory name
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the territory
      • getSSLServerCertificate

        public java.util.Properties getSSLServerCertificate()
                                                     throws javax.jms.JMSException
        Get the JMS Broker's SSL certificate properties. The included property names are: "subjectDn", "issuerDn", "status" "serialNumber", "beginDate", "endDate".
        Specified by:
        getSSLServerCertificate in interface WmConnection
        Returns:
        the server certificate properties, or null if not an SSL connection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to get the server certificate for this connection.
      • ping

        public void ping()
                  throws javax.jms.JMSException
        Pings the Broker to determine if there is network connectivity.
        Specified by:
        ping in interface WmConnection
        Throws:
        javax.jms.JMSException - if the JMS provider fails to ping the Broker
      • getAccessLabel

        public short[] getAccessLabel()
                               throws javax.jms.JMSException
        Description copied from interface: WmConnection
        Get the client access label
        Specified by:
        getAccessLabel in interface WmConnection
        Returns:
        access labels
        Throws:
        javax.jms.JMSException
      • getPublishProcessState

        public int getPublishProcessState()
                                   throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • checkState

        protected void checkState()
                           throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • invokeNotificationListener

        public void invokeNotificationListener​(WmNotification notice)
      • invokeExceptionListener

        public void invokeExceptionListener​(java.lang.Exception exception)
      • initializeConnection

        protected int initializeConnection​(java.lang.String clientID)
                                    throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • initializeReceiver

        protected int initializeReceiver​(WmQueueImpl queue,
                                         int reconnect)
                                  throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • initializeSubscriber

        protected int initializeSubscriber​(WmTopicImpl topic,
                                           java.lang.String durableName,
                                           boolean ackNonPersistent,
                                           int reconnect)
                                    throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • startTransaction

        protected long startTransaction()
                                 throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • startTransaction

        protected long startTransaction​(int timeout)
                                 throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • startTransaction

        protected long startTransaction​(java.lang.String xaTransactionID,
                                        int timeout,
                                        boolean join)
                                 throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • prepare

        protected void prepare​(java.lang.String xaTransactionID)
                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • prepare

        protected void prepare​(long transactionID)
                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • rollback

        protected void rollback​(java.lang.String xaTransactionID)
                         throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • rollback

        protected void rollback​(long transactionID)
                         throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • endTransaction

        protected void endTransaction​(long transactionID,
                                      boolean success)
                               throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • commit

        public void commit​(java.lang.String xaTransactionID)
                    throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • commit

        protected void commit​(long transactionID)
                       throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • recover

        protected java.lang.String[] recover​(int flags,
                                             long lastRetrivedTxID)
                                      throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • forget

        protected void forget​(java.lang.String transactionID)
                       throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • removeSession

        protected void removeSession​(WmSessionImpl session)
      • startSessions

        protected void startSessions()
                              throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • stopSessions

        protected void stopSessions()
                             throws javax.jms.JMSException
        This method will be called from within stop(), so it is an assumption that the threads entering this already would have taken relevant locks to make the method threadsafe.
        Throws:
        javax.jms.JMSException
      • checkLocalQueue

        protected void checkLocalQueue​(WmQueueImpl queue)
                                throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • addTemporaryDestination

        public void addTemporaryDestination​(WmDestinationImpl destination)
      • getTemporaryDestinations

        public java.util.Vector getTemporaryDestinations()
      • removeTemporaryDestination

        protected void removeTemporaryDestination​(WmDestinationImpl destination)
      • containsTemporaryDestination

        protected boolean containsTemporaryDestination​(WmDestinationImpl destination)
      • getUniqueID

        protected java.lang.String getUniqueID()
      • publish

        public void publish​(long transactionID,
                            WmMessageImpl message,
                            int deliveryMode,
                            boolean deliver,
                            boolean confirmDelivry)
                     throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • publish

        public void publish​(long transactionID,
                            WmMessageImpl[] messages,
                            int deliveryMode,
                            boolean deliver,
                            boolean confirmDelivry)
                     throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • publish

        protected void publish​(long transactionID,
                               WmMessageImpl message,
                               int deliveryMode,
                               boolean deliver)
                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • publish

        protected void publish​(long transactionID,
                               WmMessageImpl[] messages,
                               int deliveryMode,
                               boolean deliver)
                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • getDurableSubscriber

        protected WmTopicSubscriberImpl getDurableSubscriber​(java.lang.String name)
        Parameters:
        name -
      • unsubscribeDurableSubscriber

        protected void unsubscribeDurableSubscriber​(java.lang.String name)
                                             throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • closeSessions

        protected void closeSessions()
      • getMarshalOutUserData

        public java.lang.Object getMarshalOutUserData()
      • getMarshalInUserData

        public java.lang.Object getMarshalInUserData()
      • getUserName

        public java.lang.String getUserName()
      • canPublish

        public void canPublish​(javax.jms.Destination destination)
                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • acknowledgeModeToString

        protected static java.lang.String acknowledgeModeToString​(int acknowledgeMode)
      • initKeepAliveThread

        public void initKeepAliveThread()
        A graceful handling of keep alive thread. Call this method when initialization of KeepAlive thread is needed. And this needs to be called whenever a reconnection of connection happens. Absolute care needs to be taken that it is not called within any synchronized block for reconnection, as that will lead to deadlock. LinkReader thread that tries for reconnect, after acquiring the lock will also enter this method. And if this method is called it will wait for the previous ConnectionKeepAlive method to go dead. But before that happens, even that thread needs to acquire the reconnect lock. So a deadlock happens.
      • sendKeepAliveResponse

        public void sendKeepAliveResponse()
        Send response to Broker's keep alive request
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isTransactionCompleted

        public boolean isTransactionCompleted()
      • setSSLEnabled

        public void setSSLEnabled​(boolean isSSLEnabled)
      • isSSLEnabled

        public boolean isSSLEnabled()
      • isClosed

        public boolean isClosed()
      • setConnectionStatus

        public void setConnectionStatus​(WmConnectionStatus connectionStatus)
      • isStarted

        public boolean isStarted()
        Returns whether the connection has been started.