Class JNDIConnectionProvider

    • Constructor Detail

      • JNDIConnectionProvider

        public JNDIConnectionProvider​(java.lang.String jndiUrl,
                                      boolean alwaysLookup)
        Constructor
        Parameters:
        jndiUrl - The url for the datasource
      • JNDIConnectionProvider

        public JNDIConnectionProvider​(java.lang.String jndiUrl,
                                      java.util.Properties jndiProps,
                                      boolean alwaysLookup)
        Constructor
        Parameters:
        jndiUrl - The URL for the DataSource
        jndiProps - The JNDI properties to use when establishing the InitialContext for the lookup of the given URL.
    • Method Detail

      • getLog

        protected org.slf4j.Logger getLog()
      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface ConnectionProvider
        Returns:
        connection managed by this provider
        Throws:
        java.sql.SQLException
      • isAlwaysLookup

        public boolean isAlwaysLookup()
      • setAlwaysLookup

        public void setAlwaysLookup​(boolean b)
      • shutdown

        public void shutdown()
                      throws java.sql.SQLException
        Specified by:
        shutdown in interface ConnectionProvider
        Throws:
        java.sql.SQLException
      • initialize

        public void initialize()
                        throws java.sql.SQLException
        Specified by:
        initialize in interface ConnectionProvider
        Throws:
        java.sql.SQLException