public abstract class ResourceBean
extends java.lang.Object
implements java.io.Serializable
XAResourceProducer as configured in the
resources configuration file.| Modifier | Constructor and Description |
|---|---|
protected |
ResourceBean()
Initialize all properties with their default values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAcquireIncrement() |
int |
getAcquisitionInterval() |
int |
getAcquisitionTimeout() |
boolean |
getAllowLocalTransactions() |
boolean |
getApplyTransactionTimeout() |
boolean |
getAutomaticEnlistingEnabled() |
java.lang.String |
getClassName() |
boolean |
getDeferConnectionRelease() |
java.util.Properties |
getDriverProperties() |
boolean |
getIgnoreRecoveryFailures() |
int |
getMaxIdleTime() |
int |
getMaxPoolSize() |
int |
getMinPoolSize() |
boolean |
getShareTransactionConnections() |
int |
getTwoPcOrderingPosition() |
java.lang.String |
getUniqueName() |
boolean |
getUseTmJoin() |
int |
incCreatedResourcesCounter()
Increment a transient counter.
|
boolean |
isDisabled() |
void |
setAcquireIncrement(int acquireIncrement)
Define the amount of connections to be created at once when the pool needs to grow.
|
void |
setAcquisitionInterval(int acquisitionInterval)
Set the amount of time in seconds the pool will wait before trying to acquire a connection again after an
invalid connection has been attempted to be acquired.
|
void |
setAcquisitionTimeout(int acquisitionTimeout)
Define the amount of time in seconds a call to get a connection from the pool will wait when the pool is empty.
|
void |
setAllowLocalTransactions(boolean allowLocalTransactions)
Set if the transaction manager should allow mixing XA and non-XA transactions.
|
void |
setApplyTransactionTimeout(boolean applyTransactionTimeout)
Set if the transaction-timeout should be set on the XAResource when the XAResource is
enlisted.
|
void |
setAutomaticEnlistingEnabled(boolean automaticEnlistingEnabled)
Specify if the XA resource wrapper should enlist/delist this resource automatically in global transactions.
|
void |
setClassName(java.lang.String className)
Specify the underlying implementation class name of the XA resource described by this bean.
|
void |
setDeferConnectionRelease(boolean deferConnectionRelease)
Define the transaction interleaving capability of the database.
|
void |
setDisabled(boolean disabled)
Set whether this resource is disabled, meaning it's temporarily forbidden to acquire
a connection from its pool.
|
void |
setDriverProperties(java.util.Properties driverProperties)
Set the properties that should be set on the underlying implementation.
|
void |
setIgnoreRecoveryFailures(boolean ignoreRecoveryFailures)
Set whether XA recovery errors should quarantine the resource or be ignored.
|
void |
setMaxIdleTime(int maxIdleTime)
Define the amount of seconds and idle connection can stay in the pool before getting closed.
|
void |
setMaxPoolSize(int maxPoolSize)
Define the maximum amount of connections that can be in the pool.
|
void |
setMinPoolSize(int minPoolSize)
Define the minimal amount of connections that can be in the pool.
|
void |
setShareTransactionConnections(boolean shareAccessibleConnections)
Set whether connections in the ACCESSIBLE state can be shared within the context
of a transaction.
|
void |
setTwoPcOrderingPosition(int twoPcOrderingPosition)
Set the position at which this resource should stand during 2PC commit.
|
void |
setUniqueName(java.lang.String uniqueName)
Specify the resource unique name to be used to identify this resource during recovery.
|
void |
setUseTmJoin(boolean useTmJoin)
Specify if the transaction manager should try to join resources by calling
XAResource.start(javax.transaction.xa.Xid, int) with
XAResource.TMJOIN. |
protected ResourceBean()
public java.lang.String getClassName()
public void setClassName(java.lang.String className)
className - the underlying implementation class name.public java.lang.String getUniqueName()
public void setUniqueName(java.lang.String uniqueName)
uniqueName - the resource's unique name.public boolean getAutomaticEnlistingEnabled()
public void setAutomaticEnlistingEnabled(boolean automaticEnlistingEnabled)
Transaction.enlistResource(javax.transaction.xa.XAResource) and delist them
Transaction.delistResource(javax.transaction.xa.XAResource, int).automaticEnlistingEnabled - true if the the XA resource wrapper should enlist/delist this resource automatically in global
transactions.public boolean getUseTmJoin()
public void setUseTmJoin(boolean useTmJoin)
XAResource.start(javax.transaction.xa.Xid, int) with
XAResource.TMJOIN. The transaction manager checks if two branches can be joined by
calling XAResource.isSameRM(javax.transaction.xa.XAResource).
It should only be set to true if the underlying implementation supports resource joining.useTmJoin - true if transaction branches joining should be used.public java.util.Properties getDriverProperties()
public void setDriverProperties(java.util.Properties driverProperties)
driverProperties - the properties that should be set on the underlying implementation.public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
maxPoolSize - the maximum amount of connections that can be in the pool.public int getMinPoolSize()
public void setMinPoolSize(int minPoolSize)
minPoolSize - the maximum amount of connections that can be in the pool.public int getMaxIdleTime()
public void setMaxIdleTime(int maxIdleTime)
maxIdleTime - the amount of seconds and idle connection can stay in the pool before getting closed.public int getAcquireIncrement()
public void setAcquireIncrement(int acquireIncrement)
acquireIncrement - the amount of connections to be created at once when the pool needs to grow.public int getAcquisitionTimeout()
public void setAcquisitionTimeout(int acquisitionTimeout)
acquisitionTimeout - the amount of time in seconds.public boolean getDeferConnectionRelease()
public void setDeferConnectionRelease(boolean deferConnectionRelease)
deferConnectionRelease - false only if the database can run many transactions on the same connection.public int getAcquisitionInterval()
public void setAcquisitionInterval(int acquisitionInterval)
acquisitionInterval - amount of time in seconds.public boolean getAllowLocalTransactions()
public void setAllowLocalTransactions(boolean allowLocalTransactions)
allowLocalTransactions - if the transaction manager should allow mixing XA and non-XA transactions.public int getTwoPcOrderingPosition()
public void setTwoPcOrderingPosition(int twoPcOrderingPosition)
twoPcOrderingPosition - the position at which this resource should stand during 2PC commit.public boolean getApplyTransactionTimeout()
public void setApplyTransactionTimeout(boolean applyTransactionTimeout)
applyTransactionTimeout - true if the transaction-timeout should be set.public void setShareTransactionConnections(boolean shareAccessibleConnections)
shareAccessibleConnections - the shareAccessibleConnections to set.public boolean getShareTransactionConnections()
public void setIgnoreRecoveryFailures(boolean ignoreRecoveryFailures)
ignoreRecoveryFailures - true if recovery errors should be ignored, false otherwise.public boolean getIgnoreRecoveryFailures()
public void setDisabled(boolean disabled)
disabled - true to disable the resource, false to enable it.public boolean isDisabled()
public int incCreatedResourcesCounter()
Copyright © 2006-2021 Bitronix Software. All Rights Reserved.