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(org.jbpm.JbpmContext jbpmContext, javax.jms.Connection connection, javax.jms.Destination destination, boolean isCommitEnabled)
          Construct the base JMS job service.
 
Method Summary
 void close()
          Cloase the job service.
 org.jbpm.db.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 sendJob(org.jbpm.job.Job job)
          Send the job to the job executor.
protected  void sendTimer(org.jbpm.job.Timer timer)
          Send the timer 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(org.jbpm.JbpmContext jbpmContext,
                             javax.jms.Connection connection,
                             javax.jms.Destination destination,
                             boolean isCommitEnabled)
                      throws javax.jms.JMSException
Construct the base JMS job service.

Parameters:
jbpmContext - The current jBPM context.
connection - The associated JMS connection.
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

sendTimer

protected void sendTimer(org.jbpm.job.Timer timer)
Send the timer to the job executor.

Parameters:
timer - The timer to send.

sendJob

protected void sendJob(org.jbpm.job.Job job)
Send the job to the job executor.

Parameters:
job - The job to send.

close

public void close()
Cloase the job service.


getSession

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

Returns:
The JMS session.

getJobSession

public org.jbpm.db.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.