@ManagedResource(description="JPA based message id repository")
public class JpaMessageIdRepository
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.IdempotentRepository
| Modifier and Type | Field and Description |
|---|---|
protected static String |
QUERY_CLEAR_STRING |
protected static String |
QUERY_STRING |
| Constructor and Description |
|---|
JpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory,
String processorName) |
JpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
String processorName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.apache.camel.Exchange exchange,
String messageId) |
boolean |
add(String messageId) |
void |
clear() |
boolean |
confirm(org.apache.camel.Exchange exchange,
String messageId) |
boolean |
confirm(String messageId) |
boolean |
contains(org.apache.camel.Exchange exchange,
String messageId) |
boolean |
contains(String messageId) |
protected void |
doStart() |
protected void |
doStop() |
String |
getProcessorName() |
boolean |
isJoinTransaction() |
boolean |
isSharedEntityManager() |
static JpaMessageIdRepository |
jpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory,
String processorName) |
static JpaMessageIdRepository |
jpaMessageIdRepository(String persistenceUnit,
String processorName) |
boolean |
remove(org.apache.camel.Exchange exchange,
String messageId) |
boolean |
remove(String messageId) |
void |
setJoinTransaction(boolean joinTransaction) |
void |
setSharedEntityManager(boolean sharedEntityManager) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected static final String QUERY_STRING
protected static final String QUERY_CLEAR_STRING
public JpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory,
String processorName)
public JpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
String processorName)
public static JpaMessageIdRepository jpaMessageIdRepository(String persistenceUnit, String processorName)
public static JpaMessageIdRepository jpaMessageIdRepository(javax.persistence.EntityManagerFactory entityManagerFactory, String processorName)
@ManagedOperation(description="Adds the key to the store") public boolean add(String messageId)
add in interface org.apache.camel.spi.IdempotentRepositorypublic boolean add(org.apache.camel.Exchange exchange,
String messageId)
add in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Does the store contain the given key") public boolean contains(String messageId)
contains in interface org.apache.camel.spi.IdempotentRepositorypublic boolean contains(org.apache.camel.Exchange exchange,
String messageId)
contains in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Remove the key from the store") public boolean remove(String messageId)
remove in interface org.apache.camel.spi.IdempotentRepositorypublic boolean remove(org.apache.camel.Exchange exchange,
String messageId)
remove in interface org.apache.camel.spi.IdempotentRepositorypublic boolean confirm(String messageId)
confirm in interface org.apache.camel.spi.IdempotentRepositorypublic boolean confirm(org.apache.camel.Exchange exchange,
String messageId)
confirm in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Clear the store") public void clear()
clear in interface org.apache.camel.spi.IdempotentRepository@ManagedAttribute(description="The processor name") public String getProcessorName()
@ManagedAttribute(description="Whether to join existing transaction") public boolean isJoinTransaction()
public void setJoinTransaction(boolean joinTransaction)
@ManagedAttribute(description="Whether to use shared EntityManager") public boolean isSharedEntityManager()
public void setSharedEntityManager(boolean sharedEntityManager)
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionApache Camel