Package speculoos.jndi.pool

Examples of speculoos.jndi.pool.JNDIPooledSource


        Attributes attributes) throws SAXException {
      String name = attributes.getValue("name");
      String pools = attributes.getValue("pooled");
      JNDISource src;
      if (pools != null && pools.equals("true"))
        src = new JNDIPooledSource(name);
      else
        src = new JNDISource(name);
      add(src.getName(), src);
      // append all defined validators
      src.addMappers(getMappers());
View Full Code Here


  }

  public void test10ErrorCustomConnectionFactory() {
    env.put(JNDIPooledSource.FACTORY, "toto");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("connection factory does not exist : should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  public void test11NoCtorConnectionFactory() {
    env.put(JNDIPooledSource.FACTORY,
        "speculoos.jndi.pool.PooledSourceTest$MyCnxFactory2");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("connection factory ctor does not exist : should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  public void test12FailedCtorConnectionFactory() {
    env.put(JNDIPooledSource.FACTORY,
        "speculoos.jndi.pool.PooledSourceTest$MyCnxFactory3");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("connection factory ctor fails : should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  }

  public void test13NegativeMinSize() {
    env.put(JNDIPooledSource.MIN_POOL_SIZE, "-3");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("minimum pool size incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  }

  public void test14NanMinSize() {
    env.put(JNDIPooledSource.MIN_POOL_SIZE, "toto");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("minimum pool size incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  public void test15IncorrectMaxSize() {
    env.put(JNDIPooledSource.MIN_POOL_SIZE, "2");
    env.put(JNDIPooledSource.MAX_POOL_SIZE, "1");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("maximum pool size incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  }

  public void test16NanMaxSize() {
    env.put(JNDIPooledSource.MAX_POOL_SIZE, "tutu");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("maximum pool size incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

    }
  }
  public void test17IncorrectTimeout() {
    env.put(JNDIPooledSource.TIMEOUT, "-5");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("timeout incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

  }

  public void test18NanTimeout() {
    env.put(JNDIPooledSource.TIMEOUT, "tutu");
    /* create source */
    JNDIPooledSource src = new JNDIPooledSource();
    /* configure source */
    src.addParameters(env);
    /* create mapper */
    try {
      src.start(env);
      fail("timeout incorrect: should have thrown exception");
    } catch (MapperConfigurationException e) {
      // OK
    }
  }
View Full Code Here

TOP

Related Classes of speculoos.jndi.pool.JNDIPooledSource

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.