Class JMSTopicPublisher


  • public class JMSTopicPublisher
    extends Object
    Machinery to publish JMS messages when an EventBus message is received.
    Author:
    barmintor, awoods
    • Field Detail

      • jmsSession

        protected javax.jms.Session jmsSession
    • Constructor Detail

      • JMSTopicPublisher

        public JMSTopicPublisher()
        Create a JMS Topic with the default name of "fedora"
    • Method Detail

      • createDestination

        protected javax.jms.Destination createDestination()
                                                   throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • publishJCREvent

        public void publishJCREvent​(org.fcrepo.kernel.api.observer.Event event)
                             throws javax.jms.JMSException
        When an EventBus message is received, map it to our JMS message payload and push it onto the queue.
        Parameters:
        event - the fedora event
        Throws:
        javax.jms.JMSException - if JMS exception occurred
      • acquireConnections

        @PostConstruct
        public void acquireConnections()
                                throws javax.jms.JMSException
        Connect to JCR Repository and JMS queue
        Throws:
        javax.jms.JMSException - if JMS Exception occurred
      • releaseConnections

        @PreDestroy
        public void releaseConnections()
                                throws javax.jms.JMSException
        Close external connections
        Throws:
        javax.jms.JMSException - if JMS exception occurred