Class XAManagedConnectionFactory

    • Field Detail

    • Constructor Detail

      • 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 Detail

      • 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 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 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 javax.resource.spi.ManagedConnection createManagedConnection​(Subject subject,
                                                                            javax.resource.spi.ConnectionRequestInfo cri)
                                                                     throws javax.resource.ResourceException
        Throws:
        javax.resource.ResourceException
      • getXAManagedConnection

        public javax.resource.spi.ManagedConnection getXAManagedConnection​(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​(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 javax.resource.spi.ManagedConnection matchManagedConnections​(Set mcs,
                                                                            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 Object
      • equals

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

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