Examples of ConnectionPool


Examples of org.fcrepo.server.storage.ConnectionPool

            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();
View Full Code Here

Examples of org.fto.jthink.jdbc.ConnectionPool

      while(keysIT.hasNext()){
        String connId = (String)keysIT.next();
        Connection conn = (Connection)openedConnsHM.get(connId);
        /* 如果采用了连接池管理连接 */
        if(useConnectionPool(connId)){
          ConnectionPool connPool = ConnectionPool.getConnectionPool(connId);
          /* 将活动连接返回到连接池 */
          connPool.returnConnection(conn);
        }else{
          /* 释放连接 */
          conn.close();
        }
      }
View Full Code Here

Examples of org.geotools.data.jdbc.ConnectionPool

        String namespace = (String) NAMESPACE.lookUp(params);

        // get connection pool
        PostgisConnectionFactory connFact = new PostgisConnectionFactory(dbHost, dbPort.toString(), database);
        connFact.setLogin(dbUser, dbPasswd);
        ConnectionPool pool = null;
        try {
            pool = connFact.getConnectionPool();
        } catch (SQLException e) {
            throw new DataSourceException("Could not create connection", e);
        }
View Full Code Here

Examples of org.jpos.tpl.ConnectionPool

    public ConnectionPoolAdaptor () {
        super ();
    }
    protected void initService () throws Exception {
        pool = new ConnectionPool ();
        pool.setConfiguration (getConfiguration());
        poolName = "connection.pool." + getName();
        NameRegistrar.register (poolName, pool);
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.ConnectionPool

        int numconnfree = getIntVal(entity, "numconnfree", "current");
        int numconnused = getIntVal(entity, "numconnused", "current");
        int waitqueuelength = getIntVal(entity, "waitqueuelength", "count");
        int numpotentialconnleak = getIntVal(entity, "numpotentialconnleak", "count");

        return new DataPoint<>(resourceName, new ConnectionPool(resourceName, numconnfree, numconnused, waitqueuelength, numpotentialconnleak));
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.ConnectionPool

                Application combinedApp = new Application(application.getApplicationName(), application.getComponents());
                applications.put(application.getApplicationName(), combinedApp);
            }

            for (ConnectionPool currentPool : current.getPools()) {
                ConnectionPool combinedPool = pools.get(currentPool.getJndiName());
                if (combinedPool == null) {
                    combinedPool = new ConnectionPool();
                    combinedPool.setJndiName(currentPool.getJndiName());
                    pools.put(currentPool.getJndiName(), combinedPool);
                }
                combinedPool.setNumconnfree(currentPool.getNumconnfree() + combinedPool.getNumconnfree());
                combinedPool.setNumconnused(currentPool.getNumconnused() + combinedPool.getNumconnused());
                combinedPool.setNumpotentialconnleak(currentPool.getNumpotentialconnleak() + combinedPool.getNumpotentialconnleak());
                combinedPool.setWaitqueuelength(currentPool.getWaitqueuelength() + combinedPool.getWaitqueuelength());
            }

            //logs.addAll(current.getLogRecords());
        }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.ConnectionPool

    @Test
    public void basic_subvalue_replace() throws Exception {
        String expected = "Free Connections: 42";
        String template = "Free Connections: ${pools[0].numconnfree}";
        List<ConnectionPool> pools = new ArrayList<>();
        pools.add(new ConnectionPool("anything", 42, 24, 1, 1));

        Snapshot snapshot = new Snapshot.Builder().pools(pools).build();
        String result = instance.processBasicMessage(template, snapshot);
        assertEquals(expected, result);
    }
View Full Code Here

Examples of org.lightfish.business.servermonitoring.entity.ConnectionPool

        String expected = "<h3>Free Connections</h3>\n"
                + "<pre><code>42\n"
                + "</code></pre>";
        String template = "### Free Connections\n    ${pools[0].numconnfree}";
        List<ConnectionPool> pools = new ArrayList<>();
        pools.add(new ConnectionPool("anything", 42, 24, 1, 1));

        Snapshot snapshot = new Snapshot.Builder().pools(pools).build();
        String result = instance.processRichMessage(template, snapshot);
        System.out.println(result);
        assertEquals(expected, result);
View Full Code Here

Examples of org.lightview.view.ConnectionPool

    }

    void createPoolTab(ConnectionPoolBindings valueAdded) {
        ReadOnlyLongProperty id = this.dashboardPresenter.getId();
        String jndiName = valueAdded.getJndiName().get();
        ConnectionPool connectionPool = new ConnectionPool(id, valueAdded);
        Node view = connectionPool.view();
        Tab tab = createTab(view, "Resource: " + jndiName);
        this.tabPane.getTabs().add(tab);
    }
View Full Code Here

Examples of org.postgresql.jdbc2.optional.ConnectionPool

     */
    protected void initializeDataSource()
    {
        if (bds == null)
        {
            bds = new ConnectionPool();
            bds.setServerName(TestUtil.getServer());
            bds.setPortNumber(TestUtil.getPort());
            bds.setDatabaseName(TestUtil.getDatabase());
            bds.setUser(TestUtil.getUser());
            bds.setPassword(TestUtil.getPassword());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.