Package org.fcrepo.jms
Class AbstractJMSPublisher
- java.lang.Object
-
- org.fcrepo.jms.AbstractJMSPublisher
-
- Direct Known Subclasses:
JMSQueuePublisher
,JMSTopicPublisher
public abstract class AbstractJMSPublisher extends Object
Machinery to publish JMS messages when an EventBus message is received.- Author:
- barmintor, awoods, acoburn
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.jms.Session
jmsSession
-
Constructor Summary
Constructors Constructor Description AbstractJMSPublisher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
acquireConnections()
Connect to JCR Repository and JMS queueprotected abstract javax.jms.Destination
createDestination()
void
publishJCREvent(Event event)
When an EventBus message is received, map it to our JMS message payload and push it onto the queue.void
releaseConnections()
Close external connections
-
-
-
Field Detail
-
jmsSession
protected javax.jms.Session jmsSession
-
-
Constructor Detail
-
AbstractJMSPublisher
public AbstractJMSPublisher()
-
-
Method Detail
-
createDestination
protected abstract javax.jms.Destination createDestination() throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
publishJCREvent
public void publishJCREvent(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
-
-