[jboss-svn-commits] JBL Code SVN: r29854 - in labs/jbosstm/trunk/ArjunaJTA/jdbc: classes/com/arjuna/ats/internal/jdbc and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 28 11:52:11 EDT 2009
Author: jhalliday
Date: 2009-10-28 11:52:10 -0400 (Wed, 28 Oct 2009)
New Revision: 29854
Removed:
labs/jbosstm/trunk/ArjunaJTA/jdbc/bin/
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_8_1.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_9_0.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_jndi.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/sqlserver_jndi.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/oracle_8_1_6.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/recovery/OracleXARecovery.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/tests/classes/com/hp/mwtests/ts/jdbc/utils/plugins/OracleDataSourcePlugin.java
Modified:
labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/DynamicClass.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/PropertyFileDynamicClass.java
labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/list.java
Log:
Remove obsolete JDBC code. JBTM-637
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/build.xml 2009-10-28 15:52:10 UTC (rev 29854)
@@ -22,8 +22,7 @@
<property name="modulename" value="jdbc"/>
- <property name="excluded.classes" value="**/oracle*.java **/Oracle*.java **/*JDBC3.java"/>
- <property name="excluded.test.classes" value="**/Oracle*.java"/>
+ <property name="excluded.classes" value="**/*JDBC3.java"/>
<property name="global.ext.libs" value="jta-1_1-classes.zip"/>
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/DynamicClass.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/DynamicClass.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/DynamicClass.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -49,17 +49,5 @@
public interface DynamicClass
{
-
public XADataSource getDataSource (String dbName) throws SQLException;
-
- /**
- * @deprecated
- */
- public XADataSource getDataSource (String dbName, boolean create) throws SQLException;
-
- /**
- * @deprecated
- */
- public void shutdownDataSource (XADataSource ds) throws SQLException;
-
}
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/PropertyFileDynamicClass.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/PropertyFileDynamicClass.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/PropertyFileDynamicClass.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -93,17 +93,4 @@
return xaDataSourceReflectionWrapper.getWrappedXADataSource();
}
-
- /**
- * @deprecated
- */
- public XADataSource getDataSource(String dbName, boolean create) throws SQLException {
- return null;
- }
-
- /**
- * @deprecated
- */
- public void shutdownDataSource(XADataSource ds) throws SQLException {
- }
}
Modified: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/list.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/list.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/list.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -33,18 +33,7 @@
public class list
{
-
-public list ()
+ public list ()
{
- ModifierFactory.putModifier("Oracle JDBC driver", 9, -1, "com.arjuna.ats.internal.jdbc.drivers.modifiers.oracle_jndi");
-
- ModifierFactory.putModifier("SQLServer", 2, -1, "com.arjuna.ats.internal.jdbc.drivers.modifiers.sqlserver_jndi");
-
- ModifierFactory.putModifier(oracleName, 9, 0, "com.arjuna.ats.internal.jdbc.drivers.modifiers.oracle_9_0");
-
- ModifierFactory.putModifier(oracleName, 8, 1, "com.arjuna.ats.internal.jdbc.drivers.modifiers.oracle_8_1");
}
-
-private static final String oracleName = "oracle";
-
}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_8_1.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_8_1.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_8_1.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,155 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 1998, 1999, 2000,
- *
- * Arjuna Solutions Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: oracle_8_1.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.ats.internal.jdbc.drivers.modifiers;
-
-import com.arjuna.ats.jdbc.logging.jdbcLogger;
-import com.arjuna.ats.jta.xa.XAModifier;
-import com.arjuna.ats.jta.xa.XidImple;
-import com.arjuna.ats.jta.exceptions.NotImplementedException;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import javax.transaction.xa.Xid;
-import oracle.jdbc.xa.OracleXid;
-
-import java.sql.SQLException;
-
-/**
- * This is a stateless class to allow us to get round
- * problems in Oracle. For example, they can't work with
- * an arbitrary implementation of Xid - it has to be their
- * own implementation!
- *
- * @deprecated
- */
-public class oracle_8_1 implements XAModifier, ConnectionModifier
-{
-
- public String initialise (String dbName)
- {
- int index = dbName.indexOf(extensions.reuseConnectionTrue);
- int end = extensions.reuseConnectionTrue.length();
-
- if (index != -1)
- _reuseConnection = true;
- else
- {
- index = dbName.indexOf(extensions.reuseConnectionFalse);
- end = extensions.reuseConnectionFalse.length();
- }
-
- /*
- * If at start, then this must be a JNDI URL. So remove component.
- */
-
- if (index != 0)
- return dbName;
- else
- return dbName.substring(end + 1); // remember colon
- }
-
- public Xid createXid (XidImple xid) throws SQLException, NotImplementedException
- {
- try
- {
- return new OracleXid(xid.getFormatId(), xid.getGlobalTransactionId(),
- xid.getBranchQualifier());
- }
- catch (Exception e)
- {
- SQLException sqlException = new SQLException(e.toString());
- sqlException.initCause(e);
- throw sqlException;
- }
- }
-
- public int xaStartParameters (int level) throws SQLException, NotImplementedException
- {
- return level;
- }
-
- public XAConnection getConnection (XAConnection conn) throws SQLException, NotImplementedException
- {
- if (_reuseConnection)
- return conn;
- else
- {
- if (conn != null)
- {
- try
- {
- conn.close();
- }
- catch (SQLException e)
- {
- }
- }
-
- return null;
- }
- }
-
- public boolean supportsMultipleConnections () throws SQLException, NotImplementedException
- {
- return true;
- }
-
- public void setIsolationLevel (Connection conn, int level) throws SQLException, NotImplementedException
- {
- DatabaseMetaData metaData = conn.getMetaData();
-
- if (metaData.supportsTransactionIsolationLevel(level))
- {
- try
- {
- if (conn.getTransactionIsolation() != level)
- {
- conn.setTransactionIsolation(level);
- }
- }
- catch (SQLException e)
- {
- if (jdbcLogger.loggerI18N.isWarnEnabled())
- {
- jdbcLogger.loggerI18N.warn("com.arjuna.ats.internal.jdbc.isolationlevelfailset",
- new Object[] {"ConnectionImple.getConnection", e});
- }
-
- throw e;
- }
- }
- }
-
- private boolean _reuseConnection = true;
-
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_9_0.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_9_0.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_9_0.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 1998, 1999, 2000,
- *
- * Arjuna Solutions Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: oracle_9_0.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.ats.internal.jdbc.drivers.modifiers;
-
-import com.arjuna.ats.jdbc.logging.jdbcLogger;
-import com.arjuna.ats.jta.xa.XAModifier;
-import com.arjuna.ats.jta.xa.XidImple;
-import com.arjuna.ats.jta.exceptions.NotImplementedException;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import javax.transaction.xa.Xid;
-import oracle.jdbc.xa.OracleXid;
-
-import java.sql.SQLException;
-
-/**
- * This is a stateless class to allow us to get round
- * problems in Oracle. For example, they can't work with
- * an arbitrary implementation of Xid - it has to be their
- * own implementation!
- *
- * @deprecated
- */
-public class oracle_9_0 implements XAModifier, ConnectionModifier
-{
-
- public String initialise (String dbName)
- {
- int index = dbName.indexOf(extensions.reuseConnectionTrue);
- int end = extensions.reuseConnectionTrue.length();
-
- if (index != -1)
- _reuseConnection = true;
- else
- {
- index = dbName.indexOf(extensions.reuseConnectionFalse);
- end = extensions.reuseConnectionFalse.length();
- }
-
- /*
- * If at start, then this must be a JNDI URL. So remove component.
- */
-
- if (index != 0)
- return dbName;
- else
- return dbName.substring(end + 1); // remember colon
- }
-
- public Xid createXid (XidImple xid) throws SQLException, NotImplementedException
- {
- try
- {
- return new OracleXid(xid.getFormatId(), xid.getGlobalTransactionId(),
- xid.getBranchQualifier());
- }
- catch (Exception e)
- {
- SQLException sqlException = new SQLException(e.toString());
- sqlException.initCause(e);
- throw sqlException;
- }
- }
-
- public XAConnection getConnection (XAConnection conn) throws SQLException, NotImplementedException
- {
- /* We don't want to call close() on the connection any more. */
- return null;
- }
-
- public boolean supportsMultipleConnections () throws SQLException, NotImplementedException
- {
- return true;
- }
-
- /**
- * @message com.arjuna.ats.internal.jdbc.drivers.modifiers.notSupported Oracle does not support isolation level
- */
-
- public void setIsolationLevel (Connection conn, int level) throws SQLException, NotImplementedException
- {
- /*
- * Not supported by oracle 9 at this level. Must be set during the
- * xa protocol.
- */
-
- switch (level)
- {
- case Connection.TRANSACTION_SERIALIZABLE:
- case Connection.TRANSACTION_READ_COMMITTED:
- break;
- case Connection.TRANSACTION_REPEATABLE_READ:
- case Connection.TRANSACTION_READ_UNCOMMITTED:
- default:
- throw new SQLException(jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.modifiers.notSupported")+level);
- }
-
- _isolationLevel = level;
- }
-
- public int xaStartParameters (int level) throws SQLException, NotImplementedException
- {
- int extraFlag = 0;
-
- switch (_isolationLevel)
- {
- case Connection.TRANSACTION_SERIALIZABLE:
- extraFlag = oracle.jdbc.xa.XAResource.ORATMSERIALIZABLE;
- break;
- case Connection.TRANSACTION_READ_COMMITTED: // default so do nothing
- break;
- case Connection.TRANSACTION_REPEATABLE_READ:
- case Connection.TRANSACTION_READ_UNCOMMITTED:
- default:
- throw new SQLException(jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.modifiers.notSupported")+level);
- }
-
- return level | extraFlag;
- }
-
- private boolean _reuseConnection = true;
-
- private static int _isolationLevel = oracle.jdbc.xa.XAResource.ORATMSERIALIZABLE;
-
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_jndi.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_jndi.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/oracle_jndi.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2004,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: oracle_jndi.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.ats.internal.jdbc.drivers.modifiers;
-
-import com.arjuna.ats.jta.xa.XAModifier;
-import com.arjuna.ats.jta.xa.XidImple;
-import com.arjuna.ats.jta.exceptions.NotImplementedException;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.Xid;
-import oracle.jdbc.xa.OracleXid;
-
-import java.sql.SQLException;
-
-/**
- * This is a stateless class to allow us to get round
- * problems in Oracle. For example, they can't work with
- * an arbitrary implementation of Xid - it has to be their
- * own implementation!
- *
- * @deprecated
- */
-public class oracle_jndi implements XAModifier, ConnectionModifier
-{
-
- public String initialise (String dbName)
- {
- int index = dbName.indexOf(extensions.reuseConnectionTrue);
- int end = extensions.reuseConnectionTrue.length();
-
- if (index != -1)
- _reuseConnection = false;
- else
- {
- index = dbName.indexOf(extensions.reuseConnectionFalse);
- end = extensions.reuseConnectionFalse.length();
- }
-
- /*
- * If at start, then this must be a JNDI URL. So remove component.
- */
-
- if (index != 0)
- return dbName;
- else
- return dbName.substring(end + 1); // remember colon
- }
-
- public Xid createXid (XidImple xid) throws SQLException, NotImplementedException
- {
- try
- {
- return new OracleXid(xid.getFormatId(), xid.getGlobalTransactionId(),
- xid.getBranchQualifier());
- }
- catch (Exception e)
- {
- SQLException sqlException = new SQLException(e.toString());
- sqlException.initCause(e);
- throw sqlException;
- }
- }
-
- public int xaStartParameters (int level) throws SQLException, NotImplementedException
- {
- return level;
- }
-
- public XAConnection getConnection (XAConnection conn) throws SQLException, NotImplementedException
- {
- /* We don't want to call close() on the connection any more. */
- return null;
- }
-
- public boolean supportsMultipleConnections () throws SQLException, NotImplementedException
- {
- return true;
- }
-
- public void setIsolationLevel (Connection conn, int level) throws SQLException, NotImplementedException
- {
-
- TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
- Transaction tx = null;
-
- try
- {
- tx = tm.getTransaction();
- }
- catch (javax.transaction.SystemException se)
- {
- /* Ignore: tx is null already */
- }
-
- if (tx != null && conn.getTransactionIsolation() != level)
- conn.setTransactionIsolation(level);
-
- }
-
- private boolean _reuseConnection = false;
-
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/sqlserver_jndi.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/sqlserver_jndi.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/modifiers/sqlserver_jndi.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2004,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: sqlserver_jndi.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.ats.internal.jdbc.drivers.modifiers;
-
-import com.arjuna.ats.jta.xa.XAModifier;
-import com.arjuna.ats.jta.xa.XidImple;
-import com.arjuna.ats.jta.exceptions.NotImplementedException;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.Xid;
-
-import java.sql.SQLException;
-
-/**
- * This is a stateless class to allow us to get round
- * problems in MSSQLServer.
- *
- * @deprecated
- */
-
-public class sqlserver_jndi implements XAModifier, ConnectionModifier
-{
-
- public String initialise (String dbName)
- {
- return dbName;
- }
-
- public Xid createXid (XidImple xid) throws SQLException, NotImplementedException
- {
- return xid;
- }
-
- public int xaStartParameters (int level) throws SQLException, NotImplementedException
- {
- return level;
- }
-
- public XAConnection getConnection (XAConnection conn) throws SQLException, NotImplementedException
- {
- /* We don't want to call close() on the connection any more. */
- return null;
- }
-
- public boolean supportsMultipleConnections () throws SQLException, NotImplementedException
- {
- return false;
- }
-
- public void setIsolationLevel (Connection conn, int level) throws SQLException, NotImplementedException
- {
-
- TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
- Transaction tx = null;
-
- try
- {
- tx = tm.getTransaction();
- }
- catch (javax.transaction.SystemException se)
- {
- /* Ignore: tx is null already */
- }
-
- if (tx != null && conn.getTransactionIsolation() != level)
- conn.setTransactionIsolation(level);
-
- }
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/oracle_8_1_6.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/oracle_8_1_6.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/drivers/oracle_8_1_6.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 1998, 1999, 2000,
- *
- * Arjuna Solutions Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: oracle_8_1_6.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.ats.internal.jdbc.drivers;
-
-import com.arjuna.ats.jdbc.logging.*;
-import com.arjuna.ats.jdbc.TransactionalDriver;
-
-import com.arjuna.ats.internal.jdbc.DynamicClass;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import oracle.jdbc.xa.client.OracleXADataSource;
-import oracle.jdbc.xa.OracleXid;
-import oracle.jdbc.pool.*;
-import javax.sql.XADataSource;
-
-import java.sql.SQLException;
-
-/**
- * This is a stateless class to allow us access to the Oracle
- * specific API without hardwiring the code into the generic
- * JDBC2 driver.
- *
- * @deprecated
- */
-public class oracle_8_1_6 implements DynamicClass
-{
-
- public oracle_8_1_6 ()
- {
- }
-
- public XADataSource getDataSource (String dbName) throws SQLException
- {
- return getDataSource(dbName, true);
- }
-
- 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)
- {
- throw e1;
- }
- catch (Exception e2)
- {
- SQLException sqlException = new SQLException("oracle_8_1_6 "+jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.exception")+e2);
- sqlException.initCause(e2);
- throw sqlException;
- }
- }
-
- public synchronized void shutdownDataSource (XADataSource ds) throws SQLException
- {
- }
-
- private static final String driverName = "oracle:";
- private static final String semicolon = ";";
-
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/recovery/OracleXARecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/recovery/OracleXARecovery.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/classes/com/arjuna/ats/internal/jdbc/recovery/OracleXARecovery.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,256 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2004, 2005,
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id$
- */
-
-package com.arjuna.ats.internal.jdbc.recovery;
-
-import java.util.*;
-import java.sql.*;
-import javax.sql.*;
-import javax.transaction.xa.*;
-import com.arjuna.common.util.logging.*;
-import com.arjuna.common.util.propertyservice.PropertyManagerFactory;
-import com.arjuna.common.util.propertyservice.PropertyManager;
-import com.arjuna.common.internal.util.propertyservice.plugins.io.XMLFilePlugin;
-import com.arjuna.ats.arjuna.logging.FacilityCode;
-import com.arjuna.ats.jdbc.common.*;
-import com.arjuna.ats.jdbc.logging.jdbcLogger;
-import com.arjuna.ats.jta.recovery.XAResourceRecovery;
-import oracle.jdbc.xa.client.OracleXADataSource;
-
-/**
- * This provides resource recovery for Oracle JDBC drivers.
- *
- * Users are responsible for DataSource creation information in a property file to
- * setup this class. Username and password values may also be provided in
- * the same property file.
- *
- * @deprecated Use BasicXARecovery instead for standalone cases. Use AppServerJDBCRecovery for JBossAS embedded cases.
- */
-
-public class OracleXARecovery implements XAResourceRecovery
-{
- public static final String DATABASE_URL = "DatabaseURL";
- public static final String USER_NAME = "UserName";
- public static final String PASSWORD = "Password";
-
- /*
- * Some XAResourceRecovery implementations will do their startup work here.
- */
-
- public OracleXARecovery()
- throws SQLException
- {
- if (jdbcLogger.logger.isDebugEnabled())
- jdbcLogger.logger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_CRASH_RECOVERY, "JDBCXARecovery()");
-
- _props = null;
- _hasMoreResources = false;
- _connectionEventListener = new LocalConnectionEventListener();
- }
-
- /**
- * The recovery module will have chopped off this class name already. The
- * parameter should specify a property file from which the url, user name,
- * password can be read.
- *
- * @message com.arjuna.ats.internal.jdbc.recovery.oracle.initexp An exception
- * occurred during initialisation.
- */
-
- public boolean initialise(String parameter)
- throws SQLException
- {
- if (jdbcLogger.logger.isDebugEnabled())
- jdbcLogger.logger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_CRASH_RECOVERY, "JDBCXARecovery.initialise(" + parameter + ")");
-
- if (parameter == null)
- return false;
-
- try
- {
- PropertyManager propertyManager = PropertyManagerFactory.getPropertyManagerForFile(parameter, false);
-
- _props = propertyManager.getProperties();
-
- _dbURL = _props.getProperty(DATABASE_URL);
- _user = _props.getProperty(USER_NAME);
- _password = _props.getProperty(PASSWORD);
- }
- catch (Exception e)
- {
- if (jdbcLogger.loggerI18N.isWarnEnabled())
- {
- jdbcLogger.loggerI18N.warn("com.arjuna.ats.internal.jdbc.recovery.oracle.initexp", new Object[] { e }, e);
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * @message com.arjuna.ats.internal.jdbc.recovery.oracle.xarec {0} could not find
- * information for connection!
- */
-
- public synchronized XAResource getXAResource()
- throws SQLException
- {
- createConnection();
-
- return _connection.getXAResource();
- }
-
- public boolean hasMoreResources()
- {
- if (_dataSource == null)
- try
- {
- createDataSource();
- }
- catch (SQLException sqlException)
- {
- return false;
- }
-
- if (_dataSource != null)
- {
- _hasMoreResources = ! _hasMoreResources;
-
- return _hasMoreResources;
- }
- else
- return false;
- }
-
- /**
- * Creating and initalising an OracleXADataSource instance. We got the relevant information from the
- * property file provided at input to this instance.
- *
- * @message com.arjuna.ats.internal.jdbc.oracle.recjndierror Could not resolve JNDI
- * XADataSource
- */
-
- private final void createDataSource()
- throws SQLException
- {
- 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"));
- }
- }
- catch (SQLException ex)
- {
- ex.printStackTrace();
-
- throw ex;
- }
- catch (Exception e)
- {
- e.printStackTrace();
-
- SQLException sqlException = new SQLException(e.toString());
- sqlException.initCause(e);
- throw sqlException;
- }
- }
-
- /**
- * Create the XAConnection from the XADataSource.
- */
-
- private final void createConnection()
- throws SQLException
- {
- try
- {
- if (_dataSource == null)
- createDataSource();
-
- if (_connection == null)
- {
- if ((_user == null) && (_password == null))
- _connection = _dataSource.getXAConnection();
- else
- _connection = _dataSource.getXAConnection(_user, _password);
-
- _connection.addConnectionEventListener(_connectionEventListener);
- }
- }
- catch (SQLException ex)
- {
- ex.printStackTrace();
-
- throw ex;
- }
- catch (Exception e)
- {
- e.printStackTrace();
-
- SQLException sqlException = new SQLException(e.toString());
- sqlException.initCause(e);
- throw sqlException;
- }
- }
-
- private class LocalConnectionEventListener implements ConnectionEventListener
- {
- public void connectionErrorOccurred(ConnectionEvent connectionEvent)
- {
- _connection.removeConnectionEventListener(_connectionEventListener);
- _connection = null;
- }
-
- public void connectionClosed(ConnectionEvent connectionEvent)
- {
- _connection.removeConnectionEventListener(_connectionEventListener);
- _connection = null;
- }
- }
-
- private XAConnection _connection;
- private XADataSource _dataSource;
- private LocalConnectionEventListener _connectionEventListener;
- private Properties _props;
- private String _dbURL;
- private String _user;
- private String _password;
- private boolean _hasMoreResources;
-}
Deleted: labs/jbosstm/trunk/ArjunaJTA/jdbc/tests/classes/com/hp/mwtests/ts/jdbc/utils/plugins/OracleDataSourcePlugin.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jdbc/tests/classes/com/hp/mwtests/ts/jdbc/utils/plugins/OracleDataSourcePlugin.java 2009-10-28 15:45:14 UTC (rev 29853)
+++ labs/jbosstm/trunk/ArjunaJTA/jdbc/tests/classes/com/hp/mwtests/ts/jdbc/utils/plugins/OracleDataSourcePlugin.java 2009-10-28 15:52:10 UTC (rev 29854)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.hp.mwtests.ts.jdbc.utils.plugins;
-
-import javax.sql.DataSource;
-
-/*
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
- *
- * Arjuna Technologies Limited,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: OracleDataSourcePlugin.java 2342 2006-03-30 13:06:17Z $
- */
-
-import oracle.jdbc.xa.client.*;
-
-public class OracleDataSourcePlugin extends BasePlugin
-{
- public DataSource processParameters(String[] args) throws java.sql.SQLException
- {
- OracleXADataSource ds = new OracleXADataSource();
-
- if ( isUsernameDefined() )
- {
- ds.setUser(getUsername());
- }
-
- if ( isPasswordDefined() )
- {
- ds.setPassword(getPassword());
- }
-
- if ( isDatabaseDefined() )
- {
- ds.setDatabaseName(getDatabase());
- }
-
- if ( isPortDefined() )
- {
- ds.setPortNumber(getPort());
- }
-
- if ( isUrlDefined() )
- {
- ds.setURL(getUrl());
- }
-
- if ( isServerDefined() )
- {
- ds.setServerName(getServer());
- }
-
- return ds;
- }
-}
More information about the jboss-svn-commits
mailing list