/* */ package com.arjuna.ats.internal.jdbc.drivers.modifiers;
/* */
/* */ import com.arjuna.ats.jdbc.logging.jdbcLogger;
/* */ import com.arjuna.ats.jta.exceptions.NotImplementedException;
/* */ import com.arjuna.ats.jta.xa.XAModifier;
/* */ import com.arjuna.ats.jta.xa.XidImple;
/* */ import com.arjuna.common.util.logging.Logi18n;
/* */ import java.sql.Connection;
/* */ import java.sql.DatabaseMetaData;
/* */ import java.sql.SQLException;
/* */ import javax.sql.XAConnection;
/* */ import javax.transaction.xa.Xid;
/* */
/* */ public class jndi
/* */ implements XAModifier
/* */ {
/* */ public String initialise(String dbName)
/* */ {
/* 55 */ int index = dbName.indexOf("reuseconnection=true");
/* 56 */ int end = "reuseconnection=true".length();
/* */
/* 58 */ if (index == -1)
/* */ {
/* 60 */ index = dbName.indexOf("reuseconnection=false");
/* 61 */ end = "reuseconnection=false".length();
/* */ }
/* */
/* 68 */ if (index != 0) {
/* 69 */ return dbName;
/* */ }
/* 71 */ return dbName.substring(end + 1);
/* */ }
/* */
/* */ public int xaStartParameters(int level) throws SQLException, NotImplementedException
/* */ {
/* 76 */ return level;
/* */ }
/* */
/* */ public Xid createXid(XidImple xid) throws NotImplementedException
/* */ {
/* 81 */ throw new NotImplementedException();
/* */ }
/* */
/* */ public XAConnection getConnection(XAConnection conn) throws SQLException, NotImplementedException
/* */ {
/* 86 */ throw new NotImplementedException();
/* */ }
/* */
/* */ public boolean supportsMultipleConnections() throws SQLException, NotImplementedException
/* */ {
/* 91 */ throw new NotImplementedException();
/* */ }
/* */
/* */ public void setIsolationLevel(Connection conn, int level) throws SQLException, NotImplementedException
/* */ {
/* 96 */ DatabaseMetaData metaData = conn.getMetaData();
/* */
/* 98 */ if (metaData.supportsTransactionIsolationLevel(level))
/* */ {
/* */ try
/* */ {
/* 102 */ if (conn.getTransactionIsolation() != level)
/* */ {
/* 104 */ conn.setTransactionIsolation(level);
/* */ }
/* */ }
/* */ catch (SQLException e)
/* */ {
/* 109 */ if (jdbcLogger.loggerI18N.isWarnEnabled())
/* */ {
/* 111 */ jdbcLogger.loggerI18N.warn("com.arjuna.ats.internal.jdbc.isolationlevelfailset", new Object[] { "ConnectionImple.getConnection", e });
/* */ }
/* */
/* 115 */ throw e;
/* */ }
/* */ }
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: com.arjuna.ats.internal.jdbc.drivers.modifiers.jndi
* JD-Core Version: 0.6.0
*/