public class AtomikosConnectionFactoryBean extends Object implements javax.jms.ConnectionFactory, ConnectionPoolProperties, Referenceable, Serializable, com.atomikos.icatch.OrderedLifecycleComponent
| existing JTA transaction for thread | localTransactionMode | resulting session |
|---|---|---|
| true | ignored | XA session |
| false | false | XA session |
| false | true | non-XA session according to sessionTransacted/acknowledgeMode parameters |
| localTransactionMode | sessionTransactedFlag | resulting session |
|---|---|---|
| false | ignored | XA session |
| true | ignored | non-XA session according to sessionTransacted/acknowledgeMode parameters |
| localTransactionMode | sessionTransactedFlag | resulting session |
|---|---|---|
| false | true | XA session |
| other | other | non-XA session according to sessionTransacted/acknowledgeMode parameters |
DEFAULT_BORROW_CONNECTION_TIMEOUT, DEFAULT_ISOLATION_LEVEL_UNSET, DEFAULT_MAINTENANCE_INTERVAL, DEFAULT_MAX_IDLE_TIME, DEFAULT_MAX_LIFETIME, DEFAULT_POOL_SIZE| Constructor and Description |
|---|
AtomikosConnectionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the instance.
|
javax.jms.Connection |
createConnection() |
javax.jms.Connection |
createConnection(String user,
String password) |
javax.jms.JMSContext |
createContext() |
javax.jms.JMSContext |
createContext(int sessionMode) |
javax.jms.JMSContext |
createContext(String userName,
String password) |
javax.jms.JMSContext |
createContext(String userName,
String password,
int sessionMode) |
int |
getBorrowConnectionTimeout()
Gets the timeout for borrowing connections from the pool.
|
boolean |
getConcurrentConnectionValidation() |
int |
getDefaultIsolationLevel() |
boolean |
getIgnoreSessionTransactedFlag() |
boolean |
getLocalTransactionMode()
Gets the local transaction mode.
|
int |
getMaintenanceInterval()
Gets the pool maintenance interval.
|
int |
getMaxIdleTime()
Gets the max idle time for connections in the pool.
|
int |
getMaxLifetime()
Gets the maximum lifetime in seconds.
|
int |
getMaxPoolSize()
Gets the max size of the pool.
|
int |
getMinPoolSize()
Gets the min size of the pool.
|
Reference |
getReference() |
int |
getSessionCreationMode() |
String |
getTestQuery()
Gets a test query, currently defaults to null (not applicable to JMS).
|
String |
getUniqueResourceName()
Gets the unique name for this resource.
|
javax.jms.XAConnectionFactory |
getXaConnectionFactory()
Gets the configured XAConnectionFactory.
|
String |
getXaConnectionFactoryClassName()
Gets the name of the vendor-specific XAConnectionFactory class implementation.
|
Properties |
getXaProperties()
Gets the vendor-specific XA properties to set.
|
void |
init()
Initializes the instance.
|
int |
poolAvailableSize() |
int |
poolTotalSize() |
void |
refreshPool() |
void |
setBorrowConnectionTimeout(int timeout)
Sets the max timeout that connection requests should
wait when no connection is available in the pool.
|
void |
setConcurrentConnectionValidation(boolean value)
Sets whether or not to use concurrent connection validation.
|
void |
setIgnoreSessionTransactedFlag(boolean value)
Deprecated.
Kept for pre-3.9 configurations only. Otherwise, use the sessionCreationMode instead.
|
void |
setLocalTransactionMode(boolean mode)
Sets whether or not local transactions are desired.
|
void |
setMaintenanceInterval(int interval)
Sets the pool maintenance interval, i.e.
|
void |
setMaxIdleTime(int time)
Sets the max idle time after which connections are cleaned up
from the pool.
|
void |
setMaxLifetime(int maxLifetime)
Sets the maximum amount of seconds that a connection is kept in the pool before
it is destroyed automatically.
|
void |
setMaxPoolSize(int maxPoolSize)
Sets the max size that the pool can reach.
|
void |
setMinPoolSize(int minPoolSize)
Sets the min size of the pool.
|
void |
setPoolSize(int minAndMaxSize)
Sets both the min and max size of the pool.
|
void |
setSessionCreationMode(int mode)
Sets the creation mode for sessions.
|
void |
setUniqueResourceName(String resourceName)
Sets the unique resource name for this resource, needed for recovery of transactions after restart.
|
void |
setXaConnectionFactory(javax.jms.XAConnectionFactory xaConnectionFactory)
Sets the XAConnectionFactory directly, instead of calling setXaConnectionFactoryClassName and setXaProperties.
|
void |
setXaConnectionFactoryClassName(String xaConnectionFactoryClassName)
Sets the fully qualified name of a vendor-specific implementation of XAConnectionFatory.
|
void |
setXaProperties(Properties xaProperties)
Sets the vendor-specific XA properties.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIgnoreJtaTransactionspublic int getMaxPoolSize()
getMaxPoolSize in interface ConnectionPoolPropertiespublic void setMaxPoolSize(int maxPoolSize)
maxPoolSize - public int getMinPoolSize()
getMinPoolSize in interface ConnectionPoolPropertiespublic void setMinPoolSize(int minPoolSize)
minPoolSize - public void setPoolSize(int minAndMaxSize)
minAndMaxSize - public String getUniqueResourceName()
getUniqueResourceName in interface ConnectionPoolPropertiespublic void setUniqueResourceName(String resourceName)
resourceName - public String getXaConnectionFactoryClassName()
public void setXaConnectionFactoryClassName(String xaConnectionFactoryClassName)
xaConnectionFactoryClassName - XAConnectionFactorypublic Properties getXaProperties()
public void setXaProperties(Properties xaProperties)
xaProperties - The properties, to be set (during initialization) on the
specified XAConnectionFactory implementation.public javax.jms.XAConnectionFactory getXaConnectionFactory()
public void setXaConnectionFactory(javax.jms.XAConnectionFactory xaConnectionFactory)
xaConnectionFactory - public void setMaxLifetime(int maxLifetime)
maxLifetime - public int getMaxLifetime()
getMaxLifetime in interface ConnectionPoolPropertiespublic void init()
throws javax.jms.JMSException
init in interface com.atomikos.icatch.OrderedLifecycleComponentjavax.jms.JMSExceptionpublic int getBorrowConnectionTimeout()
getBorrowConnectionTimeout in interface ConnectionPoolPropertiespublic int getMaintenanceInterval()
getMaintenanceInterval in interface ConnectionPoolPropertiespublic int getMaxIdleTime()
getMaxIdleTime in interface ConnectionPoolPropertiespublic String getTestQuery()
getTestQuery in interface ConnectionPoolPropertiespublic void setBorrowConnectionTimeout(int timeout)
timeout - The timeout in seconds.public void setMaintenanceInterval(int interval)
interval - public void setMaxIdleTime(int time)
time - public boolean getLocalTransactionMode()
getLocalTransactionMode in interface ConnectionPoolPropertiespublic void setLocalTransactionMode(boolean mode)
mode - public int getDefaultIsolationLevel()
getDefaultIsolationLevel in interface ConnectionPoolPropertiespublic void close()
close in interface com.atomikos.icatch.OrderedLifecycleComponentpublic javax.jms.Connection createConnection()
throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSExceptionConnectionFactorypublic javax.jms.Connection createConnection(String user, String password) throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSExceptionConnectionFactorypublic Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionReferenceablepublic int poolAvailableSize()
public int poolTotalSize()
public void refreshPool()
public boolean getIgnoreSessionTransactedFlag()
@Deprecated public void setIgnoreSessionTransactedFlag(boolean value)
value - public void setConcurrentConnectionValidation(boolean value)
value - public boolean getConcurrentConnectionValidation()
public javax.jms.JMSContext createContext()
createContext in interface javax.jms.ConnectionFactorypublic javax.jms.JMSContext createContext(String userName, String password)
createContext in interface javax.jms.ConnectionFactorypublic javax.jms.JMSContext createContext(String userName, String password, int sessionMode)
createContext in interface javax.jms.ConnectionFactorypublic javax.jms.JMSContext createContext(int sessionMode)
createContext in interface javax.jms.ConnectionFactorypublic int getSessionCreationMode()
public void setSessionCreationMode(int mode)
SessionCreationMode.JMS_2_0.mode - Copyright © 2023. All rights reserved.