org.jbpm.process.audit.jms
Class AsyncAuditLogReceiver
java.lang.Object
org.jbpm.process.audit.jms.AsyncAuditLogReceiver
public class AsyncAuditLogReceiver
- extends Object
Asynchronous audit event receiver. Receives messages from JMS queue
that it is attached to as MessageListener
.
This is the second part of asynchronous BAM support backed by JMS
(producer is provide by AsyncAuditLogProducer
class).
Thus it shares the same message format that is TextMessage with
Xstream serialized *Log classes (ProcessInstanceLog,
NodeInstanceLog, VaraiableInstanceLog) as content.
by default it uses entity manager factory and creates entity manager for each message
although it provides getEntityManager method that can be overloaded by extensions to supply
entity managers instead of creating it for every message.
For more enterprise based solution this class can be extended by MDB implementations to
provide additional details that are required by MDB such as:
- annotations - @MessageDriven, @ActivationConfigurationProperty
- dependency injection - inject entity manager factory or entity manager by annotating methods
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncAuditLogReceiver
public AsyncAuditLogReceiver(javax.persistence.EntityManagerFactory entityManagerFactory)
onMessage
public void onMessage(Message message)
getEntityManagerFactory
public javax.persistence.EntityManagerFactory getEntityManagerFactory()
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
getEntityManager
public javax.persistence.EntityManager getEntityManager()
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.