Package org.jboss.resource.adapter.jdbc.local

Examples of org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory


   /**
    * Database specific.
    */
   private void startManagedConnectionFactory(ObjectName on) throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();


log.info("connection url:" + config.getDatabaseConnectionURL());
log.info("driver:" + config.getDatabaseConnectionURL());
log.info("username:" + config.getDatabaseUserName());
log.info("password:" + config.getDatabasePassword());
      mcf.setConnectionURL(config.getDatabaseConnectionURL());
      mcf.setDriverClass(config.getDatabaseDriverClass());
      mcf.setUserName(config.getDatabaseUserName());
      mcf.setPassword(config.getDatabasePassword());
      String isolation = config.getDatabaseTransactionIsolation();
      if (isolation != null)
      {
         mcf.setTransactionIsolation(isolation);
      }

      ManagedConnectionFactoryJMXWrapper mbean = new ManagedConnectionFactoryJMXWrapper(mcf);
      mbeanServer.registerMBean(mbean, on);
      mbeanServer.invoke(on, "start", new Object[0], new String[0]);
View Full Code Here


   /**
    * Database specific.
    */
   private void startManagedConnectionFactory(ObjectName on) throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();

      log.info("connection url:" + config.getDatabaseConnectionURL());
      log.info("driver:" + config.getDatabaseConnectionURL());
      log.info("username:" + config.getDatabaseUserName());
      log.info("password:" + config.getDatabasePassword());

      mcf.setConnectionURL(config.getDatabaseConnectionURL());
      mcf.setDriverClass(config.getDatabaseDriverClass());
      mcf.setUserName(config.getDatabaseUserName());
      mcf.setPassword(config.getDatabasePassword());
      String isolation = config.getDatabaseTransactionIsolation();
      if (isolation != null)
      {
         mcf.setTransactionIsolation(isolation);
      }

      ManagedConnectionFactoryJMXWrapper mbean = new ManagedConnectionFactoryJMXWrapper(mcf);
      mbeanServer.registerMBean(mbean, on);
      mbeanServer.invoke(on, "start", new Object[0], new String[0]);
View Full Code Here

   /**
    * Database specific.
    */
   private void startManagedConnectionFactory(ObjectName on) throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();

      log.info("connection url:" + config.getDatabaseConnectionURL());
      log.info("driver:" + config.getDatabaseConnectionURL());
      log.info("username:" + config.getDatabaseUserName());
      log.info("password:" + config.getDatabasePassword());
     
      mcf.setConnectionURL(config.getDatabaseConnectionURL());
      mcf.setDriverClass(config.getDatabaseDriverClass());
      mcf.setUserName(config.getDatabaseUserName());
      mcf.setPassword(config.getDatabasePassword());
      String isolation = config.getDatabaseTransactionIsolation();
      if (isolation != null)
      {
         mcf.setTransactionIsolation(isolation);
      }

      ManagedConnectionFactoryJMXWrapper mbean = new ManagedConnectionFactoryJMXWrapper(mcf);
      mbeanServer.registerMBean(mbean, on);
      mbeanServer.invoke(on, "start", new Object[0], new String[0]);
View Full Code Here

   /**
    * Database specific.
    */
   private void startManagedConnectionFactory(ObjectName on) throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();

      log.info("connection url:" + config.getDatabaseConnectionURL());
      log.info("driver:" + config.getDatabaseConnectionURL());
      log.info("username:" + config.getDatabaseUserName());
      log.info("password:" + config.getDatabasePassword());

      mcf.setConnectionURL(config.getDatabaseConnectionURL());
      mcf.setDriverClass(config.getDatabaseDriverClass());
      mcf.setUserName(config.getDatabaseUserName());
      mcf.setPassword(config.getDatabasePassword());
      String isolation = config.getDatabaseTransactionIsolation();
      if (isolation != null)
      {
         mcf.setTransactionIsolation(isolation);
      }

      ManagedConnectionFactoryJMXWrapper mbean = new ManagedConnectionFactoryJMXWrapper(mcf);
      mbeanServer.registerMBean(mbean, on);
      mbeanServer.invoke(on, "start", new Object[0], new String[0]);
