Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * $Id$
  * 
  * Firebird Open Source J2ee connector - jdbc driver
  *
  * Distributable under LGPL license.
  * You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html
  *
  * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * LGPL License for more details.
 *
 * This file was created by members of the firebird development team.
 * All individual contributions remain the Copyright (C) of those
 * individuals.  Contributors to this file are either listed here or
 * can be obtained from a CVS history command.
 *
 * All rights reserved.
 */
package org.firebirdsql.gds.impl.jni;
public class NativeGDSImpl extends JniGDSImpl {
    private static Logger log = LoggerFactory.getLogger(NativeGDSImpl.classfalse);
    
    
When initializing in type2 mode this class will attempt too load the following firebird native dlls in the order listed until one loads successfully.
    private static final String[] CLIENT_LIBRARIES_TO_TRY = {
            "fbclient.dll""libfbclient.so"};
    public static final String NATIVE_TYPE_NAME = "NATIVE";
    
    public NativeGDSImpl() {
        this(GDSType.getType());
    }
    public NativeGDSImpl(GDSType gdsType) {
        super(gdsType);
        final boolean logging =  != null;
        if (logging
            .info("Attempting to initilize native library.");
        if (logging
            .info("Initilized native library OK.");
    }
    protected String getServerUrl(String file_namethrows GDSException {
        if ( != null.debug("Original file name: " + file_name);
        DbAttachInfo dbai = new DbAttachInfo(file_name);
        final String fileName;
        if (dbai.getFileName().indexOf(':') == -1
                && dbai.getFileName().startsWith("/") == false) {
            fileName = dbai.getServer() + "/" + dbai.getPort() + ":" + "/"
                    + dbai.getFileName();
        } else
            fileName = dbai.getServer() + "/" + dbai.getPort() + ":"
                    + dbai.getFileName();
        if ( != null.debug("File name for native code: " + fileName);
        return fileName;
    }
New to GrepCode? Check out our FAQ X