Class JMSRemoteCommitProvider

    • Constructor Detail

      • JMSRemoteCommitProvider

        public JMSRemoteCommitProvider()
    • Method Detail

      • setTopic

        public void setTopic​(java.lang.String name)
        Sets the JMS Topic name. Defaults to topic/OpenJPACommitProviderTopic.
      • setTopicConnectionFactory

        public void setTopicConnectionFactory​(java.lang.String name)
        Sets the JMS TopicConnectionFactory name. Defaults to java:/ConnectionFactory.
      • setExceptionReconnectAttempts

        public void setExceptionReconnectAttempts​(int attempts)
        The number of times to attempt to reconnect after a JMS send exception is detected. Defaults to 0, meaning no attempt to reconnect is made; the exception is logged and ignored.
      • newContext

        protected javax.naming.Context newContext()
                                           throws javax.naming.NamingException
        Returns a new Context object for use by this provider.
        Throws:
        javax.naming.NamingException
      • broadcast

        public void broadcast​(RemoteCommitEvent event)
        Description copied from interface: RemoteCommitProvider
        Notifies other remote event managers in this JVM and on other machines of changes to the cache. This method must not notify the event manager associated with the broker that originated this commit.
        Specified by:
        broadcast in interface RemoteCommitProvider
      • connect

        protected void connect()
      • getMessageListener

        protected jakarta.jms.MessageListener getMessageListener()
      • createMessage

        protected jakarta.jms.Message createMessage​(RemoteCommitEvent event)
                                             throws jakarta.jms.JMSException
        Returns a new Message to send to the topic. This implementation creates an ObjectMessage.
        Throws:
        jakarta.jms.JMSException
      • onException

        public void onException​(jakarta.jms.JMSException ex)
        Specified by:
        onException in interface jakarta.jms.ExceptionListener