Class DataSourceConfig


  • public class DataSourceConfig
    extends java.lang.Object
    Simplest of all possible holder objects for all of the data source info required by the Entity test environment. Use the constructor to simultaneously create the instance and set the fields.

    At least one (transactional) data source must be specified and potentially a non-transactional if such a data source is appropriate (e.g. for non-transactional operations).

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String driver
      Driver class name string
      java.lang.String dsName
      Identifier to name this data source (must be Container-unique)
      java.lang.String jndiName
      JNDI name that data source should be bound to
      java.lang.String password
      Password to use when connecting to the db
      java.lang.String url
      URL that is passed to the driver to determine db
      java.lang.String user
      User name to use when connecting to the db
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSourceConfig​(java.lang.String dsName, java.lang.String jndiName, java.lang.String url, java.lang.String driver, java.lang.String user, java.lang.String password)
      Constructor used to create a DataSourceConfig
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()
      INTERNAL:
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • dsName

        public java.lang.String dsName
        Identifier to name this data source (must be Container-unique)
      • jndiName

        public java.lang.String jndiName
        JNDI name that data source should be bound to
      • url

        public java.lang.String url
        URL that is passed to the driver to determine db
      • driver

        public java.lang.String driver
        Driver class name string
      • user

        public java.lang.String user
        User name to use when connecting to the db
      • password

        public java.lang.String password
        Password to use when connecting to the db
    • Constructor Detail

      • DataSourceConfig

        public DataSourceConfig​(java.lang.String dsName,
                                java.lang.String jndiName,
                                java.lang.String url,
                                java.lang.String driver,
                                java.lang.String user,
                                java.lang.String password)
        Constructor used to create a DataSourceConfig
        Parameters:
        dsName - Data source identifier
        jndiName - Name that the data source should be bound to in JNDI
        url - Passed to the driver to determine db
        driver - The class name for the db driver
        user - User name to use when connecting to the db
        password - Password to use when connecting to the db
    • Method Detail

      • toString

        public java.lang.String toString()
        INTERNAL:
        Overrides:
        toString in class java.lang.Object