code: protected Connection openConnection() throws SQLException
     {
        return SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
        {
           public Connection run() throws SQLException
           {
              return ds.getConnection();
           }
        });
     }
docs: Opens connection to database.