Package com.caucho.jca.pool

Examples of com.caucho.jca.pool.ConnectionPool


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


      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

      }
    }

    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();

      BeanFactory factory
        = manager.createBeanFactory(connectionFactory.getClass());

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

  ((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();
      BeanFactory factory
  = beanManager.createBeanFactory(connectionFactory.getClass());
     
View Full Code Here

  ((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();
      BeanFactory factory
  = manager.createBeanFactory(connectionFactory.getClass());
     
View Full Code Here

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

    cm.setTransactionManager(_tm);

    _connectionManagers.add(cm);

    return cm;
  }
View Full Code Here

    // 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

TOP

Related Classes of com.caucho.jca.pool.ConnectionPool

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.