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:
    java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, javax.resource.spi.ValidatingManagedConnectionFactory, org.jboss.jca.core.spi.statistics.Statistics

      public class XAManagedConnectionFactory
      extends BaseWrapperManagedConnectionFactory

  XAManagedConnectionFactory
  Author:
    David Jencks, Adrian Brock, Jesper Pedersen
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<java.lang.String,java.lang.String>` | `xaProps` THe XA properties

    - ### Fields inherited from class org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory

      `bundle, checkValidConnectionSQL, connectionChecker, doQueryTimeout, isTransactionQueryTimeout, log, newConnectionSQL, password, 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

    Constructors
    Constructor and Description
    `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 use `XAManagedConnectionFactory(Map)` instead.
    `XAManagedConnectionFactory(java.util.Map<java.lang.String,java.lang.String> xaDataSourceProps)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.resource.spi.ManagedConnection` | `createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)`
    `boolean` | `equals(java.lang.Object other)`
    `java.lang.Boolean` | `getIsSameRMOverrideValue()` Get the IsSameRMOverrideValue value.
    `java.lang.String` | `getURLProperty()` Get the URL property
    `protected javax.sql.XADataSource` | `getXADataSource()` Get the XA datasource
    `java.lang.String` | `getXADataSourceClass()` Get the XaDataSourceClass value.
    `java.lang.String` | `getXADataSourceProperties()` Get the XADataSourceProperties value.
    `javax.resource.spi.ManagedConnection` | `getXAManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Get the managed connection
    `int` | `hashCode()`
    `javax.resource.spi.ManagedConnection` | `matchManagedConnections(java.util.Set mcs, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)`
    `protected javax.resource.spi.ManagedConnection` | `newXAManagedConnection(java.util.Properties props, javax.sql.XAConnection xaConnection)` This method can be overwritten by sublcasses to provide rm specific implementation of XAManagedConnection
    `void` | `setIsSameRMOverrideValue(java.lang.Boolean isSameRMOverrideValue)` Set the IsSameRMOverrideValue value.
    `void` | `setURLProperty(java.lang.String urlProperty)` Set the URL property
    `void` | `setXADataSourceClass(java.lang.String xaDataSourceClass)` Set the XaDataSourceClass value.
    `void` | `setXADataSourceProperties(java.lang.String xaDataSourceProperties)` Deprecated. this method requires the internal usage of a synchronized map, and will only work with objects created using the deprecated `XAManagedConnectionFactory()` constructor. Because this can lead to a deadlock when comparing two instances of this class, prefer to define the data source properties at the `XAManagedConnectionFactory(Map)` constructor instead.
    `java.lang.String` | `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, setPreparedStatementCacheSize, setQueryTimeout, setReauthEnabled, setReauthPluginClassName, setReauthPluginProperties, setResourceAdapter, setSharePreparedStatements, setSpy, setStaleConnectionCheckerClassLoader, setStaleConnectionCheckerClassName, setStaleConnectionCheckerProperties, setTrackStatements, setTransactionIsolation, setTransactionQueryTimeout, setURLDelimiter, setUrlSelectorStrategyClassName, setUserName, setUseTryLock, setValidConnectionCheckerClassLoader, setValidConnectionCheckerClassName, setValidConnectionCheckerProperties`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### xaProps

          protected final java.util.Map<java.lang.String,java.lang.String> xaProps

      THe XA properties

  - ### Constructor Detail

    - #### XAManagedConnectionFactory

          public XAManagedConnectionFactory(java.util.Map<java.lang.String,java.lang.String> xaDataSourceProps)

      Constructor

    - #### XAManagedConnectionFactory

          @Deprecated
          public 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 use `XAManagedConnectionFactory(Map)` instead.
      Constructor.

  - ### Method Detail

    - #### getURLProperty

          public java.lang.String getURLProperty()

      Get the URL property
      Returns:
        The value

    - #### setURLProperty

          public void setURLProperty(java.lang.String urlProperty)

      Set the URL property
      Parameters:
        `urlProperty` - The value

    - #### getXADataSourceClass

          public java.lang.String getXADataSourceClass()

      Get the XaDataSourceClass value.
      Returns:
        the XaDataSourceClass value.

    - #### setXADataSourceClass

          public void setXADataSourceClass(java.lang.String xaDataSourceClass)

      Set the XaDataSourceClass value.
      Parameters:
        `xaDataSourceClass` - The new XaDataSourceClass value.

    - #### getXADataSourceProperties

          public java.lang.String getXADataSourceProperties()

      Get the XADataSourceProperties value.
      Returns:
        the XADataSourceProperties value.

    - #### setXADataSourceProperties

          @Deprecated
          public void setXADataSourceProperties(java.lang.String xaDataSourceProperties)
                                                     throws javax.resource.ResourceException

      Deprecated. this method requires the internal usage of a synchronized map, and will only work with objects created using the deprecated `XAManagedConnectionFactory()` constructor. Because this can lead to a deadlock when comparing two instances of this class, prefer to define the data source properties at the `XAManagedConnectionFactory(Map)` constructor instead.
      Set the XADataSourceProperties value.
      Parameters:
        `xaDataSourceProperties` - The new XADataSourceProperties value.
      Throws:
        `javax.resource.ResourceException` - Thrown in case of an error

    - #### getIsSameRMOverrideValue

          public java.lang.Boolean getIsSameRMOverrideValue()

      Get the IsSameRMOverrideValue value.
      Returns:
        the IsSameRMOverrideValue value.

    - #### setIsSameRMOverrideValue

          public void setIsSameRMOverrideValue(java.lang.Boolean isSameRMOverrideValue)

      Set the IsSameRMOverrideValue value.
      Parameters:
        `isSameRMOverrideValue` - The new IsSameRMOverrideValue value.

    - #### createManagedConnection

          public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                              javax.resource.spi.ConnectionRequestInfo cri)
                                                                       throws javax.resource.ResourceException

      Throws:
        `javax.resource.ResourceException`

    - #### getXAManagedConnection

          public javax.resource.spi.ManagedConnection getXAManagedConnection(javax.security.auth.Subject subject,
                                                                             javax.resource.spi.ConnectionRequestInfo cri)
                                                                      throws javax.resource.ResourceException

      Get the managed connection
      Parameters:
        `subject` - The subject
        `cri` - The connection request info
      Returns:
        The connection
      Throws:
        `javax.resource.ResourceException` - Thrown if an error occurs

    - #### newXAManagedConnection

          protected javax.resource.spi.ManagedConnection newXAManagedConnection(java.util.Properties props,
                                                                                javax.sql.XAConnection xaConnection)
                                                                         throws java.sql.SQLException

      This method can be overwritten by sublcasses to provide rm specific implementation of XAManagedConnection
      Parameters:
        `props` - The properties
        `xaConnection` - The XA connection
      Returns:
        The managed connection
      Throws:
        `java.sql.SQLException` - Thrown if an error occurs

    - #### matchManagedConnections

          public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set mcs,
                                                                              javax.security.auth.Subject subject,
                                                                              javax.resource.spi.ConnectionRequestInfo cri)
                                                                       throws javax.resource.ResourceException

      Throws:
        `javax.resource.ResourceException`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `javax.resource.spi.ManagedConnectionFactory`
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object other)

      Specified by:
        `equals` in interface `javax.resource.spi.ManagedConnectionFactory`
      Overrides:
        `equals` in class `java.lang.Object`

    - #### getXADataSource

          protected javax.sql.XADataSource getXADataSource()
                                                    throws javax.resource.ResourceException

      Get the XA datasource
      Returns:
        The value
      Throws:
        `javax.resource.ResourceException` - Thrown if an error occurs

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)