else if (url.startsWith(FIREBIRD_PROTOCOL_ORACLE_MODE)) databaseURL = url.substring(FIREBIRD_PROTOCOL_ORACLE_MODE.length());
    public Connection connect(String url, Properties info)        throws SQLException    {        if (url == null || !url.startsWith(FIREBIRD_PROTOCOL))        {            return null;        } // end of if ()        final GDSType type = getDriverType(url);        Integer blobBufferLength = null;        try {            int iQuestionMark = url.indexOf("?");            if (iQuestionMark > -1) {                if(info == null) info = new Properties();                String propString = url.substring(iQuestionMark+1);                StringTokenizer st = new StringTokenizer(propString,"&");                while(st.hasMoreTokens()) {                    String propertyString = st.nextToken();                    int iIs = propertyString.indexOf("=");                    if(iIs > -1) {                        String property = propertyString.substring(0, iIs);                        String value = propertyString.substring(iIs+1);                        info.setProperty(property,value);                        if (property.equals(BLOB_BUFFER_LENGTH))                         {                            try                             {                                blobBufferLength = new Integer(value);                            }                            catch (NumberFormatException e)                            {                                throw new FBSQLException(                                    "Blob buffer length " + value +                                     " could not be converted to an integer",                                    FBSQLException.SQL_STATE_INVALID_CONN_ATTR);                            }                                                    }                                             } else {                        info.setProperty(propertyString, "");                    }                }                url = url.substring(0,iQuestionMark);            }            FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(type);                        // workaround to make other Java people happy            String charSet = info.getProperty(CHARSET);            if (info.getProperty("isc_dpb_lc_ctype") == null &&                info.getProperty("lc_ctype") == null)             {                String iscEncoding = FBConnectionHelper.getIscEncoding(charSet);                if (iscEncoding != null)                	info.setProperty("lc_ctype", iscEncoding);            }                        FBConnectionRequestInfo conCri =                FBConnectionHelper.getCri(info, mcf.getDefaultConnectionRequestInfo());                        FBTpbMapper tpbMapper = FBConnectionHelper.getTpbMapper(info);            // extract the user            String user = info.getProperty(USER);            if (user == null)                user = conCri.getStringProperty(ISCConstants.isc_dpb_user_name);            if (user == null)                throw new FBSQLException(                    "User for database connection not specified.",                    FBSQLException.SQL_STATE_INVALID_CONN_ATTR);            // extract the password            String password = info.getProperty(PASSWORD);            if (password == null)                password = conCri.getStringProperty(ISCConstants.isc_dpb_password);            if (password == null)                throw new FBSQLException(                    "Password for database connection not specified.",                    FBSQLException.SQL_STATE_INVALID_CONN_ATTR);                        // extract the database URL            String databaseURL;            if( url.startsWith(FIREBIRD_PROTOCOL_NATIVE) )                databaseURL = url.substring(FIREBIRD_PROTOCOL_NATIVE.length());            else if( url.startsWith(FIREBIRD_PROTOCOL_NATIVE_EMBEDDED) )                databaseURL = url.substring(FIREBIRD_PROTOCOL_NATIVE_EMBEDDED.length()+1);            else if (url.startsWith(FIREBIRD_PROTOCOL_NATIVE_LOCAL))                databaseURL = url.substring(FIREBIRD_PROTOCOL_NATIVE_LOCAL.length());            else                databaseURL = url.substring(FIREBIRD_PROTOCOL.length());            mcf.setDatabase(databaseURL);            mcf.setConnectionRequestInfo(conCri);                        if (tpbMapper != null)                mcf.setTpbMapper(tpbMapper);                            if (blobBufferLength != null)             {                mcf.setBlobBufferLength(blobBufferLength);                            } // end of if ()            mcf = mcf.canonicalize();            FBDataSource dataSource = null;            synchronized (mcfToDataSourceMap)            {                dataSource = (FBDataSource)mcfToDataSourceMap.get(mcf);                                if (dataSource == null) {                    dataSource = (FBDataSource)mcf.createConnectionFactory();                    mcfToDataSourceMap.put(mcf, dataSource);                } // end of if ()            }            return dataSource.getConnection(user, password);        } catch(ResourceException resex) {            throw new FBSQLException(resex);        }    }