Package org.apache.derby.jdbc

Examples of org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource


      */
        System.out.println("test will not build without universal driver");
        return passed;
     
      } else {
        EmbeddedConnectionPoolDataSource dscsp = new EmbeddedConnectionPoolDataSource();
        dscsp.setDatabaseName("wombat");
        //dscsp.setConnectionAttributes("unicode=true");
        dsp = dscsp;
      }

      PooledConnection pc = dsp.getPooledConnection();
View Full Code Here


    ds.setUser(null);
    ds.setPassword(null);
    ds = null;

    // now with ConnectionPoolDataSource
    EmbeddedConnectionPoolDataSource cpds = new EmbeddedConnectionPoolDataSource();
    System.out.println("ConnectionPoolDataSource - EMPTY");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);

    System.out.println("ConnectionPoolDataSource - connectionAttributes=databaseName=wombat");
    cpds.setConnectionAttributes("databaseName=wombat");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setConnectionAttributes(null);

    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true");
    cpds.setAttributesAsPassword(true);
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
   
    // ensure the DS property password is not treated as a set of attributes.
    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true, user=fred, password=databaseName=wombat;password=wilma");
    cpds.setAttributesAsPassword(true);
    cpds.setUser("fred");
    cpds.setPassword("databaseName=wombat;password=wilma");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
    cpds.setUser(null);
    cpds.setPassword(null);
    cpds = null;

    // now with XADataSource
    EmbeddedXADataSource xads = new EmbeddedXADataSource();
    System.out.println("XADataSource - EMPTY");
View Full Code Here

        ds.setUser(null);
        ds.setPassword(null);
        ds = null;

        // now with ConnectionPoolDataSource
        EmbeddedConnectionPoolDataSource cpds = new EmbeddedConnectionPoolDataSource();
        // ConnectionPoolDataSource - EMPTY
        dsConnectionRequests(new String[] { 
            "XJ004","XJ004","XJ004","XJ004",
            "XJ004","XJ004","XJ004","XJ004","XJ004"},
            (ConnectionPoolDataSource)cpds);

        // ConnectionPoolDataSource -
        // connectionAttributes=databaseName=wombat
        cpds.setConnectionAttributes("databaseName=" + dbName);
        dsConnectionRequests(new String[] { 
            "XJ004","XJ004","XJ004","XJ004",
            "XJ004","XJ004","XJ004","XJ004","XJ004"},
            (ConnectionPoolDataSource)cpds);
        cpds.setConnectionAttributes(null);

        // ConnectionPoolDataSource - attributesAsPassword=true
        cpds.setAttributesAsPassword(true);
        dsConnectionRequests(new String[] { 
            "XJ004","XJ004","XJ004","XJ028",
            "XJ028","XJ004","XJ004","XJ004","XJ004"},
            (ConnectionPoolDataSource)cpds);
        cpds.setAttributesAsPassword(false);
       
        // ensure the DS property password is not treated as a set of
        // attributes.
        // ConnectionPoolDataSource - attributesAsPassword=true,
        //     user=fred, password=databaseName=wombat;password=wilma");
        cpds.setAttributesAsPassword(true);
        cpds.setUser("fred");
        cpds.setPassword("databaseName=" + dbName + ";password=wilma");
        dsConnectionRequests(new String[] { 
            "XJ004","XJ004","XJ004","XJ028",
            "XJ028","XJ004","XJ004","XJ004","XJ004"},
            (ConnectionPoolDataSource)cpds);
        cpds.setAttributesAsPassword(false);
        cpds.setUser(null);
        cpds.setPassword(null);
        cpds = null;

        // now with XADataSource
        EmbeddedXADataSource xads = new EmbeddedXADataSource();
        // XADataSource - EMPTY
View Full Code Here

    return ds;
  }

  public javax.sql.ConnectionPoolDataSource getCPDS(String database, String user, String password) {
   
    EmbeddedConnectionPoolDataSource ds = new EmbeddedConnectionPoolDataSource();
    ds.setDatabaseName(database);
    if (user != null) {
      ds.setUser(user);
      ds.setPassword(password);
    }

    return ds;
  }
