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

public class XAManagedConnectionFactory extends BaseWrapperManagedConnectionFactory
XAManagedConnectionFactory
Author:
David Jencks, Adrian Brock, Jesper Pedersen
See Also:
  • Field Details

  • Constructor Details

    • XAManagedConnectionFactory

      public XAManagedConnectionFactory(Map<String,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 Details

    • getURLProperty

      public String getURLProperty()
      Get the URL property
      Returns:
      The value
    • setURLProperty

      public void setURLProperty(String urlProperty)
      Set the URL property
      Parameters:
      urlProperty - The value
    • getXADataSourceClass

      public String getXADataSourceClass()
      Get the XaDataSourceClass value.
      Returns:
      the XaDataSourceClass value.
    • setXADataSourceClass

      public void setXADataSourceClass(String xaDataSourceClass)
      Set the XaDataSourceClass value.
      Parameters:
      xaDataSourceClass - The new XaDataSourceClass value.
    • getXADataSourceProperties

      public String 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 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:
      jakarta.resource.ResourceException - Thrown in case of an error
    • getIsSameRMOverrideValue

      public Boolean getIsSameRMOverrideValue()
      Get the IsSameRMOverrideValue value.
      Returns:
      the IsSameRMOverrideValue value.
    • setIsSameRMOverrideValue

      public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
      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 subject
      cri - 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 properties
      xaConnection - 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()
      Specified by:
      hashCode in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      equals in class Object
    • getXADataSource

      protected XADataSource getXADataSource() throws jakarta.resource.ResourceException
      Get the XA datasource
      Returns:
      The value
      Throws:
      jakarta.resource.ResourceException - Thrown if an error occurs
    • toString

      public String toString()
      Overrides:
      toString in class Object