@ConfigurationProperties(prefix="spring.jta.atomikos.properties") public class AtomikosProperties extends Object
asProperties()
Modifier and Type | Class and Description |
---|---|
static class |
AtomikosProperties.Recovery
Recovery specific settings.
|
Constructor and Description |
---|
AtomikosProperties() |
Modifier and Type | Method and Description |
---|---|
Properties |
asProperties()
Returns the properties as a
Properties object that can be used with
Atomikos. |
long |
getCheckpointInterval() |
Duration |
getDefaultJtaTimeout() |
long |
getDefaultMaxWaitTimeOnShutdown() |
String |
getLogBaseDir() |
String |
getLogBaseName() |
int |
getMaxActives() |
Duration |
getMaxTimeout() |
AtomikosProperties.Recovery |
getRecovery() |
String |
getService() |
String |
getTransactionManagerUniqueName() |
boolean |
isAllowSubTransactions() |
boolean |
isEnableLogging() |
boolean |
isForceShutdownOnVmExit() |
boolean |
isSerialJtaTransactions() |
boolean |
isThreadedTwoPhaseCommit() |
void |
setAllowSubTransactions(boolean allowSubTransactions) |
void |
setCheckpointInterval(long checkpointInterval)
Specifies the interval between checkpoints.
|
void |
setDefaultJtaTimeout(Duration defaultJtaTimeout)
The default timeout for JTA transactions (optional, defaults to 10000
ms).
|
void |
setDefaultMaxWaitTimeOnShutdown(long defaultMaxWaitTimeOnShutdown)
Specifies how long should a normal shutdown (no-force) wait for transactions to
complete.
|
void |
setEnableLogging(boolean enableLogging)
Specifies if disk logging should be enabled or not.
|
void |
setForceShutdownOnVmExit(boolean forceShutdownOnVmExit)
Specifies whether VM shutdown should trigger forced shutdown of the transaction
core.
|
void |
setLogBaseDir(String logBaseDir)
Specifies the directory in which the log files should be stored.
|
void |
setLogBaseName(String logBaseName)
Specifies the transactions log file base name.
|
void |
setMaxActives(int maxActives)
Specifies the maximum number of active transactions.
|
void |
setMaxTimeout(Duration maxTimeout)
Specifies the maximum timeout that can be allowed for transactions.
|
void |
setSerialJtaTransactions(boolean serialJtaTransactions)
Specifies if subtransactions should be joined when possible.
|
void |
setService(String service)
Specifies the transaction manager implementation that should be started.
|
void |
setThreadedTwoPhaseCommit(boolean threadedTwoPhaseCommit)
Specifies whether or not to use different (and concurrent) threads for two-phase
commit on the participating resources.
|
void |
setTransactionManagerUniqueName(String uniqueName)
Specifies the transaction manager's unique name.
|
public void setService(String service)
service
- the servicepublic String getService()
public void setMaxTimeout(Duration maxTimeout)
maxTimeout
- the max timeoutpublic Duration getMaxTimeout()
public void setDefaultJtaTimeout(Duration defaultJtaTimeout)
defaultJtaTimeout
- the default JTA timeoutpublic Duration getDefaultJtaTimeout()
public void setMaxActives(int maxActives)
IllegalStateException
with error message "Max number of active transactions reached" if you call
UserTransaction.begin()
while there are already n concurrent transactions
running, n being this value.maxActives
- the max activitiespublic int getMaxActives()
public void setEnableLogging(boolean enableLogging)
enableLogging
- if logging is enabledpublic boolean isEnableLogging()
public void setTransactionManagerUniqueName(String uniqueName)
uniqueName
- the unique namepublic String getTransactionManagerUniqueName()
public void setSerialJtaTransactions(boolean serialJtaTransactions)
XAResource.start(TM_JOIN)
will be made for
different but related subtransactions. This setting has no effect on resource
access within one and the same transaction. If you don't use subtransactions then
this setting can be ignored.serialJtaTransactions
- if serial JTA transactions are supportedpublic boolean isSerialJtaTransactions()
public void setAllowSubTransactions(boolean allowSubTransactions)
public boolean isAllowSubTransactions()
public void setForceShutdownOnVmExit(boolean forceShutdownOnVmExit)
forceShutdownOnVmExit
- if VM shutdown should be forcedpublic boolean isForceShutdownOnVmExit()
public void setDefaultMaxWaitTimeOnShutdown(long defaultMaxWaitTimeOnShutdown)
defaultMaxWaitTimeOnShutdown
- the default max wait time on shutdownpublic long getDefaultMaxWaitTimeOnShutdown()
public void setLogBaseName(String logBaseName)
logBaseName
- the log base namepublic String getLogBaseName()
public void setLogBaseDir(String logBaseDir)
logBaseDir
- the log base dirpublic String getLogBaseDir()
public void setCheckpointInterval(long checkpointInterval)
checkpointInterval
- the checkpoint intervalpublic long getCheckpointInterval()
public void setThreadedTwoPhaseCommit(boolean threadedTwoPhaseCommit)
threadedTwoPhaseCommit
- if threaded two phase commits should be usedpublic boolean isThreadedTwoPhaseCommit()
public AtomikosProperties.Recovery getRecovery()
public Properties asProperties()
Properties
object that can be used with
Atomikos.