Examples of ConnectionPool


Examples of anvil.database.ConnectionPool

    if (n>0) {
      _manager = new ConnectionManager();
      for(int i=0; i<n; i++) {
        PoolPreferences prefs = (PoolPreferences)_pools.get(i);
        if (prefs.isEnabled()) {
          _manager.addPool(new ConnectionPool(this, prefs));
        }
      }
    }
   
    if (_sessioncontainerprefs != null) {
View Full Code Here

Examples of com.atomikos.datasource.pool.ConnectionPool

      throwAtomikosJMSException("Property 'uniqueResourceName' of class AtomikosConnectionFactoryBean cannot be null.");
   
    try {
      getReference();
      ConnectionFactory cf = doInit();
      connectionPool = new ConnectionPool(cf, this);
     
    } catch ( AtomikosJMSException e ) {
      //don't log: AtomikosJMSException is logged on creation by the factory methods
      throw e;
    }
View Full Code Here

Examples of com.atomikos.jdbc.ConnectionPool

            String user , String password , int poolSize ,
            int connectionTimeout , boolean validation, String testQuery , boolean testOnBorrow ) throws SQLException
    {
        NonXAConnectionFactory factory = new NonXAConnectionFactory ( driver,
                user, password );
        pool = new ConnectionPool ( poolSize, factory, connectionTimeout, testQuery , testOnBorrow );
        previousConnections = new HashMap ();
        this.jndiName = jndiName;
        if ( !validation )
            addToMap ( jndiName, this );
    }
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

  /**
   * Clears the pool.
   */
  public void closeIdleConnections()
  {
    ConnectionPool connectionPool = _connectionPool;
   
    if (connectionPool != null)
      connectionPool.clear();
  }
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

        ((ResourceAdapterAssociation) managedFactory).setResourceAdapter(_ra);
      }

      ResourceManagerImpl rm = ResourceManagerImpl.createLocalManager();

      ConnectionPool cm = rm.createConnectionPool();

      if (_name != null)
        cm.setName(_name);

      if (_rar != null) {
        String trans = _rar.getTransactionSupport();

        if (trans == null) { // guess XA
          cm.setXATransaction(true);
          cm.setLocalTransaction(true);
        }
        else if (trans.equals("XATransaction")) {
          cm.setXATransaction(true);
          cm.setLocalTransaction(true);
        }
        else if (trans.equals("NoTransaction")) {
          cm.setXATransaction(false);
          cm.setLocalTransaction(false);
        }
        else if (trans.equals("LocalTransaction")) {
          cm.setXATransaction(false);
          cm.setLocalTransaction(true);
        }
      }

      cm.setLocalTransactionOptimization(getLocalTransactionOptimization());
      cm.setShareable(getShareable());

      Object connectionFactory = cm.init(managedFactory);
      cm.start();

      InjectManager beanManager = InjectManager.create();
      BeanBuilder factory
        = beanManager.createBeanFactory(connectionFactory.getClass());
     
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

      ResourceManagerImpl rm = ResourceManagerImpl.createLocalManager();

      ManagedConnectionFactory mcf;
      mcf = (ManagedConnectionFactory) _object;

      ConnectionPool cm = rm.createConnectionPool();

      cm.setShareable(_shareable);
      cm.setLocalTransactionOptimization(_localTransactionOptimization);
      Object connectionFactory = cm.init(mcf);
      cm.start();

      jndiObject = connectionFactory;

      isStart = true;
    }
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

  /**
   * Returns a connection manager
   */
  public ConnectionPool createConnectionPool()
  {
    ConnectionPool cm = new ConnectionPool();

    cm.setTransactionManager(_tm);

    _connectionManagers.add(cm);

    return cm;
  }
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

    // cancel the work managers
    if (_workManager != null)
      _workManager.destroy();

    for (int i = 0; i < connectionManagers.size(); i++) {
      ConnectionPool connectionManager = connectionManagers.get(i);

      try {
        connectionManager.destroy();
      } catch (Throwable e) {
        log.log(Level.WARNING, e.toString(), e);
      }
    }
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

      }
    }

    ResourceManagerImpl rm = ResourceManagerImpl.create();

    ConnectionPool cm = rm.createConnectionPool();

    if (getName() != null)
      cm.setName(getName());

    cm.setMaxConnections(_maxConnections);
    cm.setMaxActiveTime(_maxActiveTime);

    ResourceArchive rar = null;

    if (rar != null) {
      String trans = rar.getTransactionSupport();

      if (trans == null) { // guess XA
        cm.setXATransaction(true);
        cm.setLocalTransaction(true);
      }
      else if (trans.equals("XATransaction")) {
        cm.setXATransaction(true);
        cm.setLocalTransaction(true);
      }
      else if (trans.equals("NoTransaction")) {
        cm.setXATransaction(false);
        cm.setLocalTransaction(false);
      }
      else if (trans.equals("LocalTransaction")) {
        cm.setXATransaction(false);
        cm.setLocalTransaction(true);
      }
    }
    /*
    cm.setLocalTransactionOptimization(getLocalTransactionOptimization());
    cm.setShareable(getShareable());
    */

    Object connectionFactory;

    try {
      connectionFactory = cm.init(managedFactory);
      cm.start();

      BeanBuilder factory
        = cdiManager.createBeanFactory(connectionFactory.getClass());

      if (getName() != null) {
View Full Code Here

Examples of com.caucho.env.dbpool.ConnectionPool

        ((ResourceAdapterAssociation) managedFactory).setResourceAdapter(_ra);
      }

      ResourceManagerImpl rm = ResourceManagerImpl.createLocalManager();

      ConnectionPool cm = rm.createConnectionPool();

      if (_name != null)
        cm.setName(_name);

      if (_rar != null) {
        String trans = _rar.getTransactionSupport();

        if (trans == null) { // guess XA
          cm.setXATransaction(true);
          cm.setLocalTransaction(true);
        }
        else if (trans.equals("XATransaction")) {
          cm.setXATransaction(true);
          cm.setLocalTransaction(true);
        }
        else if (trans.equals("NoTransaction")) {
          cm.setXATransaction(false);
          cm.setLocalTransaction(false);
        }
        else if (trans.equals("LocalTransaction")) {
          cm.setXATransaction(false);
          cm.setLocalTransaction(true);
        }
      }

      cm.setLocalTransactionOptimization(getLocalTransactionOptimization());
      cm.setShareable(getShareable());

      Object connectionFactory = cm.init(managedFactory);
      cm.start();

      InjectManager manager = InjectManager.create();
      BeanBuilder factory
        = manager.createBeanFactory(connectionFactory.getClass());
     
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.