Package org.jboss.jca.adapters.jdbc.xa
Class XAManagedConnectionFactory
java.lang.Object
org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory
- All Implemented Interfaces:
jakarta.resource.spi.ManagedConnectionFactory,jakarta.resource.spi.ResourceAdapterAssociation,jakarta.resource.spi.ValidatingManagedConnectionFactory,Serializable,Statistics
XAManagedConnectionFactory
- Author:
- David Jencks, Adrian Brock, Jesper Pedersen
- See Also:
-
Field Summary
FieldsFields inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
bundle, checkValidConnectionSQL, connectionChecker, doQueryTimeout, isTransactionQueryTimeout, log, newConnectionSQL, password, poolValidationLoggingEnabled, preparedStatementCacheSize, queryTimeout, sharePS, staleConnectionChecker, staleConnectionCheckerProps, TRACK_STATEMENTS_FALSE, TRACK_STATEMENTS_FALSE_INT, TRACK_STATEMENTS_NOWARN, TRACK_STATEMENTS_NOWARN_INT, TRACK_STATEMENTS_TRUE, TRACK_STATEMENTS_TRUE_INT, trackStatements, transactionIsolation, urlDelimiter, urlSelectorStrategyClassName, userName, validConnectionCheckerClassName, validConnectionCheckerProps -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.this constructor internally requires the use of synchronized map instance.XAManagedConnectionFactory(Map<String, String> xaDataSourceProps) Constructor -
Method Summary
Modifier and TypeMethodDescriptionjakarta.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) booleanGet the IsSameRMOverrideValue value.Get the URL propertyprotected XADataSourceGet the XA datasourceGet the XaDataSourceClass value.Get the XADataSourceProperties value.jakarta.resource.spi.ManagedConnectiongetXAManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) Get the managed connectioninthashCode()jakarta.resource.spi.ManagedConnectionmatchManagedConnections(Set mcs, Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) protected jakarta.resource.spi.ManagedConnectionnewXAManagedConnection(Properties props, XAConnection xaConnection) This method can be overwritten by sublcasses to provide rm specific implementation of XAManagedConnectionvoidsetIsSameRMOverrideValue(Boolean isSameRMOverrideValue) Set the IsSameRMOverrideValue value.voidsetURLProperty(String urlProperty) Set the URL propertyvoidsetXADataSourceClass(String xaDataSourceClass) Set the XaDataSourceClass value.voidsetXADataSourceProperties(String xaDataSourceProperties) Deprecated.this method requires the internal usage of a synchronized map, and will only work with objects created using the deprecatedXAManagedConnectionFactory()constructor.toString()Methods inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory
createConnectionFactory, createConnectionFactory, getCheckValidConnectionSQL, getClassLoaderPlugin, getConnectionListenerClassName, getConnectionListenerProperties, getConnectionProperties, getExceptionSorterClassLoader, getExceptionSorterClassName, getExceptionSorterProperties, getExceptionSorterProps, getInvalidConnections, getJndiName, getLogWriter, getNewConnectionSQL, getPassword, getPreparedStatementCacheSize, getQueryTimeout, getReauthEnabled, getReauthPluginClassName, getReauthPluginProperties, getResourceAdapter, getSharePreparedStatements, getSpy, getStaleConnectionCheckerClassName, getStaleConnectionCheckerProperties, getStaleConnectionCheckerProps, getStaleConnectionClassLoader, getStatistics, getTrackStatements, getTransactionIsolation, getURLDelimiter, getUrlSelectorStrategyClassName, getUserName, getUseTryLock, getValidConnectionCheckerClassLoader, getValidConnectionCheckerClassName, getValidConnectionCheckerProperties, getValidConnectionCheckerProps, isDoLocking, isExceptionFatal, isJTA, isTransactionQueryTimeout, setCheckValidConnectionSQL, setClassLoaderPlugin, setConnectionListenerClassName, setConnectionListenerProperties, setExceptionSorterClassLoader, setExceptionSorterClassName, setExceptionSorterProperties, setJndiName, setJTA, setLogWriter, setNewConnectionSQL, setOriginalTCCLn, setPassword, setPoolValidationLoggingEnabled, setPreparedStatementCacheSize, setQueryTimeout, setReauthEnabled, setReauthPluginClassName, setReauthPluginProperties, setResourceAdapter, setSharePreparedStatements, setSpy, setStaleConnectionCheckerClassLoader, setStaleConnectionCheckerClassName, setStaleConnectionCheckerProperties, setTrackStatements, setTransactionIsolation, setTransactionQueryTimeout, setURLDelimiter, setUrlSelectorStrategyClassName, setUserName, setUseTryLock, setValidConnectionCheckerClassLoader, setValidConnectionCheckerClassName, setValidConnectionCheckerProperties
-
Field Details
-
xaProps
THe XA properties
-
-
Constructor Details
-
XAManagedConnectionFactory
Constructor -
XAManagedConnectionFactory
Deprecated.this constructor internally requires the use of synchronized map instance. This type of map can cause deadlocks when comparing two connection factories. For that reason, prefer to useXAManagedConnectionFactory(Map)instead.Constructor.
-
-
Method Details
-
getURLProperty
Get the URL property- Returns:
- The value
-
setURLProperty
Set the URL property- Parameters:
urlProperty- The value
-
getXADataSourceClass
Get the XaDataSourceClass value.- Returns:
- the XaDataSourceClass value.
-
setXADataSourceClass
Set the XaDataSourceClass value.- Parameters:
xaDataSourceClass- The new XaDataSourceClass value.
-
getXADataSourceProperties
Get the XADataSourceProperties value.- Returns:
- the XADataSourceProperties value.
-
setXADataSourceProperties
@Deprecated public void setXADataSourceProperties(String xaDataSourceProperties) throws jakarta.resource.ResourceException Deprecated.this method requires the internal usage of a synchronized map, and will only work with objects created using the deprecatedXAManagedConnectionFactory()constructor. Because this can lead to a deadlock when comparing two instances of this class, prefer to define the data source properties at theXAManagedConnectionFactory(Map)constructor instead.Set the XADataSourceProperties value.- Parameters:
xaDataSourceProperties- The new XADataSourceProperties value.- Throws:
jakarta.resource.ResourceException- Thrown in case of an error
-
getIsSameRMOverrideValue
Get the IsSameRMOverrideValue value.- Returns:
- the IsSameRMOverrideValue value.
-
setIsSameRMOverrideValue
Set the IsSameRMOverrideValue value.- Parameters:
isSameRMOverrideValue- The new IsSameRMOverrideValue value.
-
createManagedConnection
public jakarta.resource.spi.ManagedConnection createManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) throws jakarta.resource.ResourceException - Throws:
jakarta.resource.ResourceException
-
getXAManagedConnection
public jakarta.resource.spi.ManagedConnection getXAManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) throws jakarta.resource.ResourceException Get the managed connection- Parameters:
subject- The subjectcri- The connection request info- Returns:
- The connection
- Throws:
jakarta.resource.ResourceException- Thrown if an error occurs
-
newXAManagedConnection
protected jakarta.resource.spi.ManagedConnection newXAManagedConnection(Properties props, XAConnection xaConnection) throws SQLException This method can be overwritten by sublcasses to provide rm specific implementation of XAManagedConnection- Parameters:
props- The propertiesxaConnection- The XA connection- Returns:
- The managed connection
- Throws:
SQLException- Thrown if an error occurs
-
matchManagedConnections
public jakarta.resource.spi.ManagedConnection matchManagedConnections(Set mcs, Subject subject, jakarta.resource.spi.ConnectionRequestInfo cri) throws jakarta.resource.ResourceException - Throws:
jakarta.resource.ResourceException
-
hashCode
public int hashCode() -
equals
-
getXADataSource
Get the XA datasource- Returns:
- The value
- Throws:
jakarta.resource.ResourceException- Thrown if an error occurs
-
toString
-