Class JdbcConnectionDefinitionManager


  • public class JdbcConnectionDefinitionManager
    extends Object
    Manages the list of local database connections for this application.

    The list of local connections is contained in the user preferences for this user. The structure of the preferences is as follows:

    • One node per connection - the name of the node is the JNDI Connection name
    • Under each node, the following set of string keys and values which define each connection
      • driver - the JDBC driver class
      • url - the URL of the database
      • username - the username used to connect to the database
      • password - the password used to connect to the database
    • Constructor Detail

      • JdbcConnectionDefinitionManager

        public JdbcConnectionDefinitionManager()
        Initializes the instance by loading the database connection information from the configuration storage.
      • JdbcConnectionDefinitionManager

        public JdbcConnectionDefinitionManager​(String node)
    • Method Detail

      • removeSource

        public void removeSource​(String name)
        Removes the specified connection-definition from the list of connections.
        Parameters:
        name - the name of the JNDI source to remove from the list
      • updateSourceList

        public boolean updateSourceList​(JdbcConnectionDefinition source)
        Adds or updates the source list with the specified source entry. Delagates to JNDI or JDBC method
        Parameters:
        source - the entry to add/update in the list
        Throws:
        IllegalArgumentException - indicates the source is null