All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl Maven / Gradle / Ivy

There is a newer version: 4.0.10.java7
Show newest version
package org.firebirdsql.gds.impl.jni;

import org.firebirdsql.gds.GDSException;
import org.firebirdsql.gds.impl.GDSType;
import org.firebirdsql.logging.Logger;
import org.firebirdsql.logging.LoggerFactory;

public class EmbeddedGDSImpl extends JniGDSImpl {

    private static Logger log = LoggerFactory.getLogger(EmbeddedGDSImpl.class,
            false);

    private static final String[] EMBEDDED_LIBRARIES_TO_TRY = { 
        "fbembed.dll",
        "libfbembed.so"
    };

    public static final String EMBEDDED_TYPE_NAME = "EMBEDDED";

    public EmbeddedGDSImpl() {
        this(GDSType.getType(EMBEDDED_TYPE_NAME));
    }

    public EmbeddedGDSImpl(GDSType gdsType) {
        super(gdsType);

        final boolean logging = log != null;

        if (logging) log.info("Attempting to initilize native library.");

        attemptToLoadAClientLibraryFromList(EMBEDDED_LIBRARIES_TO_TRY);

        if (logging) log.info("Initilized native library OK.");
    }

    protected String getServerUrl(String file_name) throws GDSException {
        return file_name;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy