Examples of EmbeddedXADataSource


Examples of org.apache.derby.jdbc.EmbeddedXADataSource

  }
 
  public void testJira95xads(Connection conn, String dbName) throws SQLException
  {
    System.out.print("testing jira 95 for XADataSource");
    EmbeddedXADataSource dxs = new EmbeddedXADataSource();
    dxs.setDatabaseName(dbName);
    Connection conn2 = dxs.getXAConnection().getConnection();
    conn2.close();
  }
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

      // modified to use a real ldap server machine & port & url
      env.put(Context.PROVIDER_URL, "ldap://thehost.opensource.apache.com:389");
      env.put(Context.SECURITY_AUTHENTICATION, "simple");
      InitialDirContext ic = new InitialDirContext(env);

      EmbeddedXADataSource rxads =  new EmbeddedXADataSource();
      rxads.setDatabaseName("rxads");
      rxads.setCreateDatabase("create");
      rxads.setDescription("XA DataSource");
      ic.rebind("cn=compareDS, o=opensource.apache.com",rxads);
      javax.sql.XADataSource ads =
      (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=opensource.apache.com");
      if (rxads.equals(ads))
        System.out.println("SUCCESS:The 2 data sources are same");
      else
        System.out.println("FAILURE:The 2 data sources should be same");

      rxads.setCreateDatabase("");
      if (rxads.equals(ads))
        System.out.println("FAILURE:The 2 data sources should be different");
      else
        System.out.println("SUCCESS:The 2 data sources are different");

    } catch (Exception e) {
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

  synchronized void makeConnection(Properties p) throws
SQLException
  {
    if (xaDataSource == null)
    {
      xaDataSource = new EmbeddedXADataSource();
    }

    xaDataSource.setDatabaseName(getShortDbName());
    appendAttrString(p);
    if (attrString != null)
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

        }
        public String getUserName() {
            return null;
        }
        protected static XADataSource createXADS(String dbName) {
            EmbeddedXADataSource xads = new EmbeddedXADataSource();
            xads.setDatabaseName(dbName);
            xads.setCreateDatabase("create");
            return xads;
        }
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

      }catch(Exception e){
         System.out.println("Error loading jdbc properties ");
      }
     
      //MysqlDataSource ds = new MysqlDataSource();
      EmbeddedXADataSource ds = new EmbeddedXADataSource();
      ds.setDatabaseName("jbossdb");
      ds.setCreateDatabase("create");
      ds.setUser(prop.getProperty("cache.jdbc.user"));;
      ds.setPassword(prop.getProperty("cache.jdbc.password"));
     
     
      String props = "cache.jdbc.datasource =" + JNDI_NAME + "\n" +
                     "cache.jdbc.node.type=" + prop.getProperty("cache.jdbc.node.type");
     
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

        }
        public String getUserName() {
            return null;
        }
        protected static XADataSource createXADS(String dbName) {
            EmbeddedXADataSource xads = new EmbeddedXADataSource();
            xads.setDatabaseName(dbName);
            xads.setCreateDatabase("create");
            return xads;
        }
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

        }
        public String getUserName() {
            return null;
        }
        protected static XADataSource createXADS(String dbName) {
            EmbeddedXADataSource xads = new EmbeddedXADataSource();
            xads.setDatabaseName(dbName);
            xads.setCreateDatabase("create");
            return xads;
        }
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

        }
        public String getUserName() {
            return null;
        }
        protected static XADataSource createXADS(String dbName) {
            EmbeddedXADataSource xads = new EmbeddedXADataSource();
            xads.setDatabaseName(dbName);
            xads.setCreateDatabase("create");
            return xads;
        }
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

    pc = null;

    testPoolReset("EmbeddedConnectionPoolDataSource", dsp.getPooledConnection());


    EmbeddedXADataSource dscsx = new EmbeddedXADataSource();
    dscsx.setDatabaseName("wombat");
    //dscsx.setConnectionAttributes("unicode=true");

    XADataSource dsx = dscsx;
    checkToString(dsx);
View Full Code Here

Examples of org.apache.derby.jdbc.EmbeddedXADataSource

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

    // now with XADataSource
    EmbeddedXADataSource xads = new EmbeddedXADataSource();
    System.out.println("XADataSource - EMPTY");
    dsConnectionRequests((XADataSource) xads);

    System.out.println("XADataSource - databaseName=wombat");
    xads.setDatabaseName("wombat");
    dsConnectionRequests((XADataSource) xads);
    xads.setDatabaseName(null);

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

    System.out.println("XADataSource - attributesAsPassword=true");
    xads.setAttributesAsPassword(true);
    dsConnectionRequests((XADataSource) xads);
    xads.setAttributesAsPassword(false);

    System.out.println("XADataSource - databaseName=wombat, attributesAsPassword=true");
    xads.setDatabaseName("wombat");
    xads.setAttributesAsPassword(true);
    dsConnectionRequests((XADataSource) xads);
    xads.setAttributesAsPassword(false);
    xads.setDatabaseName(null);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.