View Full Code Here

   /**
    * Database specific.
    */
   private void startManagedConnectionFactory(ObjectName on) throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      log.info("connection url:" + config.getDatabaseConnectionURL());
      log.info("driver:" + config.getDatabaseConnectionURL());
      log.info("username:" + config.getDatabaseUserName());
      log.info("password:" + config.getDatabasePassword());
     
      mcf.setConnectionURL(config.getDatabaseConnectionURL());
      mcf.setDriverClass(config.getDatabaseDriverClass());
      mcf.setUserName(config.getDatabaseUserName());
      mcf.setPassword(config.getDatabasePassword());
      String isolation = config.getDatabaseTransactionIsolation();
      if (isolation != null)
      {
         mcf.setTransactionIsolation(isolation);
      }
     
      ManagedConnectionFactoryJMXWrapper mbean = new ManagedConnectionFactoryJMXWrapper(
            mcf);
      mbeanServer.registerMBean(mbean, on);
View Full Code Here

        
  
   }
   public void testValidateOnMatchSuccess() throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      mcf.setDriverClass("org.jboss.test.jca.jdbc.TestDriver");
      mcf.setConnectionURL("jdbc:jboss-test-adapter");
      mcf.setValidConnectionCheckerClassName("org.jboss.test.jca.support.MockSuccessValidationConnectionChecker");
      mcf.setValidateOnMatch(true);
     
      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 1;
      pp.maxSize = 2;
      pp.blockingTimeout = 10000;
View Full Code Here

     
   }
   public void testBasicValidateOnMatchFailure() throws Exception
   {
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      mcf.setDriverClass("org.jboss.test.jca.jdbc.TestDriver");
      mcf.setConnectionURL("jdbc:jboss-test-adapter");
      mcf.setValidConnectionCheckerClassName("org.jboss.test.jca.support.MockFailedValidationConnectionChecker");
      mcf.setValidateOnMatch(true);

      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 1;
      pp.maxSize = 2;
      pp.blockingTimeout = 10000;
View Full Code Here

  
  
   public void testBasicBackgroundValidationSuccess() throws Exception
   {
     
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      mcf.setDriverClass("org.jboss.test.jca.jdbc.TestDriver");
      mcf.setConnectionURL("jdbc:jboss-test-adapter");
      mcf.setValidConnectionCheckerClassName("org.jboss.test.jca.support.MockSuccessValidationConnectionChecker");
     
      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 1;
      pp.maxSize = 2;
      pp.blockingTimeout = 10000;
View Full Code Here

     
   }
   public void testBasicBackgroundValidationDestroy() throws Exception
   {
     
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      mcf.setDriverClass("org.jboss.test.jca.jdbc.TestDriver");
      mcf.setConnectionURL("jdbc:jboss-test-adapter");
      mcf.setValidConnectionCheckerClassName("org.jboss.test.jca.support.MockFailedValidationConnectionChecker");
     
      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 1;
      pp.maxSize = 2;
      pp.blockingTimeout = 10000;
View Full Code Here

     
   }
   public void testNullStaleConnectionChecker() throws Exception
   {
   
      LocalManagedConnectionFactory mcf = new LocalManagedConnectionFactory();
     
      mcf.setDriverClass("org.jboss.test.jca.jdbc.TestDriver");
      mcf.setConnectionURL("jdbc:jboss-test-adapter");
      mcf.setStaleConnectionCheckerClassName("non-stale");
      mcf.setExceptionSorterClassName("org.jboss.test.jca.support.MockExceptionSorter");     
      InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
      pp.minSize = 1;
      pp.maxSize = 2;
      pp.blockingTimeout = 10000;
View Full Code Here

TOP

Related Classes of org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory

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.