handleEncoding(info, conCri);
    public Connection connect(String url, Properties info)        throws SQLException    {        if (url == null || !url.startsWith(FIREBIRD_PROTOCOL))            return null;        final GDSType type = getDriverType(url);        try {            if (info == null)                info = new Properties();            info = FBDriverPropertyManager.normalize(url, info);                        int qMarkIndex = url.indexOf('?');            if (qMarkIndex != -1)                url = url.substring(0, qMarkIndex);            Integer blobBufferLength = extractBlobBufferLength(info);                        FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(type);                        FBConnectionRequestInfo conCri =                FBConnectionHelper.getCri(info, mcf.getDefaultConnectionRequestInfo());            handleEncoding(info, conCri);            FBTpbMapper tpbMapper = FBConnectionHelper.getTpbMapper(info);            // extract the user            String user = conCri.getStringProperty(ISCConstants.isc_dpb_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 if (url.startsWith(FIREBIRD_PROTOCOL_ORACLE_MODE))                databaseURL = url.substring(FIREBIRD_PROTOCOL_ORACLE_MODE.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);        }    }