|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbitronix.tm.Configuration
Configuration repository of the transaction manager. You can set configurable values either via the properties file
or by setting properties of the Configuration object.
Once the transaction manager has started it is not possible to change the configuration: all calls to setters will
throw a IllegalStateException.
The configuration filename must be specified with the bitronix.tm.configuration system property.
The default settings are good enough for running in a test environment but certainly not for production usage. Also, all properties are reset to their default value after the transaction manager has shut down.
All those properties can refer to other defined ones or to system properties using the Ant notation:
${some.property.name}.
© Bitronix 2005, 2006, 2007
| Constructor Summary | |
protected |
Configuration()
|
| Method Summary | |
byte[] |
buildServerIdArray()
Build the server ID byte array that will be prepended in generated UIDs. |
int |
getBackgroundRecoveryInterval()
Interval in minutes at which to run the recovery process in the background. |
int |
getDefaultTransactionTimeout()
Default transaction timeout in seconds. |
int |
getGracefulShutdownInterval()
Maximum amount of seconds the TM will wait for transactions to get done before aborting them at shutdown time. |
java.lang.String |
getLogPart1Filename()
Get the journal fragment file 1 name. |
java.lang.String |
getLogPart2Filename()
Get the journal fragment file 2 name. |
int |
getMaxLogSizeInMb()
Maximum size in megabytes of the journal fragments. |
java.lang.String |
getResourceConfigurationFilename()
ResourceLoader configuration file name. |
java.lang.String |
getServerId()
ASCII ID that must uniquely identify this TM instance. |
int |
getTransactionRetryInterval()
Default pause interval in seconds after a resource communication error has been detected in a transaction before retry. |
boolean |
isAsynchronous2Pc()
Should two phase commit be executed asynchronously ? |
boolean |
isFilterLogStatus()
Should only mandatory logs be written ? |
boolean |
isForceBatchingEnabled()
Are disk forces batched ? |
boolean |
isForcedWriteEnabled()
Are logs forced to disk ? |
boolean |
isSkipCorruptedLogs()
Should corrupted logs be skipped ? |
boolean |
isWarnAboutZeroResourceTransaction()
Should transactions executed without a single enlisted resource result in a warning or not ? |
void |
setAsynchronous2Pc(boolean asynchronous2Pc)
Set if two phase commit should be executed asynchronously. |
void |
setBackgroundRecoveryInterval(int backgroundRecoveryInterval)
Set the interval in minutes at which to run the recovery process in the background. |
void |
setDefaultTransactionTimeout(int defaultTransactionTimeout)
Set the default transaction timeout in seconds. |
void |
setFilterLogStatus(boolean filterLogStatus)
Set if only mandatory logs should be written. |
void |
setForceBatchingEnabled(boolean forceBatchingEnabled)
Set if disk forces are batched. |
void |
setForcedWriteEnabled(boolean forcedWriteEnabled)
Set if logs are forced to disk. |
void |
setGracefulShutdownInterval(int gracefulShutdownInterval)
Set the maximum amount of seconds the TM will wait for transactions to get done before aborting them at shutdown time. |
void |
setLogPart1Filename(java.lang.String logPart1Filename)
Set the journal fragment file 1 name. |
void |
setLogPart2Filename(java.lang.String logPart2Filename)
Set the journal fragment file 2 name. |
void |
setMaxLogSizeInMb(int maxLogSizeInMb)
Set the Maximum size in megabytes of the journal fragments. |
void |
setResourceConfigurationFilename(java.lang.String resourceConfigurationFilename)
Set the ResourceLoader configuration file name. |
void |
setServerId(java.lang.String serverId)
Set the ASCII ID that must uniquely identify this TM instance. |
void |
setSkipCorruptedLogs(boolean skipCorruptedLogs)
Set if corrupted logs should be skipped. |
void |
setTransactionRetryInterval(int transactionRetryInterval)
Set the default pause interval in seconds after a resource communication error has been detected in a transaction before retry. |
void |
setWarnAboutZeroResourceTransaction(boolean warnAboutZeroResourceTransaction)
Set if transactions executed without a single enlisted resource should result in a warning or not. |
void |
shutdown()
Shutdown the service and free all held resources. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Configuration()
| Method Detail |
public java.lang.String getServerId()
Property name:
bitronix.tm.serverId - (defaults to server's IP address but that's unsafe for
production use)
public void setServerId(java.lang.String serverId)
serverId - the unique ID of this TM instance.getServerId()public java.lang.String getLogPart1Filename()
Property name:
bitronix.tm.journal.disk.logPart1Filename - (defaults to btm1.tlog)
public void setLogPart1Filename(java.lang.String logPart1Filename)
logPart1Filename - the journal fragment file 1 name.getLogPart1Filename()public java.lang.String getLogPart2Filename()
Property name:
bitronix.tm.journal.disk.logPart2Filename - (defaults to btm2.tlog)
public void setLogPart2Filename(java.lang.String logPart2Filename)
logPart2Filename - the journal fragment file 2 name.getLogPart2Filename()public boolean isForcedWriteEnabled()
Property name:
bitronix.tm.journal.disk.forcedWriteEnabled - (defaults to true)
public void setForcedWriteEnabled(boolean forcedWriteEnabled)
forcedWriteEnabled - true if logs should be forced to disk, false otherwise.isForcedWriteEnabled()public boolean isForceBatchingEnabled()
Property name:
bitronix.tm.journal.disk.forceBatchingEnabled - (defaults to true)
public void setForceBatchingEnabled(boolean forceBatchingEnabled)
forceBatchingEnabled - true if disk forces are batched, false otherwise.isForceBatchingEnabled()public int getMaxLogSizeInMb()
Property name:
bitronix.tm.journal.disk.maxLogSize - (defaults to 2)
public void setMaxLogSizeInMb(int maxLogSizeInMb)
maxLogSizeInMb - the maximum size in megabytes of the journal fragments.getMaxLogSizeInMb()public boolean isFilterLogStatus()
Property name:
bitronix.tm.journal.disk.filterLogStatus - (defaults to false)
public void setFilterLogStatus(boolean filterLogStatus)
filterLogStatus - true if only mandatory logs should be written.isFilterLogStatus()public boolean isSkipCorruptedLogs()
Property name:
bitronix.tm.journal.disk.skipCorruptedLogs - (defaults to false)
public void setSkipCorruptedLogs(boolean skipCorruptedLogs)
skipCorruptedLogs - true if corrupted logs should be skipped.isSkipCorruptedLogs()public boolean isAsynchronous2Pc()
Property name:
bitronix.tm.2pc.async - (defaults to false)
public void setAsynchronous2Pc(boolean asynchronous2Pc)
asynchronous2Pc - true if two phase commit should be executed asynchronously.isAsynchronous2Pc()public boolean isWarnAboutZeroResourceTransaction()
Property name:
bitronix.tm.2pc.warnAboutZeroResourceTransactions - (defaults to true)
public void setWarnAboutZeroResourceTransaction(boolean warnAboutZeroResourceTransaction)
warnAboutZeroResourceTransaction - true if transactions executed without a single enlisted resource should
result in a warning.isWarnAboutZeroResourceTransaction()public int getDefaultTransactionTimeout()
Property name:
bitronix.tm.timer.defaultTransactionTimeout - (defaults to 60)
public void setDefaultTransactionTimeout(int defaultTransactionTimeout)
defaultTransactionTimeout - the default transaction timeout in seconds.getDefaultTransactionTimeout()public int getTransactionRetryInterval()
Property name:
bitronix.tm.timer.transactionRetryInterval - (defaults to 10)
public void setTransactionRetryInterval(int transactionRetryInterval)
transactionRetryInterval - the default pause interval in seconds.getTransactionRetryInterval()public int getGracefulShutdownInterval()
Property name:
bitronix.tm.timer.gracefulShutdownInterval - (defaults to 60)
public void setGracefulShutdownInterval(int gracefulShutdownInterval)
gracefulShutdownInterval - the maximum amount of time in seconds.getGracefulShutdownInterval()public int getBackgroundRecoveryInterval()
Property name:
bitronix.tm.timer.backgroundRecoveryInterval - (defaults to 0)
public void setBackgroundRecoveryInterval(int backgroundRecoveryInterval)
backgroundRecoveryInterval - the interval in minutes.getBackgroundRecoveryInterval()public java.lang.String getResourceConfigurationFilename()
ResourceLoader configuration file name. ResourceLoader
will be disabled if this value is null.
Property name:
bitronix.tm.resource.configuration - (defaults to null)
public void setResourceConfigurationFilename(java.lang.String resourceConfigurationFilename)
ResourceLoader configuration file name.
resourceConfigurationFilename - the filename of the resources configuration file or null you do not want to
use the ResourceLoader.getResourceConfigurationFilename()public byte[] buildServerIdArray()
public void shutdown()
Service
shutdown in interface Servicepublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||