org.jboss.soa.esb.services.jbpm.integration
Class AbstractJmsJobService

java.lang.Object
  extended by org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JmsMessageService, JmsSchedulerService

public abstract class AbstractJmsJobService
extends java.lang.Object
implements java.io.Serializable

Abstract JMS service code based on the jBPM implementations.

Author:
Kevin Conner
See Also:
Serialized Form

Field Summary
protected  org.apache.log4j.Logger log
          The logger for this class.
 
Constructor Summary
AbstractJmsJobService(JbpmContext jbpmContext, javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination, boolean isCommitEnabled)
          Construct the base JMS job service.
 
Method Summary
 void close()
          Close the job service.
 JobSession getJobSession()
          Get the job session associated with this job service.
protected  javax.jms.MessageProducer getMessageProducer()
          Get the associated JMS message producer.
 javax.jms.Session getSession()
          Get the JMS session associated with this job service.
protected  void send(Job job, JmsScheduledDeliveryStrategy scheduledDeliveryStrategy)
          Send the job to the job executor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.log4j.Logger log
The logger for this class.

Constructor Detail

AbstractJmsJobService

public AbstractJmsJobService(JbpmContext jbpmContext,
                             javax.jms.ConnectionFactory connectionFactory,
                             javax.jms.Destination destination,
                             boolean isCommitEnabled)
Construct the base JMS job service.

Parameters:
jbpmContext - The current jBPM context.
connectionFactory - The associated JMS connection factory.
destination - The JMS destination for jobs.
isCommitEnabled - true if commit should be invoked, false otherwise.
Throws:
javax.jms.JMSException - For errors in constructing the JMS session.
Method Detail

send

protected void send(Job job,
                    JmsScheduledDeliveryStrategy scheduledDeliveryStrategy)
Send the job to the job executor.

Parameters:
job - The job to send.
scheduledDeliveryStrategy - The scheduled delivery strategy, if a timer.

close

public void close()
Close the job service.


getSession

public javax.jms.Session getSession()
                             throws javax.jms.JMSException
Get the JMS session associated with this job service.

Returns:
The JMS session.
Throws:
javax.jms.JMSException

getJobSession

public JobSession getJobSession()
Get the job session associated with this job service.

Returns:
The job session.

getMessageProducer

protected javax.jms.MessageProducer getMessageProducer()
                                                throws javax.jms.JMSException
Get the associated JMS message producer.

Returns:
The JMS message producer.
Throws:
javax.jms.JMSException - for errors during construction of the JMS message producer.