Class TeiidDataSource

  • All Implemented Interfaces:
    Serializable, Wrapper, CommonDataSource, ConnectionPoolDataSource, DataSource, XADataSource

    public class TeiidDataSource
    extends BaseDataSource
    The Teiid JDBC DataSource implementation class of DataSource and XADataSource.

    The DataSource interface follows the JavaBean design pattern, meaning the implementation class has properties that are accessed with getter methods and set using setter methods, and where the getter and setter methods follow the JavaBean naming convention (e.g., getPropertyName() : PropertyType and setPropertyName(PropertyType) : void). The XADataSource interface is almost identical to the DataSource interface, but rather than returning Connection instances, there are methods that return XAConnection instances that can be used with distributed transactions.

    The following are the properties for this DataSource:

    Property NameTypeDescription
    portNumber int The port number where a Teiid Server is listening for requests.
    serverName StringThe hostname or IP address of the Teiid Server.
    If "serverName" property is not set then data source will try to create a embedded connection to the Teiid server.
    See Also:
    Serialized Form
    • Constructor Detail

      • TeiidDataSource

        public TeiidDataSource()
    • Method Detail

      • getPortNumber

        public int getPortNumber()
        Returns the port number.
        Returns:
        the port number
      • getServerName

        public String getServerName()
        Returns the name of the server.
        Returns:
        the name of the server
      • isSecure

        public boolean isSecure()
        Returns a flag indicating whether to create a secure connection or not.
        Returns:
        True if using secure mms: protocol, false for normal mm: protocol.
        Since:
        5.0.2
      • getSecure

        public boolean getSecure()
        Same as "isSecure". Required by the reflection login in connection pools to identify the type
        Returns:
      • getAlternateServers

        public String getAlternateServers()
        Returns a string containing a comma delimited list of alternate server(s). The list will be in the form of server2[:port2][,server3[:port3]]. If no alternate servers have been defined null is returned.
        Returns:
        A comma delimited list of server:port or null If no alternate servers are defined.
        Since:
        5.5
      • setPortNumber

        public void setPortNumber​(int portNumber)
        Sets the portNumber.
        Parameters:
        portNumber - The portNumber to set
      • setServerName

        public void setServerName​(String serverName)
        Sets the serverName.
        Parameters:
        serverName - The serverName to set
      • setSecure

        public void setSecure​(boolean secure)
        Sets the secure flag to use mms: protocol instead of the default mm: protocol.
        Parameters:
        secure - True to use mms:
        Since:
        5.0.2
      • setAlternateServers

        public void setAlternateServers​(String servers)
        Sets a list of alternate server(s) that can be used for connection fail-over. The form of the list should be server2[:port2][,server3:[port3][,...]]. If ":port" is omitted, the port defined by portNumber is used. If servers is empty or null, the value of alternateServers is cleared.
        Parameters:
        servers - A comma delimited list of alternate Server(s):Port(s) to use for connection fail-over. If blank or null, the list is cleared.
        Since:
        5.5
      • reasonWhyInvalidPortNumber

        public static String reasonWhyInvalidPortNumber​(int portNumber)
        Return the reason why the supplied port number may be invalid, or null if it is considered valid.
        Parameters:
        portNumber - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setPortNumber(int)
      • reasonWhyInvalidServerName

        public static String reasonWhyInvalidServerName​(String serverName)
        Return the reason why the supplied server name may be invalid, or null if it is considered valid.
        Parameters:
        serverName - a possible value for the property
        Returns:
        the reason why the property is invalid, or null if it is considered valid
        See Also:
        setServerName(String)
      • reasonWhyInvalidSocketsPerVM

        public static String reasonWhyInvalidSocketsPerVM​(String socketsPerVM)
        The reason why "socketsPerVM" is invalid.
        Parameters:
        socketsPerVM - property
        Returns:
        reason
      • reasonWhyInvalidStickyConnections

        public static String reasonWhyInvalidStickyConnections​(String stickyConnections)
        The reason why "stickyConnections" is invalid.
        Parameters:
        stickyConnections - property
        Returns:
        reason
      • getAutoFailover

        public String getAutoFailover()
        Returns:
        Returns the transparentFailover.
      • setAutoFailover

        public void setAutoFailover​(String autoFailover)
        Parameters:
        autoFailover - The transparentFailover to set.
      • isPassthroughAuthentication

        public boolean isPassthroughAuthentication()
        When true, this connection uses the passed in security domain to do the authentication.
        Returns:
      • getPassthroughAuthentication

        public boolean getPassthroughAuthentication()
        Same as "isPassthroughAuthentication". Required by the reflection login in connection pools to identify the type
        Returns:
      • setPassthroughAuthentication

        public void setPassthroughAuthentication​(boolean passthroughAuthentication)
        When set to true, the connection uses the passed in security domain to do the authentication.
        Since:
        7.1
      • getJaasName

        public String getJaasName()
        Application name from JAAS Login Config file
        Returns:
        Since:
        7.6
      • setJaasName

        public void setJaasName​(String jaasApplicationName)
        Application name from JAAS Login Config file
        Since:
        7.6
      • getKerberosServicePrincipleName

        public String getKerberosServicePrincipleName()
        Kerberos KDC service principle name
        Returns:
        Since:
        7.6
      • setKerberosServicePrincipleName

        public void setKerberosServicePrincipleName​(String kerberosServerName)
        Kerberos KDC service principle name
        Since:
        7.6
      • setEncryptRequests

        public void setEncryptRequests​(boolean encryptRequests)
      • isEncryptRequests

        public boolean isEncryptRequests()
      • getEncryptRequests

        public boolean getEncryptRequests()
      • isLoadBalance

        @Deprecated
        public boolean isLoadBalance()
        Deprecated.
      • getLoadBalance

        @Deprecated
        public boolean getLoadBalance()
        Deprecated.
      • setLoadBalance

        @Deprecated
        public void setLoadBalance​(boolean loadBalance)
        Deprecated.