public boolean test() throws NamingException, SQLException {
        java.sql.Connection connection = null;

        if (this.type.equalsIgnoreCase("jndi")) {
            // return the connection if possible from the JNDI calls
            // Obtain our environment naming context
            // Ex: context="java:comp/env"  datasource="jdbc/EmployeeDB"
            Context initCtx = new InitialContext();
            Context envCtx;
            if (jndiContext != null && jndiContext.length() > 0)
                envCtx = (Context) initCtx.lookup(jndiContext);
            else
                envCtx = initCtx;

            // Look up our data source
            DataSource ds = (DataSource) envCtx.lookup(jndiDatasource);

            // Allocate and use a connection from the pool then put it back
            connection = ds.getConnection();
            if (connection != null)
                connection.close();
            return true;
        }
        else if (this.type.equalsIgnoreCase("jdbc")) {

            // create a connection via driver
            log.debug("ATTEMPTING TO CREATE JDBC CONNECTION: [" + jdbcDriver + " @ " + jdbcUrl + "] " + jdbcUserName + " / " + jdbcPassword);

            // check that we can instaciate the driver class
            try {Class.forName(jdbcDriver);}
            catch (ClassNotFoundException cnfe) {
                log.info("CONNECTION DRIVER LOAD EXCEPTION: DRIVER [" + jdbcDriver + "] CLASSES NOT FOUND!");
                throw new SQLException(cnfe);
            }
            log.debug("loaded driver...");
            try {connection = DriverManager.getConnection(jdbcUrl, jdbcUserName, jdbcPassword);}
            catch (SQLException ex) {
                log.info("CONNECTION CREATION EXCEPTION: " + ex);
                throw(ex);
            }
            finally {
                if (connection != null)
                    connection.close();
            }
            log.debug("created connection...");
            return true;
        }
        else {
            log.warn("CONNECTION TYPE [" + type + "] WAS REQUESTED BUT THE CODE BLOCK WAS NOT CREATED TO HANDLE THIS TYPE!");
            return false;
        }
    }