Package org.fcrepo.server.storage

Examples of org.fcrepo.server.storage.ConnectionPoolManager


        // don't get out of sync with the database.
        blankExistingTables();
        try {
            m_server = Rebuild.getServer();
            // now get the connectionpool
            ConnectionPoolManager cpm =
                    (ConnectionPoolManager) m_server
                            .getModule("org.fcrepo.server.storage.ConnectionPoolManager");
            if (cpm == null) {
                throw new ModuleInitializationException("ConnectionPoolManager not loaded.",
                                                        "ConnectionPoolManager");
            }
            m_connectionPool = cpm.getPool();
            ensureFedoraTables();
            // set m_now, which is both when we are starting this job and the flag
            // that it was started
            m_now = System.currentTimeMillis();
            startStatus(m_now);
View Full Code Here


//        m_resourceIndex =
//                (ResourceIndex) getServer()
//                        .getModule("org.fcrepo.server.resourceIndex.ResourceIndex");

        // now get the connectionpool
        ConnectionPoolManager cpm =
                (ConnectionPoolManager) getServer()
                        .getModule("org.fcrepo.server.storage.ConnectionPoolManager");
        if (cpm == null) {
            throw new ModuleInitializationException("ConnectionPoolManager not loaded.",
                                                    getRole());
        }
        try {
            if (m_storagePool == null) {
                m_connectionPool = cpm.getPool();
            } else {
                m_connectionPool = cpm.getPool(m_storagePool);
            }
        } catch (ConnectionPoolNotFoundException cpnfe) {
            String storagePool = (m_storagePool == null)?"[null]":m_storagePool;
            throw new ModuleInitializationException("Couldn't get required "
                    + "connection pool " + storagePool + " ...wasn't found", getRole());
View Full Code Here

        }

        //
        // get connectionPool from ConnectionPoolManager
        //
        ConnectionPoolManager cpm =
                (ConnectionPoolManager) getServer()
                        .getModule("org.fcrepo.server.storage.ConnectionPoolManager");
        if (cpm == null) {
            throw new ModuleInitializationException("ConnectionPoolManager module was required, but apparently has "
                                                            + "not been loaded.",
                                                    getRole());
        }
        String cPoolName = getParameter("connectionPool");
        ConnectionPool cPool = null;
        try {
            if (cPoolName == null) {
                logger.debug("connectionPool unspecified; using default from "
                        + "ConnectionPoolManager.");
                cPool = cpm.getPool();
            } else {
                logger.debug("connectionPool specified: " + cPoolName);
                cPool = cpm.getPool(cPoolName);
            }
        } catch (ConnectionPoolNotFoundException cpnfe) {
            throw new ModuleInitializationException("Could not find requested "
                    + "connectionPool.", getRole());
        }
View Full Code Here

            throw new ModuleInitializationException("backslash_is_escape parameter must be either true or false",
                                                    getRole());
        }

        // get connectionPool from ConnectionPoolManager
        ConnectionPoolManager cpm =
                (ConnectionPoolManager) getServer()
                        .getModule("org.fcrepo.server.storage.ConnectionPoolManager");
        if (cpm == null) {
            throw new ModuleInitializationException("ConnectionPoolManager module was required, but apparently has "
                                                            + "not been loaded.",
                                                    getRole());
        }

        ConnectionPool cPool;
        try {
            cPool = cpm.getPool();
        } catch (ConnectionPoolNotFoundException e1) {
            throw new ModuleInitializationException("Could not find requested "
                    + "connectionPool.", getRole());
        }
View Full Code Here

     * Get a reference to the ConnectionPoolManager so we can give the instance
     * constructor a ConnectionPool later in initializeIfNeeded().
     */
    @Override
    public void postInitModule() throws ModuleInitializationException {
        ConnectionPoolManager mgr =
                (ConnectionPoolManager) getServer()
                        .getModule("org.fcrepo.server.storage.ConnectionPoolManager");
        if (mgr == null) {
            throw new ModuleInitializationException("ConnectionPoolManager module not loaded.",
                                                    getRole());
        }
        try {
            m_pidGenerator = new DBPIDGenerator(mgr.getPool(), m_oldPidGenDir);
        } catch (Exception e) {
            String msg = "Can't get default connection pool";
            logger.error(msg, e);
            throw new ModuleInitializationException(msg, getRole());
        }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.storage.ConnectionPoolManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.