Package oracle.jdbc.xa.client

Examples of oracle.jdbc.xa.client.OracleXADataSource


    }

    public static XADataSource getXADataSource(String serverName,
            String dbInstance, int portNo, String driverName)
            throws SQLException {
        OracleXADataSource ds = new OracleXADataSource();
        ds.setDatabaseName(dbInstance);
        ds.setDriverType(driverName);
        ds.setServerName(serverName);
        ds.setPortNumber(portNo);
        ds.setNetworkProtocol("tcp");
        return (XADataSource) ds;
    }
View Full Code Here


    public static XADataSource getXASQLDataSource(String serverName,
            String dbInstance, int portNo, String driverName,
            String username, String password)
            throws SQLException {

        OracleXADataSource ds = new OracleXADataSource();
        ds.setDatabaseName(dbInstance);
        ds.setDriverType(driverName);
        ds.setServerName(serverName);
        ds.setPortNumber(portNo);
        ds.setNetworkProtocol("tcp");
        ds.setUser(username);
        ds.setPassword(password);
        return ds;
    }
View Full Code Here

        return ds;
    }

    public static XADataSource getXASQLDataSource(final String url, final String username, final String password) throws SQLException {

        OracleXADataSource ds = new OracleXADataSource();
        ds.setURL(url);
        ds.setUser(username);
        ds.setPassword(password);
        return ds;
    }
View Full Code Here

   
    public synchronized XADataSource getDataSource (String dbName, boolean create) throws SQLException
    {
  try
  {
      OracleXADataSource xads = new OracleXADataSource();
      int index1 = dbName.indexOf(oracle_8_1_6.driverName);
     
      if (index1 == -1)
      {
    throw new SQLException("oracle_8_1_6.getDataSource - "+jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.invaliddb")+" Oracle");
      }
      else
      {
    /*
     * Strip off any spurious parameters.
     */

    int index2 = dbName.indexOf(oracle_8_1_6.semicolon);
    String theDbName = null;

    if (index2 == -1)
    {
        theDbName = dbName.substring(index1+oracle_8_1_6.driverName.length());
    }
    else
    {
        theDbName = dbName.substring(index1+oracle_8_1_6.driverName.length(),index2);
    }

    /*
     * Rather than work our way through the string to determine
     * the server name, the port, etc., we can make use
     * of the Oracle specific method.
     */

    xads.setURL(TransactionalDriver.jdbc+oracle_8_1_6.driverName+theDbName);

    return xads;
      }
  }
  catch (SQLException e1)
View Full Code Here

    {
        try
        {
            if (_dataSource == null)
            {
                OracleXADataSource dataSource = new OracleXADataSource();
                dataSource.setURL(_dbURL);

                _dataSource = dataSource;

                if (_dataSource == null)
                    throw new SQLException(jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.oracle.recjndierror"));
View Full Code Here

        */
        /* End of code */

        try {
            // Initialize the Datasource
            OracleXADataSource oracleXADataSource = new OracleXADataSource();
            oracleXADataSource.setURL(((OracleDBManager)dbm).getJdbcURL());
            oracleXADataSource.setUser(((OracleDBManager)dbm).getUserId());
            oracleXADataSource.setPassword(((OracleDBManager)dbm).getUserPwd());
//            oracleXADataSource.setNativeXA(true); // Set the NativeXA property true, to support distributed transactions in Oracle8i releases prior to 8.1.6.

            xaDataSource = oracleXADataSource;

            xaConnection = xaDataSource.getXAConnection();
View Full Code Here

/*     */   {
/*     */     try
/*     */     {
/* 166 */       if (this._dataSource == null)
/*     */       {
/* 168 */         OracleXADataSource dataSource = new OracleXADataSource();
/* 169 */         dataSource.setURL(this._dbURL);
/*     */
/* 171 */         this._dataSource = dataSource;
/*     */
/* 173 */         if (this._dataSource == null)
/* 174 */           throw new SQLException(jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.oracle.recjndierror"));
View Full Code Here

TOP

Related Classes of oracle.jdbc.xa.client.OracleXADataSource

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.