Package org.fcrepo.jms
Class JMSQueuePublisher
- java.lang.Object
-
- org.fcrepo.jms.JMSQueuePublisher
-
public class JMSQueuePublisher extends Object
Machinery to publish JMS messages when an EventBus message is received.- Author:
- barmintor, awoods
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.jms.SessionjmsSession
-
Constructor Summary
Constructors Constructor Description JMSQueuePublisher()Create a JMS Topic with the default name of "fedora"
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireConnections()Connect to JCR Repository and JMS queueprotected javax.jms.DestinationcreateDestination()voidpublishJCREvent(org.fcrepo.kernel.api.observer.Event event)When an EventBus message is received, map it to our JMS message payload and push it onto the queue.voidreleaseConnections()Close external connections
-
-
-
Constructor Detail
-
JMSQueuePublisher
public JMSQueuePublisher()
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.JMSExceptionWhen 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.JMSExceptionConnect to JCR Repository and JMS queue- Throws:
javax.jms.JMSException- if JMS Exception occurred
-
releaseConnections
@PreDestroy public void releaseConnections() throws javax.jms.JMSExceptionClose external connections- Throws:
javax.jms.JMSException- if JMS exception occurred
-
-