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)