javax.jms.Message jmsMessage = jmsSession.createMessage();
MessageProducer messageProducer = jmsSession.createProducer(jmsDestination);
try {
messageProducer.send(jmsMessage);
} catch (Exception e) {
throw new PvmException("couldn't send jms message: "+e.getMessage(), e);
} finally {
messageProducer.close();
}
jmsMessage.setLongProperty("jobId", message.getDbid());
/*
if (job.getToken()!=null) {
message.setLongProperty("tokenId", job.getToken().getId());
}
if (job.getProcessInstance()!=null) {
message.setLongProperty("processInstanceId", job.getProcessInstance().getId());
}
if (job.getTaskInstance()!=null) {
message.setLongProperty("taskInstanceId", job.getTaskInstance().getId());
}
*/
} catch (JMSException e) {
throw new PvmException("couldn't send jms message", e);
}
}