View Full Code Here

    ds.setUser(null);
    ds.setPassword(null);
    ds = null;

    // now with ConnectionPoolDataSource
    EmbeddedConnectionPoolDataSource cpds = new EmbeddedConnectionPoolDataSource();
    System.out.println("ConnectionPoolDataSource - EMPTY");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);

    System.out.println("ConnectionPoolDataSource - connectionAttributes=databaseName=wombat");
    cpds.setConnectionAttributes("databaseName=wombat");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setConnectionAttributes(null);

    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true");
    cpds.setAttributesAsPassword(true);
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
   
    // ensure the DS property password is not treated as a set of attributes.
    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true, user=fred, password=databaseName=wombat;password=wilma");
    cpds.setAttributesAsPassword(true);
    cpds.setUser("fred");
    cpds.setPassword("databaseName=wombat;password=wilma");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
    cpds.setUser(null);
    cpds.setPassword(null);
    cpds = null;

    // now with XADataSource
    EmbeddedXADataSource xads = new EmbeddedXADataSource();
    System.out.println("XADataSource - EMPTY");
View Full Code Here

    private DataSource _ds;

    public void setUp() throws Exception {
        super.setUp();
       
        EmbeddedConnectionPoolDataSource ds = new EmbeddedConnectionPoolDataSource();
        ds.setCreateDatabase("create");
        ds.setDatabaseName("target/ExternalVariableTest");
        _ds = ds;

        _jdbcext = new JdbcExternalVariableModule();
        _jdbcext.registerDataSource("testds", _ds);
        _server.registerExternalVariableEngine(_jdbcext);
View Full Code Here

      */
        System.out.println("test will not build without universal driver");
        return passed;
     
      } else {
        EmbeddedConnectionPoolDataSource dscsp = new EmbeddedConnectionPoolDataSource();
        dscsp.setDatabaseName("wombat");
        //dscsp.setConnectionAttributes("unicode=true");
        dsp = dscsp;
      }

      PooledConnection pc = dsp.getPooledConnection();
View Full Code Here

    public static void setUpOnce() {
        RMTxStoreTestBase.setUpOnce();
       
        RMTxStore.deleteDatabaseFiles("rmdbpc", true);

        EmbeddedConnectionPoolDataSource ds = new EmbeddedConnectionPoolDataSource();
        ds.setDatabaseName("rmdbpc");
        ds.setCreateDatabase("create");
       
        store = new RMTxStore();
        store.setDataSource(ds);
        store.setKeepConnection(false);
        store.init();
View Full Code Here

    EmbeddedSimpleDataSource dssimple = new EmbeddedSimpleDataSource();
    dssimple.setDatabaseName("wombat");
    ds = dssimple;
    checkConnection("EmbeddedSimpleDataSource", ds.getConnection());   

    EmbeddedConnectionPoolDataSource dscsp = new EmbeddedConnectionPoolDataSource();
    dscsp.setDatabaseName("wombat");
    //dscsp.setConnectionAttributes("unicode=true");
    ConnectionPoolDataSource dsp = dscsp;
    checkToString(dsp);

    PooledConnection pc = dsp.getPooledConnection();
View Full Code Here

    ds.setUser(null);
    ds.setPassword(null);
    ds = null;

    // now with ConnectionPoolDataSource
    EmbeddedConnectionPoolDataSource cpds = new EmbeddedConnectionPoolDataSource();
    System.out.println("ConnectionPoolDataSource - EMPTY");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);

    System.out.println("ConnectionPoolDataSource - connectionAttributes=databaseName=wombat");
    cpds.setConnectionAttributes("databaseName=wombat");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setConnectionAttributes(null);

    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true");
    cpds.setAttributesAsPassword(true);
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
   
    // ensure the DS property password is not treated as a set of attributes.
    System.out.println("ConnectionPoolDataSource - attributesAsPassword=true, user=fred, password=databaseName=wombat;password=wilma");
    cpds.setAttributesAsPassword(true);
    cpds.setUser("fred");
    cpds.setPassword("databaseName=wombat;password=wilma");
    dsConnectionRequests((ConnectionPoolDataSource)cpds);
    cpds.setAttributesAsPassword(false);
    cpds.setUser(null);
    cpds.setPassword(null);
    cpds = null;

    // now with XADataSource
    EmbeddedXADataSource xads = new EmbeddedXADataSource();
    System.out.println("XADataSource - EMPTY");
View Full Code Here

TOP

Related Classes of org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource

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.