trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [07/44] incubator-trafodion git commit: Refact package name
Date Tue, 18 Apr 2017 23:52:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/51a83dc2/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Driver.java
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Driver.java b/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Driver.java
deleted file mode 100644
index 2e3f0bb..0000000
--- a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Driver.java
+++ /dev/null
@@ -1,391 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-
-/* -*-java-*-
- * Filename    : T2Driver.java
- * Description :
- */
-package org.trafodion.jdbc.t2;
-
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.sql.SQLFeatureNotSupportedException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.logging.Logger;
-
-public class T2Driver extends T2Properties implements java.sql.Driver {
-	// The vproc needs to be exposed public so JdbcT2.java can access it
-	public static String driverVproc = DriverInfo.driverVproc;
-	
-	// java.sql.Driver interface methods
-	public boolean acceptsURL(String url) {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_acceptsURL].methodEntry();
-		try {
-			// Do we need to ignorecase or white spaces, may be not
-			if (url.indexOf("jdbc:t2jdbc:", 0) == 0)
-				return true;
-			else
-				return false;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_acceptsURL].methodExit();
-		}
-	}
-	public java.sql.Connection connect(String url, java.util.Properties info)
-			throws SQLException {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_connect].methodEntry(JdbcDebug.debugLevelPooling);
-		if (JdbcDebugCfg.traceActive)
-			debug[methodId_connect].methodParameters("url=" + url + ", info="
-					+ JdbcDebug.debugObjectStr(info));
-		try {
-			Connection connect = null;
-			String key;
-			SQLMXDataSource ds = null;
-			
-			String delimiter = "|";
-			if (acceptsURL(url)) {
-				weakConnection.gcConnections();
-				
-				initialize(info);
-				
-				String stmtatomicity_ = getStmtatomicity();
-				if (stmtatomicity_ != null) {
-					if (stmtatomicity_.equalsIgnoreCase("on")) {
-						stmtatomicityval_ = 1;
-						stmtatomicity_ = stmtatomicity_.toUpperCase();
-					} else
-						stmtatomicity_ = "OFF";
-				} else
-					stmtatomicity_ = "OFF";
-				String Spjrs_;
-				int Spjrsval_ = 0;
-				
-				Spjrs_ = getSpjrs();
-				if (Spjrs_ != null) {
-					if (Spjrs_.equalsIgnoreCase("on")) {
-						Spjrsval_ = 1;
-						Spjrs_ = Spjrs_.toUpperCase();
-					} else
-						Spjrs_ = "OFF";
-				} else
-					Spjrs_ = "OFF";
-				
-				traceFlag_ = getTraceFlag();
-				
-				// Set the driver default encoding to the current java encoding.
-				// Only way to get the current encoding is through the
-				// OutputStreamWriter using the ByteArrayOutputStream constructor.
-				setDefaultEncoding(new java.io.OutputStreamWriter(
-						new java.io.ByteArrayOutputStream()).getEncoding());
-
-				// Set the ISO88591 charset encoding override if not null
-				if (getIso88591EncodingOverride() != null)
-					setCharsetEncodingOverride(SQLMXDesc.SQLCHARSETCODE_ISO88591,getIso88591EncodingOverride());
-				
-				if (info != null) {
-
-
-					// Note1: The url is not part of the key since the url
-					// (currently) is always "jdbc:sqlmx:"
-					// This will have to change if additional url's are added.
-					// Note2: The delimiter is required to always ensure a
-					// unique key is created
-					// RFE: Batch update improvements
-					key = getLanguage() + delimiter + getCatalog() + delimiter + getSchema()
-							+ delimiter + getMploc() + delimiter + getSqlmx_nowait()
-							+ delimiter + getBatchBinding() + delimiter
-							+ getMaxPoolSize() + delimiter + getMinPoolSize() + delimiter
-							+ getMaxStatements() + delimiter + getTraceFlag() + delimiter
-							+ getBlobTableName() + delimiter + getClobTableName()
-							+ delimiter + getTransactionMode() + delimiter
-							+ getIso88591EncodingOverride() + delimiter
-							+ getContBatchOnError();
-
-					// The generated key is converted to upper case to make it
-					// unique
-					// to allow lower and/or upper case string properties.
-					key = key.toUpperCase();
-					ds = (SQLMXDataSource) dsCache_.get(key);
-					if (ds == null) {
-						ds = new SQLMXDataSource(getProperties());
-
-						dsCache_.put(key, ds);
-					}
-				} 
-				connect = ds.getConnection();			
-				
-			}
-			return connect;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_connect].methodExit();
-		}
-	}
-
-	public int getMajorVersion() {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_getMajorVersion].methodEntry();
-		try {
-			if (JdbcDebugCfg.traceActive)
-				debug[methodId_getMajorVersion].methodReturn(Integer
-						.toString(databaseMajorVersion_));
-			return databaseMajorVersion_;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_getMajorVersion].methodExit();
-		}
-	}
-
-	public int getMinorVersion() {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_getMinorVersion].methodEntry();
-		try {
-			if (JdbcDebugCfg.traceActive)
-				debug[methodId_getMinorVersion].methodReturn(Integer
-						.toString(databaseMinorVersion_));
-			return databaseMinorVersion_;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_getMinorVersion].methodExit();
-		}
-	}
-
-	public java.sql.DriverPropertyInfo[] getPropertyInfo(String url,
-			java.util.Properties info) {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_getPropertyInfo].methodEntry();
-		try {
-			if (acceptsURL(url)) {
-				return super.getPropertyInfo(url, info);
-			}
-
-			return null;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_getPropertyInfo].methodExit();
-		}
-	}
-
-	public boolean jdbcCompliant() {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_jdbcCompliant].methodEntry();
-		try {
-			return true;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_jdbcCompliant].methodExit();
-		}
-	}
-
-	static int getDatabaseMajorVersion() {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_getDatabaseMajorVersion].methodEntry();
-		try {
-			return databaseMajorVersion_;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_getDatabaseMajorVersion].methodExit();
-		}
-	}
-
-	static int getDatabaseMinorVersion() {
-		if (JdbcDebugCfg.entryActive)
-			debug[methodId_getDatabaseMinorVersion].methodEntry();
-		try {
-			return databaseMinorVersion_;
-		} finally {
-			if (JdbcDebugCfg.entryActive)
-				debug[methodId_getDatabaseMinorVersion].methodExit();
-		}
-	}
-
-	// Fields
-	private static T2Driver singleton_;
-
-    private static Locale locale_;
-	
-	static int stmtatomicityval_;
-
-	// dateFormat object used to format the timestamps printed in jdbcTrace
-	// output.
-	// Output format set at: [08/01/05 09:52:54]
-	public static DateFormat dateFormat = new SimpleDateFormat(
-			"MM/dd/yy hh:mm:ss");
-
-	// Text which will be pre-appended to jdbcTrace output.
-	public static String traceText = "jdbcTrace:[";
-
-	// Number of characters required to strip off the "org.trafodion.jdbc.t2."
-	// from the method name in jdbcTrace output.
-	public static int REMOVE_PKG_NAME = 17;
-
-	// JDBC/MX vproc string to log in jdbcTrace driver output.
-	public static String printTraceVproc = traceText
-			+ dateFormat.format(new Date()) + "]:"
-			+ "TRACING JDBC/MX VERSION: " + driverVproc;
-
-	// Trace control levels and bit flags used to minimize jdbcTrace output.
-	public static final int POOLING_LVL = 1; // Trace Connection and Statement
-	// Pooling only
-	public static final int LOB_LVL = 2; // Trace LOB code path only
-	public static final int ENTRY_LVL = 3; // Trace all Java method entry
-
-	static final int DATABASE_MAJOR_VERSION_R20 = 3; //changed for R3.0 TCF
-	static final int DATABASE_MINOR_VERSION_R20 = 0;
-	static final int databaseMajorVersion_;
-	static final int databaseMinorVersion_;
-	static int pid_;
-
-	static HashMap<String, SQLMXDataSource> dsCache_;
-
-	static int traceFlag_;
-	// Constructors
-	public T2Driver() {
-		super();
-		String lang = this.getLanguage();
-		if (lang == null)
-			locale_ = Locale.getDefault();
-		else {
-			if (lang.equalsIgnoreCase("ja"))
-				locale_ = new Locale("ja", "", "");
-			else if (lang.equalsIgnoreCase("en"))
-				locale_ = new Locale("en", "", "");
-			else
-				locale_ = Locale.getDefault();
-		}
-		
-		if (JdbcDebugCfg.entryActive) {
-			debug[methodId_T2Driver].methodEntry();
-			debug[methodId_T2Driver].methodExit();
-		}
-	}
-
-	// Native methods
-	// MFC- SQLMXInitialize now contains 2 more parameters
-	static native int getPid();
-
-	native static void SQLMXInitialize(String language, int nowaitOn,
-			String modulecaching, String compiledmodulelocation);
-
-	native static void setDefaultEncoding(String encoding);
-
-	native static void checkLibraryVersion(String javaVproc);
-
-	native static void setCharsetEncodingOverride(int charset, String encoding);
-
-	private native static int getDatabaseMajorVersionJNI();
-
-	private native static int getDatabaseMinorVersionJNI();
-
-	private static int methodId_acceptsURL = 0;
-	private static int methodId_getPropertyValue = 1;
-	private static int methodId_connect = 2;
-	private static int methodId_getStaticMajorVersion = 3;
-	private static int methodId_getStaticMinorVersion = 4;
-	private static int methodId_getMajorVersion = 5;
-	private static int methodId_getMinorVersion = 6;
-	private static int methodId_getPropertyInfo = 7;
-	private static int methodId_jdbcCompliant = 8;
-	private static int methodId_getDatabaseMajorVersion = 9;
-	private static int methodId_getDatabaseMinorVersion = 10;
-	private static int methodId_T2Driver = 11;
-	private static int totalMethodIds = 12;
-	private static JdbcDebug[] debug;
-
-	// initializer to register the Driver with the Driver manager
-	static {
-		String className = "T2Driver";
-
-		if (JdbcDebugCfg.entryActive) {
-			debug = new JdbcDebug[totalMethodIds];
-			debug[methodId_acceptsURL] = new JdbcDebug(className, "acceptsURL");
-			debug[methodId_getPropertyValue] = new JdbcDebug(className,
-					"getPropertyValue");
-			debug[methodId_connect] = new JdbcDebug(className, "connect");
-			debug[methodId_getStaticMajorVersion] = new JdbcDebug(className,
-					"getStaticMajorVersion");
-			debug[methodId_getStaticMinorVersion] = new JdbcDebug(className,
-					"getStaticMinorVersion");
-			debug[methodId_getMajorVersion] = new JdbcDebug(className,
-					"getMajorVersion");
-			debug[methodId_getMinorVersion] = new JdbcDebug(className,
-					"getMinorVersion");
-			debug[methodId_getPropertyInfo] = new JdbcDebug(className,
-					"getPropertyInfo");
-			debug[methodId_jdbcCompliant] = new JdbcDebug(className,
-					"jdbcCompliant");
-			debug[methodId_getDatabaseMajorVersion] = new JdbcDebug(className,
-					"getDatabaseMajorVersion");
-			debug[methodId_getDatabaseMinorVersion] = new JdbcDebug(className,
-					"getDatabaseMinorVersion");
-			debug[methodId_T2Driver] = new JdbcDebug(className,
-					"T2Driver");
-		}
-
-		singleton_ = new T2Driver();
-		// Register the Driver with the Driver Manager
-		try {
-			DriverManager.registerDriver(singleton_);
-		} catch (SQLException e) {
-			singleton_ = null;
-			e.printStackTrace();
-		}
-
-		dsCache_ = new HashMap<String, SQLMXDataSource>();
-		//used to obtain 64 bit or 32bit JVM and load appropriately
-		String dataModel = System.getProperty("sun.arch.data.model");
-		if (dataModel !=null && dataModel.equals("64")){
-			System.loadLibrary("jdbcT2");	
-		}else {
-			System.loadLibrary("jdbcT2");
-		}
-
-		// Verify that the JDBC Java libaray is compatible with the JNI library
-		checkLibraryVersion(DriverInfo.driverVproc);
-		
-		// Initialize Java objects, methods references into gJNICache
-		SQLMXInitialize(locale_.getLanguage(), 1, "OFF", null);
-		
-    	// Get the major and minor database version numbers that
-		// were setup in SQLMXInitialize()
-		databaseMajorVersion_ = getDatabaseMajorVersionJNI();
-		databaseMinorVersion_ = getDatabaseMinorVersionJNI();
-		pid_ = getPid();
-
-
-	}
-
-
-	public Logger getParentLogger() throws SQLFeatureNotSupportedException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/51a83dc2/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Properties.java
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Properties.java b/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Properties.java
deleted file mode 100644
index 17073eb..0000000
--- a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/T2Properties.java
+++ /dev/null
@@ -1,1336 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-
-package org.trafodion.jdbc.t2;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.sql.SQLException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-
-public class T2Properties {
-
-    WeakConnection weakConnection = new WeakConnection();
-
-    private String catalog_;
-    private String schema_;
-    private String mploc_;
-    private int batchBindingSize_;
-    private int sql_nowait;
-    private int traceFlag_;
-    private String traceFile_;
-    private String clobTableName_;
-    private String blobTableName_;
-    private int transactionMode_;
-    private String iso88591EncodingOverride_;
-    private String stmtatomicity_;
-    private int stmtatomicityval_;
-    private String Spjrs_;
-    private int Spjrsval_;
-    private String contBatchOnError_;
-    private boolean contBatchOnErrorval_;
-    String description_;
-    String dataSourceName_;
-    String language_;
-    String url_;
-    private String enableLog_;
-    private String idMapFile;
-    
-    //Publishing
-    private int statisticsIntervalTime_;
-    private int statisticsLimitTime_;
-    private String statisticsType_;
-    private String programStatisticsEnabled_;
-    private String statisticsSqlPlanEnabled_;
-
-    //Pooling
-    private int maxPoolSize_ = -1;
-    private int minPoolSize_;
-    private int initialPoolSize_;
-    private int maxIdleTime_;
-    private int maxStatements_;
-
-    //MFC
-    private String enableMFC_;
-    private String compiledModuleLocation_;
-
-    private String externalCallHandler = "NONE";
-    private String externalCallPrefix = "EXT";
-
-    int loginTimeout_;
-
-    private Properties defaults_;
-    private Properties inprops_;
-    private final String propPrefix_ = "t2jdbc.";
-
-    private long queryExecuteTime_;
-    private String T2QueryExecuteLogFile_;
-
-    private PrintWriter logWriter_=null;
-
-    private Pattern namePat_ = Pattern.compile("(\"(([^\"]|\"\")+)\")");
-    private Pattern catalogPat_ =Pattern.compile("((\"([^\"]|\"\")*\")|.+)(\\.)");
-    /**
-     * @return the catalog_
-     */
-    public String getCatalog() {
-        return catalog_;
-    }
-
-    /**
-     * @param catalog_ the catalog_ to set
-     */
-    public void setCatalog(String catalog_) {
-//		this.catalog_ = catalog_;
-        if (catalog_ != null) {
-            if (!catalog_.startsWith("\""))
-                this.catalog_ = catalog_.toUpperCase();
-            else
-                this.catalog_ = catalog_;
-        }
-    }
-
-    /**
-     * @return the schema_
-     */
-    public String getSchema() {
-        return schema_;
-    }
-
-    /**
-     * @param schema_ the schema_ to set
-     */
-    public void setSchema(String schema_) {
-//		this.schema_ = schema_;
-        if (schema_ != null) {
-            if (schema_.contains(".")) {  // To split catalog & schema separately, though user gives as cat.sch
-                String catalogName = "";
-                catalogName = getCatalogToken(schema_);
-                if (catalogName != null) {
-                    setCatalog(catalogName);
-                    schema_ = schema_.substring(catalogName.length() + 1);
-                }
-            }
-            if (!schema_.startsWith("\""))
-                this.schema_ = schema_.toUpperCase();
-            else {
-                this.schema_ = schema_;
-            }
-        }
-    }
-
-    private String getCatalogToken(String schemaStr)
-    {
-        Matcher mat=catalogPat_.matcher(schemaStr);
-        if (mat.find()) {
-            String temp = mat.group().substring(0, mat.group().length() - 1);
-            if (temp.startsWith("\"")) {
-                if (!namePat_.matcher(schemaStr).matches())
-                    return (temp);
-                else
-                    return null;
-            } else
-                return (temp.toUpperCase());
-        } else {
-            return null;
-        }
-
-    }
-
-    /**
-     * @return the mploc_
-     */
-    public String getMploc() {
-        return mploc_;
-    }
-
-    /**
-     * @param mploc_ the mploc_ to set
-     */
-    public void setMploc(String mploc_) {
-        this.mploc_ = mploc_;
-    }
-
-    /**
-     * @return the batchBindingSize_
-     */
-    public int getBatchBinding() {
-        return batchBindingSize_;
-    }
-
-    /**
-     * @param batchBindingSize_ the batchBindingSize_ to set
-     */
-    public void setBatchBinding(int batchBindingSize_) {
-        if(batchBindingSize_ > -1){
-        this.batchBindingSize_ = batchBindingSize_;
-        }
-        else
-        {
-            try{
-            throw new SQLException(
-            "batchBinding value should be a positive value.");
-            }
-            catch(SQLException e){
-
-            }
-        }
-    }
-
-    /**
-     * @param batchBindingSize_ the batchBindingSize_ to set
-     */
-    public void setBatchBinding(String batchBindingSize_) {
-        int bbSize = 0;
-
-        if(batchBindingSize_ != null){
-            bbSize = Integer.parseInt(batchBindingSize_);
-        }
-
-        setBatchBinding(bbSize);
-    }
-
-
-
-    /**
-     * @return the sql_nowait
-     */
-    public int getSqlmx_nowait() {
-        return sql_nowait;
-    }
-
-    /**
-     * @param sql_nowait the sql_nowait to set
-     */
-    public void setSqlmx_nowait(String nowaitFlag) {
-        if (nowaitFlag == null)
-            this.sql_nowait = 1;
-        else {
-            if (nowaitFlag.equalsIgnoreCase("off") || nowaitFlag.equals("0")) //when setSqlmx_nowait called with zero
-                this.sql_nowait = 0;
-            else if (nowaitFlag.equalsIgnoreCase("on_olt_off")|| nowaitFlag.equals("2"))
-                this.sql_nowait = 2;
-            else
-                this.sql_nowait = 1;
-        }
-//		this.sql_nowait = sql_nowait;
-    }
-
-    /**
-     * @return the traceFlag_
-     */
-    public int getTraceFlag() {
-        return traceFlag_;
-    }
-
-    /**
-     * @param traceFlag_ the traceFlag_ to set
-     */
-    public void setTraceFlag(int traceFlag_) {
-        this.traceFlag_ = traceFlag_;
-    }
-
-    public void setTraceFlag(String traceFlag_) {
-        int tf = 0;
-        if(traceFlag_ != null){
-            tf = Integer.parseInt(traceFlag_);
-        }
-        setTraceFlag(tf);
-    }
-
-    /**
-     * @return the traceFile_
-     */
-    public String getTraceFile() {
-        return traceFile_;
-    }
-
-    /**
-     * @param traceFile_ the traceFile_ to set
-     */
-    public void setTraceFile(String traceFile) {
-//		this.traceFile_ = traceFile_;
-
-        if (traceFile != null) {
-            File directory = new File(traceFile);
-            if (directory.isDirectory()) {
-                // Generate a file name.
-                SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss-");
-                String pid = df.format(new Date())
-                        + Integer.toString(T2Driver.pid_);
-                try {
-                    this.traceFile_ = directory.getCanonicalPath() + "/" + pid
-                            + ".log";
-                } catch (IOException e) {
-                    // TODO Auto-generated catch block
-                    RuntimeException ex = new RuntimeException(e.getMessage());
-
-                    ex.setStackTrace(e.getStackTrace());
-                    throw ex;
-
-                }
-            }else {
-                this.traceFile_ = traceFile;
-            }
-        }
-    }
-
-    /**
-     * @return the clobTableName_
-     */
-    public String getClobTableName() {
-        return clobTableName_;
-    }
-
-    /**
-     * @param clobTableName_ the clobTableName_ to set
-     */
-    public void setClobTableName(String clobTableName_) {
-        this.clobTableName_ = clobTableName_;
-    }
-
-    /**
-     * @return the blobTableName_
-     */
-    public String getBlobTableName() {
-        return blobTableName_;
-    }
-
-    /**
-     * @param blobTableName_ the blobTableName_ to set
-     */
-    public void setBlobTableName(String blobTableName_) {
-        this.blobTableName_ = blobTableName_;
-    }
-
-    /**
-     * @return the transactionMode_
-     */
-    public String getTransactionMode() {
-        return (SQLMXConnection.mapTxnModeToString(transactionMode_));
-    }
-
-
-    public void setTransactionMode(String transactionMode_) {
-        int txnMode;
-
-        if(transactionMode_ !=null){
-            txnMode = SQLMXConnection.mapTxnMode(transactionMode_);
-            if (txnMode != SQLMXConnection.TXN_MODE_INVALID)
-                this.transactionMode_ = txnMode;
-            else
-                try {
-                    throw Messages.createSQLException(null,"invalid_transaction_mode", null);
-                } catch (SQLException e) {
-                    // TODO Auto-generated catch block
-                }
-        }else {
-            this.transactionMode_ = SQLMXConnection.TXN_MODE_MIXED;
-        }
-    }
-
-    /**
-     * @return the iso88591EncodingOverride_
-     */
-    public String getIso88591EncodingOverride() {
-        return iso88591EncodingOverride_;
-    }
-
-    /**
-     * @param iso88591EncodingOverride_ the iso88591EncodingOverride_ to set
-     */
-    public void setIso88591EncodingOverride(String iso88591EncodingOverride_) {
-//		this.iso88591EncodingOverride_ = iso88591EncodingOverride_;
-        if (iso88591EncodingOverride_ != null)
-            this.iso88591EncodingOverride_ = iso88591EncodingOverride_.toUpperCase();
-    }
-
-    /**
-     * @return the stmtatomicity_
-     */
-    public String getStmtatomicity() {
-        return stmtatomicity_;
-    }
-
-    /**
-     * @param stmtatomicity_ the stmtatomicity_ to set
-     */
-    public void setStmtatomicity(String stmtatomicity_) {
-        this.stmtatomicity_ = stmtatomicity_;
-    }
-
-    /**
-     * @return the stmtatomicityval_
-     */
-    public int getStmtatomicityval() {
-        return stmtatomicityval_;
-    }
-
-    /**
-     * @param stmtatomicityval_ the stmtatomicityval_ to set
-     */
-    public void setStmtatomicityval(int stmtatomicityval_) {
-        this.stmtatomicityval_ = stmtatomicityval_;
-    }
-
-    /**
-     * @return the spjrs_
-     */
-    public String getSpjrs() {
-        return Spjrs_;
-    }
-
-    /**
-     * @param spjrs_ the spjrs_ to set
-     */
-    public void setSpjrs(String spjrs_) {
-//		Spjrs_ = spjrs_;
-        if (spjrs_ != null) {
-            if (spjrs_.equalsIgnoreCase("on")) {
-                Spjrsval_ = 1;
-                Spjrs_ = spjrs_.toUpperCase();
-            } else
-                Spjrs_ = "OFF";
-        } else
-            Spjrs_ = "OFF";
-    }
-
-    public boolean isSpjrsOn() {
-        if(Spjrsval_ == 1)
-            return true;
-        else
-            return false;
-    }
-
-    /**
-     * @return the contBatchOnError_
-     */
-    public String getContBatchOnError() {
-        return contBatchOnError_;
-    }
-
-    /**
-     * @param contBatchOnError_ the contBatchOnError_ to set
-     */
-    public void setContBatchOnError(String contBatchOnError_) {
-        this.contBatchOnError_ = contBatchOnError_;
-    }
-
-    /**
-     * @return the contBatchOnErrorval_
-     */
-    public boolean isContBatchOnErrorval() {
-        return contBatchOnErrorval_;
-    }
-
-    /**
-     * @param contBatchOnErrorval_ the contBatchOnErrorval_ to set
-     */
-    public void setContBatchOnErrorval(boolean contBatchOnErrorval_) {
-        this.contBatchOnErrorval_ = contBatchOnErrorval_;
-    }
-
-    /**
-     * @return the description_
-     */
-    public String getDescription() {
-        return description_;
-    }
-
-    /**
-     * @param description_ the description_ to set
-     */
-    public void setDescription(String description_) {
-        this.description_ = description_;
-    }
-
-    /**
-     * @return the dataSourceName_
-     */
-    public String getDataSourceName() {
-        return dataSourceName_;
-    }
-
-    /**
-     * @param dataSourceName_ the dataSourceName_ to set
-     */
-    public void setDataSourceName(String dataSourceName_) {
-        this.dataSourceName_ = dataSourceName_;
-    }
-
-    /**
-     * @return the language_
-     */
-    public String getLanguage() {
-        return language_;
-    }
-
-    /**
-     * @param language_ the language_ to set
-     */
-    public void setLanguage(String language_) {
-        this.language_ = language_;
-    }
-
-
-    /**
-     * @return the url_
-     */
-    public String getUrl() {
-        return url_;
-    }
-
-    /**
-     * @param url_ the url_ to set
-     */
-    public void setUrl(String url_) {
-        this.url_ = url_;
-    }
-
-    /**
-     * @return the enableLog_
-     */
-    public String getEnableLog() {
-        return enableLog_;
-    }
-
-    /**
-     * @param enableLog_ the enableLog_ to set
-     */
-    public void setEnableLog(String enableLog_) {
-//		this.enableLog_ = enableLog_;
-        if(enableLog_ != null && enableLog_.equalsIgnoreCase("ON")){
-            this.enableLog_ = "ON";
-        }else {
-            this.enableLog_ = "OFF";
-        }
-    }
-
-    /**
-     * @return the maxPoolSize_
-     */
-    public int getMaxPoolSize() {
-        return maxPoolSize_;
-    }
-    public String getIdMapFile() {
-        return idMapFile;
-    }
-    public void setIdMapFile(String idMapFile) {
-        this.idMapFile = idMapFile;
-    }
-    
-    /**
-     * @param maxPoolSize_ the maxPoolSize_ to set
-     */
-    public void setMaxPoolSize(int maxPoolSize_) {
-        this.maxPoolSize_ = maxPoolSize_;
-    }
-
-    public void setMaxPoolSize(String maxPoolSize_) {
-        int maxPS = -1;
-        if(maxPoolSize_ != null){
-            maxPS = Integer.parseInt(maxPoolSize_);
-        }
-        setMaxPoolSize(maxPS);
-    }
-
-    /**
-     * @return the minPoolSize_
-     */
-    public int getMinPoolSize() {
-        return minPoolSize_;
-    }
-
-    /**
-     * @param minPoolSize_ the minPoolSize_ to set
-     */
-    public void setMinPoolSize(int minPoolSize_) {
-        this.minPoolSize_ = minPoolSize_;
-    }
-
-    public void setMinPoolSize(String minPoolSize_) {
-        int mps = 0;
-        if(minPoolSize_ != null){
-            mps = Integer.parseInt(minPoolSize_);
-        }
-        setMinPoolSize(mps);
-    }
-    /**
-     * @return the initialPoolSize_
-     */
-    public int getInitialPoolSize() {
-        return initialPoolSize_;
-    }
-
-    /**
-     * @param initialPoolSize_ the initialPoolSize_ to set
-     */
-    public void setInitialPoolSize(int initialPoolSize_) {
-        this.initialPoolSize_ = initialPoolSize_;
-    }
-
-    /**
-     * @param initialPoolSize_ the initialPoolSize_ to set
-     */
-    public void setInitialPoolSize(String initialPoolSize_) {
-        int initialPS =0;
-        if(initialPoolSize_ != null){
-            initialPS = Integer.parseInt(initialPoolSize_);
-        }
-        setInitialPoolSize(initialPS);
-    }
-    /**
-     * @return the maxIdleTime_
-     */
-    public int getMaxIdleTime() {
-        return maxIdleTime_;
-    }
-
-    /**
-     * @param maxIdleTime_ the maxIdleTime_ to set
-     */
-    public void setMaxIdleTime(int maxIdleTime_) {
-        if(maxIdleTime_ > 0)
-            this.maxIdleTime_ = maxIdleTime_;
-        else
-            this.maxIdleTime_ = 0;
-    }
-
-
-    public void setMaxIdleTime(String maxIdleTime_) {
-    int maxIT = 0;
-    if (maxIdleTime_ != null) {
-        maxIT = Integer.parseInt(maxIdleTime_);
-    }
-        setMaxIdleTime(maxIT);
-    }
-    /**
-     * @return the maxStatements_
-     */
-    public int getMaxStatements() {
-        return maxStatements_;
-    }
-
-    /**
-     * @param maxStatements_ the maxStatements_ to set
-     */
-    public void setMaxStatements(int maxStatements_) {
-        this.maxStatements_ = maxStatements_;
-    }
-
-    public void setMaxStatements(String maxStatements_) {
-        int maxStmt = 0;
-        if (maxStatements_ != null) {
-            maxStmt = Integer.parseInt(maxStatements_);
-        }
-        setMaxStatements(maxStmt);
-
-    }
-    /**
-     * @return the enableMFC_
-     */
-    public String getEnableMFC() {
-        return enableMFC_;
-    }
-
-    /**
-     * @param enableMFC_ the enableMFC_ to set
-     */
-    public void setEnableMFC(String enableMFC_) {
-        if(enableMFC_ != null)
-            this.enableMFC_ = enableMFC_.toUpperCase();
-        else
-            this.enableMFC_ = "OFF";
-    }
-
-    /**
-     * @return the compiledModuleLocation_
-     */
-    public String getCompiledModuleLocation() {
-        return compiledModuleLocation_;
-    }
-
-    /**
-     * @param compiledModuleLocation_ the compiledModuleLocation_ to set
-     */
-    public void setCompiledModuleLocation(String compiledModuleLocation_) {
-        if(compiledModuleLocation_ !=null)
-            this.compiledModuleLocation_ = compiledModuleLocation_;
-        else
-            this.compiledModuleLocation_ = "/usr/tandem/sqlmx/USERMODULES";
-    }
-
-    /**
-     * @return the externalCallHandler
-     */
-    public String getExternalCallHandler() {
-        return externalCallHandler;
-    }
-
-    /**
-     * @param externalCallHandler the externalCallHandler to set
-     */
-    public void setExternalCallHandler(String externalCallHandler) {
-        if(externalCallHandler !=null){
-            this.externalCallHandler = externalCallHandler;
-        }else
-            this.externalCallHandler = "NONE";
-
-    }
-
-    /**
-     * @return the externalCallPrefix
-     */
-    public String getExternalCallPrefix() {
-        return externalCallPrefix;
-    }
-
-    /**
-     * @param externalCallPrefix the externalCallPrefix to set
-     */
-    public void setExternalCallPrefix(String externalCallPrefix) {
-        if(externalCallPrefix !=null)
-            this.externalCallPrefix = externalCallPrefix;
-        else
-            this.externalCallPrefix = "EXT";
-    }
-
-    /**
-     * @return the loginTimeout_
-     */
-    public int getLoginTimeout() {
-        return loginTimeout_;
-    }
-
-    /**
-     * @param loginTimeout_ the loginTimeout_ to set
-     */
-    public void setLoginTimeout(int loginTimeout_) {
-        this.loginTimeout_ = loginTimeout_;
-    }
-
-    public void setLoginTimeout(String loginTimeout_) {
-        int loginTimeout = 0;
-        if(loginTimeout_ != null){
-            loginTimeout = Integer.parseInt(loginTimeout_);
-        }
-        setLoginTimeout(loginTimeout);
-    }
-
-    /**
-     * @return the queryExecuteTime_
-     */
-    public long getQueryExecuteTime() {
-        return queryExecuteTime_;
-    }
-
-    /**
-     * @param queryExecuteTime_ the queryExecuteTime_ to set
-     */
-    public void setQueryExecuteTime(long queryExecuteTime_) {
-        this.queryExecuteTime_ = queryExecuteTime_;
-    }
-
-    /**
-     * @param queryExecuteTime_ the queryExecuteTime_ to set
-     */
-    public void setQueryExecuteTime(String queryExecuteTime_) {
-        long queryET = 0;
-        if(queryExecuteTime_ !=null){
-            queryET =  Long.parseLong(queryExecuteTime_);
-        }
-        setQueryExecuteTime(queryET);
-    }
-
-    /**
-     * @return the t2QueryExecuteLogFile_
-     */
-    public String getT2QueryExecuteLogFile() {
-        return T2QueryExecuteLogFile_;
-    }
-
-    /**
-     * @param queryExecuteLogFile_ the t2QueryExecuteLogFile_ to set
-     */
-    public void setT2QueryExecuteLogFile(String queryExecuteLogFile_) {
-        T2QueryExecuteLogFile_ = queryExecuteLogFile_;
-    }
-
-//====================================================================
-    // Publishing
-
-    /**
-     * @return the statisticsIntervalTime_
-     */
-    public int getStatisticsIntervalTime() {
-        return statisticsIntervalTime_;
-    }
-
-    /**
-     * @param statisticsIntervalTime_ the statisticsIntervalTime_ to set
-     */
-    public void setStatisticsIntervalTime(int statisticsIntervalTime_) {
-        this.statisticsIntervalTime_ = statisticsIntervalTime_;
-    }
-
-    public void setStatisticsIntervalTime(String statisticsIntervalTime_) {
-        int st = 60;
-        if(statisticsIntervalTime_ != null){
-            st = Integer.parseInt(statisticsIntervalTime_);
-        }
-        setStatisticsIntervalTime(st);
-    }
-
-    /**
-     * @return the statisticsLimitTime_
-     */
-    public int getStatisticsLimitTime() {
-        return statisticsLimitTime_;
-    }
-
-    /**
-     * @param statisticsLimitTime_ the statisticsLimitTime_ to set
-     */
-    public void setStatisticsLimitTime(int statisticsLimitTime_) {
-        this.statisticsLimitTime_ = statisticsLimitTime_;
-    }
-
-    public void setStatisticsLimitTime(String statisticsLimitTime_) {
-        int st = 60;
-        if(statisticsLimitTime_ != null){
-            st = Integer.parseInt(statisticsLimitTime_);
-        }
-        setStatisticsLimitTime(st);
-    }
-
-    /**
-     * @return the statisticsType_
-     */
-    public String getStatisticsType() {
-        return statisticsType_;
-    }
-
-    /**
-     * @param statisticsType_ the statisticsType_ to set
-     */
-    public void setStatisticsType(String statisticsType_) {
-        if (statisticsType_ != null)
-            this.statisticsType_ = statisticsType_;
-        else
-            this.statisticsType_ = "aggregated";
-    }
-    
-    /**
-     * @return the programStatisticsEnabled_
-     */
-    public String getProgramStatisticsEnabled() {
-        return programStatisticsEnabled_;
-    }
-
-    /**
-     * @param programStatisticsEnabled_ the programStatisticsEnabled_ to set
-     */
-    public void setProgramStatisticsEnabled(String programStatisticsEnabled_) {
-        if (programStatisticsEnabled_ != null)
-            this.programStatisticsEnabled_ = programStatisticsEnabled_;
-        else
-            this.programStatisticsEnabled_ = "true";
-    }
-    
-    /**
-     * @return the statisticsSqlPlanEnabled_
-     */
-    public String getStatisticsSqlPlanEnabled() {
-        return statisticsSqlPlanEnabled_;
-    }
-
-    /**
-     * @param statisticsSqlPlanEnabled_ the statisticsSqlPlanEnabled_ to set
-     */
-    public void setStatisticsSqlPlanEnabled(String statisticsSqlPlanEnabled_) {
-        if (statisticsSqlPlanEnabled_ != null)
-            this.statisticsSqlPlanEnabled_ = statisticsSqlPlanEnabled_;
-        else
-            this.statisticsSqlPlanEnabled_ = "true";
-    }
-    
-    //=========================================================
-    /**
-     * @param logWriter_ the logWriter_ to set
-     */
-    /**
-     * Sets the log writer for this <code>SQLMXConnectionPoolDataSource</code>
-     * object to the given <code>java.io.PrintWriter</code> object.
-     *
-     * <p>
-     * The log writer is a character output stream to which all logging and
-     * tracing messages for this <code>SQLMXConnectionPoolDataSource</code>
-     * object are printed. This includes messages printed by the methods of this
-     * object, messages printed by methods of other objects manufactured by this
-     * object, and so on. Messages printed to a data source-specific log writer
-     * are not printed to the log writer associated with the
-     * <code>java.sql.DriverManager</code> class. When a data source object is
-     * created, the log writer is initially null; in other words, the default is
-     * for logging to be disabled.
-     *
-     * @param out
-     *            the new log writer; <code>null</code> to disable logging
-     * @exception SQLException
-     *                if a database access error occurs
-     * @see #getLogWriter
-     */
-    public void setLogWriter(PrintWriter logWriter_)  {
-        this.logWriter_ = logWriter_;
-    }
-
-    /**
-     * @return the logWriter_
-     */
-    public PrintWriter getLogWriter() {
-        return this.logWriter_;
-    }
-
-    /**
-     * @return the inprops_
-     */
-    public Properties getInprops() {
-        return inprops_;
-    }
-
-    /**
-     * @param inprops_ the inprops_ to set
-     */
-    public void setInprops(Properties inprops_) {
-        this.inprops_ = inprops_;
-    }
-
-    public T2Properties() {
-        initialize(null);
-    }
-
-    public T2Properties(Properties props) {
-
-        initialize(props);
-    }
-
-
-    void initialize(Properties props) {
-        inprops_ = props;
-        setProperties();
-    }
-
-    public static String getPropertyValue(java.util.Properties prop_list,
-            String prop_name) {
-
-        String prop_value = prop_list.getProperty("t2jdbc." + prop_name);
-        if (prop_value == null) {
-            // Try the non-prolog case for compatibility
-            prop_value = prop_list.getProperty(prop_name);
-        }
-
-        return (prop_value);
-    }
-    private String getProperty(String token) {
-        String ret = null;
-
-        // check input props first
-        if (inprops_ != null) {
-        // ret = inprops_.getProperty(token);
-        // getProperty returns null for int datatypes used in props.put("propname",int),hence changed getProperty to get
-        ret = (String) inprops_.get(token);
-        }
-        // props file next
-		if (ret == null && defaults_ != null) {
-			ret = defaults_.getProperty(token);
-		}
-        // system properties with the t4sqlmx prefix
-        if (ret == null) {
-            ret = System.getProperty(propPrefix_ + token);
-        }
-        if(ret == null){
-            ret = System.getProperty(token);
-        }
-
-        return ret;
-    }
-    private void setProperties() {
-        // TODO Auto-generated method stub
-
-	defaults_ = null;
-	String propsFile = getProperty("properties");
-	if (propsFile != null) {
-	    propsFile = propsFile.trim();
-	    if (propsFile.length() != 0) {
-		FileInputStream fis = null;
-		try {
-		    fis = new FileInputStream(new File(propsFile));
-		    defaults_ = new Properties();
-		    defaults_.load(fis);
-		} catch (Exception ex) {
-		    fis = null;
-		} finally {
-		    try {
-			if (fis != null) {
-			    fis.close();
-			}
-		    }catch (IOException ioe) {
-			// ignore
-		    }
-		}
-	    }
-	}
-        setCatalog(getProperty("catalog"));
-        setSchema(getProperty("schema"));
-        setBatchBinding(getProperty("batchBinding"));
-        setLanguage(getProperty("language"));
-        setMploc(getProperty("mploc"));
-        setSqlmx_nowait(getProperty("sql_nowait"));
-        setSpjrs(getProperty("Spjrs"));
-        setStmtatomicity(getProperty("stmtatomicity"));
-//		setStmtatomicityval(getProperty(""));
-        setTransactionMode(getProperty("transactionMode"));
-        setIso88591EncodingOverride(getProperty("ISO88591"));
-        setContBatchOnError(getProperty("contBatchOnError"));
-
-        setMaxIdleTime(getProperty("maxIdleTime"));
-        setMaxPoolSize(getProperty("maxPoolSize"));
-        setMaxStatements(getProperty("maxStatements"));
-        setMinPoolSize(getProperty("minPoolSize"));
-        setInitialPoolSize(getProperty("initialPoolSize"));
-
-        setBlobTableName(getProperty("blobTableName"));
-        setClobTableName(getProperty("clobTableName"));
-
-        setEnableMFC(getProperty("enableMFC"));
-        setCompiledModuleLocation(getProperty("compiledModuleLocation"));
-
-
-//		setContBatchOnErrorval(getProperty(""));
-
-//		setEnableLog(getProperty("enableLog"));
-        setTraceFlag(getProperty("traceFlag"));
-        setTraceFile(getProperty("traceFile"));
-
-        setExternalCallHandler(getProperty("externalCallHandler"));
-        setExternalCallPrefix(getProperty("externalCallPrefix"));
-
-        setQueryExecuteTime(getProperty("queryExecuteTime"));
-        setT2QueryExecuteLogFile(getProperty("T2QueryExecuteLogFile"));
-        setEnableLog(getProperty("enableLog"));
-        setIdMapFile(getProperty("idMapFile"));
-        
-        setStatisticsIntervalTime(getProperty("statisticsIntervalTime"));
-        setStatisticsLimitTime(getProperty("statisticsLimitTime"));
-        setStatisticsType(getProperty("statisticsType"));
-        setProgramStatisticsEnabled(getProperty("programStatisticsEnabled"));
-        setStatisticsSqlPlanEnabled(getProperty("statisticsSqlPlanEnabled"));
-        
-    }
-    public Properties getProperties(){
-        Properties props = new Properties();
-
-        if (getCatalog() != null)
-            props.setProperty("catalog", catalog_);
-        if (getSchema() != null)
-            props.setProperty("schema", schema_);
-
-        props.setProperty("batchBinding", String.valueOf(batchBindingSize_));
-        if (getMploc() != null)
-            props.setProperty("mploc", mploc_);
-
-        props.setProperty("sql_nowait", String.valueOf(sql_nowait));
-        if (getSpjrs() != null)
-            props.setProperty("Spjrs", Spjrs_);
-
-        if (getStmtatomicity() != null)
-            props.setProperty("stmtatomicity", stmtatomicity_);
-        // props.setProperty("",);
-        props.setProperty("transactionMode", String.valueOf(transactionMode_));
-        if (getIso88591EncodingOverride() != null)
-            props.setProperty("ISO88591", iso88591EncodingOverride_);
-        if (getContBatchOnError() != null)
-            props.setProperty("contBatchOnError", contBatchOnError_);
-
-        props.setProperty("maxIdleTime", String.valueOf(maxIdleTime_));
-        props.setProperty("maxPoolSize", String.valueOf(maxPoolSize_));
-        props.setProperty("maxStatements", String.valueOf(maxStatements_));
-        props.setProperty("minPoolSize", String.valueOf(minPoolSize_));
-        props.setProperty("initialPoolSize", String.valueOf(initialPoolSize_));
-
-        if (getBlobTableName() != null)
-            props.setProperty("blobTableName", blobTableName_);
-        if (getClobTableName() != null)
-            props.setProperty("clobTableName", clobTableName_);
-        if (getEnableMFC() != null)
-            props.setProperty("enableMFC", enableMFC_);
-        if (getCompiledModuleLocation() != null)
-            props.setProperty("compiledModuleLocation", compiledModuleLocation_);
-
-        // props.setProperty("",);
-        // props.setProperty("enableLog",);
-
-        props.setProperty("traceFlag", String.valueOf(traceFlag_));
-
-        if(getTraceFile() !=null)
-            props.setProperty("traceFile",traceFile_);
-
-        if (getExternalCallHandler() != null)
-            props.setProperty("externalCallHandler", externalCallHandler);
-        if (getExternalCallPrefix() != null)
-            props.setProperty("externalCallPrefix", externalCallPrefix);
-
-        props.setProperty("queryExecuteTime", Long.toString(queryExecuteTime_));
-        if (T2QueryExecuteLogFile_ != null)
-            props.setProperty("T2QueryExecuteLogFile", T2QueryExecuteLogFile_);
-        if (enableLog_ != null)
-            props.setProperty("enableLog", enableLog_);
-        if (idMapFile != null)
-            props.setProperty("idMapFile", idMapFile);
-
-        props.setProperty("statisticsIntervalTime", Integer.toString(statisticsIntervalTime_));
-        props.setProperty("statisticsLimitTime", Integer.toString(statisticsLimitTime_));
-        props.setProperty("statisticsType", statisticsType_);
-        props.setProperty("programStatisticsEnabled", programStatisticsEnabled_);
-        props.setProperty("statisticsSqlPlanEnabled", statisticsSqlPlanEnabled_);
-        
-        return props;
-    }
-    public java.sql.DriverPropertyInfo[] getPropertyInfo(String url,
-            java.util.Properties info) {
-        java.sql.DriverPropertyInfo[] propertyInfo = new java.sql.DriverPropertyInfo[15];
-        int i = 0;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("catalog",
-                catalog_);
-        propertyInfo[i].description = "The default catalog used to access SQL objects referenced in SQL statements if the SQL objects are not fully qualified.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("schema",
-                schema_);
-        propertyInfo[i].description = "The default schema used to access SQL objects referenced in SQL statements if the SQL objects are not fully qualified.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "batchBinding", Integer.toString(batchBindingSize_));
-        propertyInfo[i].description = "Specifies that statements are batched together in the executeBatch() operation.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("mploc",
-                mploc_);
-        propertyInfo[i].description = "Specifies the Guardian location in which SQL tables are created.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "maxPoolSize", Integer.toString(maxPoolSize_));
-        propertyInfo[i].description = "Sets the maximum number of physical connections that the pool can contain.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "minPoolSize", Integer.toString(minPoolSize_));
-        propertyInfo[i].description = "Limits the number of physical connections that can be in the free connection pool";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "maxStatements", Integer.toString(maxStatements_));
-        propertyInfo[i].description = "Sets the total number of PreparedStatement objects that the connection pool should cache.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "initialPoolSize", Integer.toString(initialPoolSize_));
-        propertyInfo[i].description = "Sets the number of physical connections that must exist when the pool is created.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "maxIdleTime", Integer.toString(maxIdleTime_));
-        propertyInfo[i].description = "Sets the number of seconds a physical connection should remain unused in the pool before the connection is closed.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("traceFlag",
-                Integer.toString(traceFlag_));
-        propertyInfo[i].description = "Sets the tracing level for application servers that use the traceFile property.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("traceFile",
-                traceFile_);
-        propertyInfo[i].description = "Specifies the trace file or directory.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "clobTableName", clobTableName_);
-        propertyInfo[i].description = "Specifies the LOB table for using CLOB columns.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "blobTableName", blobTableName_);
-        propertyInfo[i].description = "Specifies the LOB table for using BLOB columns.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "transactionMode", SQLMXConnection
-                        .mapTxnModeToString(transactionMode_));
-        propertyInfo[i].description = "Specifies the transaction mode for the connection.";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("ISO88591",
-                iso88591EncodingOverride_);
-        propertyInfo[i].description = "Specifies the charset encoding override for ISO88591 columns.";
-        propertyInfo[i++].choices = null;
-//
-//		propertyInfo[i] = new java.sql.DriverPropertyInfo("language",
-//				locale_.getLanguage());
-        propertyInfo[i].description = "Specifies the language for the connection.";
-        propertyInfo[i++].choices = Locale.getISOLanguages();
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "stmtatomicity", stmtatomicity_);
-        propertyInfo[i].description = "Providing atomicity at statement level";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "contBatchOnError", contBatchOnError_);
-        propertyInfo[i].description = "Specifies whether batch execution continues on errors";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "enableLog", enableLog_);
-        propertyInfo[i].description = "Enables logging of SQL statement IDs and the corresponding JDBC SQL statements.";
-        propertyInfo[i++].choices = null;
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "idMapFile", idMapFile);
-        propertyInfo[i].description = "Specifies the file to which the trace facility logs SQL statement IDs and the corresponding JDBC SQL statements.";
-        propertyInfo[i++].choices = null;
-        /*
-         * MFC: Module Caching Description: Type 2 driver now supports
-         * compiled module caching
-         */
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("enableMFC",
-                enableMFC_);
-        propertyInfo[i++].choices = null;
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("queryExecuteTime",Long.toString(queryExecuteTime_));
-        propertyInfo[i].description="Sets the queryExecuteTime";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo("T2QueryExecuteLogFile",	T2QueryExecuteLogFile_);
-        propertyInfo[i].description="set the Trace file to log sql queries which are taking more the queryExecuteTime";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i].description = "Sets module caching feature to on or off";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "compiledModuleLocation", compiledModuleLocation_);
-        propertyInfo[i].description = "Specifies the directory to cache the compiled modules";
-        propertyInfo[i++].choices = null;
-// Publishing
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "statisticsIntervalTime", Integer.toString(statisticsIntervalTime_));
-        propertyInfo[i].description = "Time in seconds on how often the aggregation data should be published. Default is 60";
-        propertyInfo[i++].choices = null;
-        
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "statisticsLimitTime", Integer.toString(statisticsLimitTime_));
-        propertyInfo[i].description = "Time in seconds for how long the query has been executing before publishing. Default is 60";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "statisticsType", statisticsType_);
-        propertyInfo[i].description = "Type of statistics to be published. Default is 'aggregated'";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "programStatisticsEnabled", programStatisticsEnabled_);
-        propertyInfo[i].description = "If statistics publication is enabled. Default is 'true'";
-        propertyInfo[i++].choices = null;
-
-        propertyInfo[i] = new java.sql.DriverPropertyInfo(
-                "statisticsSqlPlanEnabled", statisticsSqlPlanEnabled_);
-        propertyInfo[i].description = "If statistics sql plan is enabled. Default is 'true'";
-        propertyInfo[i++].choices = null;
-
-        for (i = 0; i < propertyInfo.length; i++) {
-            propertyInfo[i].required = false;
-        }
-
-        return propertyInfo;
-    }
-    /**
-     * @return Reference object containing all the connection properties.
-     *         The reference object can be used to register with naming
-     *         services.
-     */
-    Reference addReferences(Reference ref) {
-
-        ref.add(new StringRefAddr("dataSourceName", getDataSourceName()));
-        ref.add(new StringRefAddr("description", getDescription()));
-        ref.add(new StringRefAddr("catalog", getCatalog()));
-        ref.add(new StringRefAddr("schema", getSchema()));
-        ref.add(new StringRefAddr("language", getLanguage()));
-        ref.add(new StringRefAddr("mploc", getMploc()));
-        /* Description: Adding the reference to ISO88591 encoding */
-        ref.add(new StringRefAddr("ISO88591", getIso88591EncodingOverride()));
-        ref.add(new StringRefAddr("batchBinding", Integer
-                .toString(getBatchBinding())));
-        ref.add(new StringRefAddr("maxStatements", Integer
-                .toString(getMaxStatements())));
-        ref.add(new StringRefAddr("initialPoolSize", Integer
-                .toString(getInitialPoolSize())));
-        ref.add(new StringRefAddr("minPoolSize", Integer
-                .toString(getMinPoolSize())));
-        ref.add(new StringRefAddr("maxPoolSize", Integer
-                .toString(getMaxPoolSize())));
-        ref.add(new StringRefAddr("maxIdleTime", Integer
-                .toString(getMaxIdleTime())));
-//		ref.add(new StringRefAddr("propertyCycle", Integer
-//				.toString(propertyCycle_)));
-        ref.add(new StringRefAddr("clobTableName", getClobTableName()));
-        ref.add(new StringRefAddr("blobTableName", getBlobTableName()));
-        ref.add(new StringRefAddr("transactionMode",getTransactionMode()));
-        ref.add(new StringRefAddr("contBatchOnError",getContBatchOnError()));
-        //Renamed the modulecaching property as enableMFC
-        ref.add(new StringRefAddr("enableMFC", getEnableMFC()));
-        ref.add(new StringRefAddr("compiledModuleLocation",	getCompiledModuleLocation()));
-        ref.add(new StringRefAddr("queryExecuteTime",Long.toString(queryExecuteTime_)));
-        ref.add(new StringRefAddr("T2QueryExecuteLogFile",T2QueryExecuteLogFile_));
-
-        ref.add(new StringRefAddr("traceFile", traceFile_));
-        ref.add(new StringRefAddr("traceFlag",Integer.toString(traceFlag_)));
-
-        ref.add(new StringRefAddr("enableLog",enableLog_));
-        ref.add(new StringRefAddr("idMapFile",getIdMapFile()));
-
-        return ref;
-    }
-
-    T2Properties getT2Properties(){
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/51a83dc2/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/TBlob.java
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/TBlob.java b/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/TBlob.java
deleted file mode 100644
index 70078b7..0000000
--- a/core/conn/jdbc_type2/src/main/java/org/trafodion/jdbc/t2/TBlob.java
+++ /dev/null
@@ -1,146 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-/* -*-java-*-
- * Filename    : TBlob.java
- * Description :
- *
- * --------------------------------------------------------------------
- */
-package org.trafodion.jdbc.t2;
-
-import java.sql.*;
-import java.io.*;
-import java.util.Date;
-
-public class TBlob implements java.sql.Blob
-{
-	public InputStream getBinaryStream() throws SQLException
-	{
-		if (out_ != null)
-		    out_.println(getTraceId() + "getBinaryStream()");
-		return new TLobInputStream(blob_.getBinaryStream(), out_);
-	}
-
-	public byte[] getBytes(long pos, int length) throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "getBytes(" + pos + ", " + length +")");
-		return blob_.getBytes(pos, length);
-	}
-
-	public long length() throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "length()");
-		return blob_.length();
-	}
-
-	public long position(Blob pattern, long start) throws SQLException
-	{	
-		if (out_ != null)
-			out_.println(getTraceId() + "position(" + pattern + ", " + start + ")");
-		return blob_.position(pattern, start);
-	}
-
-	public long position(byte[] pattern,long start) throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "position(\"" + pattern + "\", " + start + ")");
-		return blob_.position(pattern, start);
-	}
-	
-	public OutputStream setBinaryStream(long pos) throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "setBinaryStream("+ pos + ")");
-		return new TLobOutputStream(blob_.setBinaryStream(pos), out_);
-	}
-
-	public int setBytes(long pos, byte[] bytes) throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "setBytes(" + pos + ", \"" + bytes + "\")");
-		return blob_.setBytes(pos, bytes);
-	}
-
-	public int setBytes(long pos, byte[] bytes, int offset, int len)
-              throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "setBytes(" + pos + ", \"" + bytes + "\", " + offset + ", "
-							+ len + ")");
-		return blob_.setBytes(pos, bytes, offset, len);
-	}
-
-	public void truncate(long len) throws SQLException
-	{
-		if (out_ != null)
-			out_.println(getTraceId() + "truncate("+ len + ")");
-		blob_.truncate(len);
-	}
-
-	// Constructors with access specifier as "default"
-    TBlob(Blob blob, PrintWriter out)
-    {
-        
-        
-        blob_ = blob;
-        out_ = out;
-        
-    }
-	public void setTraceId(String traceId_) {
-		this.traceId_ = traceId_;
-	}
-
-	public String getTraceId() {
-		
-		String className = null;
-		if (blob_ != null)
-            className = blob_.getClass().getName();
-
-        // Build up jdbcTrace output entry
-		setTraceId(org.trafodion.jdbc.t2.T2Driver.traceText 
-			+ org.trafodion.jdbc.t2.T2Driver.dateFormat.format(new Date()) 
-			+ "]:[" + Thread.currentThread() + "]:["
-			+ System.identityHashCode(blob_) +  "]:"
-			+ className.substring(org.trafodion.jdbc.t2.T2Driver.REMOVE_PKG_NAME,className.length()) 
-			+ ".");
-        
-		return traceId_;
-	}
-
-	//fields
-	Blob blob_;
-	PrintWriter out_;
-	private String traceId_;
-
-        public void free() throws SQLException {
-                // TODO Auto-generated method stub
-
-        }
-
-        public InputStream getBinaryStream(long pos, long length)
-                        throws SQLException {
-                // TODO Auto-generated method stub
-                return null;
-        }
-
-}


Mime
View raw message