public class JPAEventProcessor extends EventProcessor
| Constructor and Description |
|---|
JPAEventProcessor()
Constructor.
|
JPAEventProcessor(JpaStore jpaStore)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getConfiguration() |
String |
getEntityManager()
Deprecated.
with no replacement
|
protected JpaStore |
getJpaStore()
This method returns the JPA Store.
|
void |
init()
This method initializes the event processor.
|
Serializable |
process(String source,
Serializable event,
int retriesLeft)
This method processes the supplied event, and optionally
returns a transformed representation to be forwarded to
other processors.
|
void |
setConfiguration(String config) |
void |
setEntityManager(String persistenceUnit)
Deprecated.
JPAEventProcessor now uses native Hibernate ORM. Include a
hibernate.cfg.xml file in your src/main/resources.
JPAEventProcessor() will automatically find it. |
close, getAsynchronous, getParameters, getResultHandler, getServices, setAsynchronous, setParameters, setResultHandler, setServicespublic JPAEventProcessor()
public JPAEventProcessor(JpaStore jpaStore)
jpaStore - Explicit JpaStore to usepublic void init()
throws Exception
init in class EventProcessorException - Failed to initializeprotected JpaStore getJpaStore()
public String getConfiguration()
public void setConfiguration(String config)
config - The optional configuration file name@Deprecated public String getEntityManager()
@Deprecated public void setEntityManager(String persistenceUnit)
JPAEventProcessor() will automatically find it.persistenceUnit - The persistence unit namepublic Serializable process(String source, Serializable event, int retriesLeft) throws Exception
If the event cannot be processed at this time, then an exception should be thrown to initiate a retry. The number of remaining retries is supplied, to enable the processor to take appropriate error reporting action.
process in class EventProcessorsource - The source event processor name that generated the eventevent - The event to processretriesLeft - The number of retries leftException - Failed to process event, requesting retryCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.