Package javax.resource.spi

Examples of javax.resource.spi.ManagedConnectionFactory


    public void testGetConnectionFromSEI() throws Exception {
        CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo();
        requestInfo.setInterface(Greeter.class);
        requestInfo.setAddress("http://localhost:" + PORT + "/SoapContext/SoapPort");
       
        ManagedConnectionFactory factory = new ManagedConnectionFactoryImpl();
        ManagedConnection mc = factory.createManagedConnection(null, requestInfo);
        Object client = mc.getConnection(null, requestInfo);
       
        verifyResult(client);
    }
View Full Code Here


      pp.minSize = minSize;
      pp.maxSize = maxSize;
      pp.blockingTimeout = 10000;
      pp.idleTimeout = 0;
      pp.prefill = prefill;
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      return poolingStrategy;
     
   }
View Full Code Here

   }

   private BaseConnectionManager2 getCM(InternalManagedConnectionPool.PoolParams pp) throws Exception
   {
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      BaseConnectionManager2 cm = new NoTxConnectionManager(ccm, poolingStrategy);
      poolingStrategy.setConnectionListenerFactory(cm);

      return cm;
View Full Code Here

      return cm;
   }
  
   private BaseConnectionManager2 getCriCM(InternalManagedConnectionPool.PoolParams pp){
     
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new JBossManagedConnectionPool.PoolByCri(mcf, pp, true, null, log);
      BaseConnectionManager2 cm = new NoTxConnectionManager(ccm, poolingStrategy);
      poolingStrategy.setConnectionListenerFactory(cm);
      return cm;
   }
View Full Code Here

    * @return BaseConnectionManager2 instance
    * @exception Exception Thrown if an error occurs
    */
   private BaseConnectionManager2 getCM(InternalManagedConnectionPool.PoolParams pp) throws Exception
   {
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      BaseConnectionManager2 cm = new NoTxConnectionManager(ccm, poolingStrategy);
      poolingStrategy.setConnectionListenerFactory(cm);
     
      if (pp.prefill)
View Full Code Here

      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 0;
      pp.maxSize = maxSize;
      pp.blockingTimeout = 10000;
      pp.idleTimeout = 0;
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = getPool(PoolHelper.PoolType.ONE_POOL, false, mcf, pp);
      return poolingStrategy;
   }
View Full Code Here

      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 0;
      pp.maxSize = maxSize;
      pp.blockingTimeout = 10000;
      pp.idleTimeout = 10000;
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = getPool(PoolType.CRI_POOL, false, mcf, pp);
      return poolingStrategy;
   }
View Full Code Here

   }
  
   private TestConnection allocate(BaseConnectionManager2 cm, TestConnectionRequestInfo cri) throws Exception
   {
      JBossManagedConnectionPool.BasePool mcp = (JBossManagedConnectionPool.BasePool) cm.getPoolingStrategy();
      ManagedConnectionFactory mcf = mcp.getManagedConnectionFactory();
      return (TestConnection) cm.allocateConnection(mcf, cri);
   }
View Full Code Here

    * @return BaseConnectionManager2 instance
    * @exception Exception Thrown if an error occurs
    */
   private BaseConnectionManager2 getCM(InternalManagedConnectionPool.PoolParams pp) throws Exception
   {
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      BaseConnectionManager2 cm = new NoTxConnectionManager(ccm, poolingStrategy);
      poolingStrategy.setConnectionListenerFactory(cm);
     
      if (pp.prefill)
View Full Code Here

   private BaseConnectionManager2 getCM(
      InternalManagedConnectionPool.PoolParams pp)
      throws Exception
   {
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      ManagedConnectionPool poolingStrategy = new TestPool(mcf, pp, false, log);
      BaseConnectionManager2 cm = new NoTxConnectionManager(ccm, poolingStrategy);
      poolingStrategy.setConnectionListenerFactory(cm);
      return cm;
   }
View Full Code Here

TOP

Related Classes of javax.resource.spi.ManagedConnectionFactory

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.