Skip to content

Instantly share code, notes, and snippets.

@GrrrDog
Last active January 12, 2018 18:53
Show Gist options
  • Save GrrrDog/fef082956777d556f009e0d202197242 to your computer and use it in GitHub Desktop.
Save GrrrDog/fef082956777d556f009e0d202197242 to your computer and use it in GitHub Desktop.
private void readObject(ObjectInputStream paramObjectInputStream)
throws IOException, ClassNotFoundException, SQLException
{
paramObjectInputStream.defaultReadObject();
this.connectionProperty = ((Hashtable)paramObjectInputStream.readObject());
try
{
Properties localProperties = (Properties)this.connectionProperty.get("connection_properties");
String str1 = localProperties.getProperty("connection_url");
this.oracleDriver = new OracleDriver();
Connection localConnection = this.oracleDriver.connect(str1, localProperties);
initialize(localConnection);
this.eventListeners = ((Hashtable)this.connectionProperty.get("event_listener"));
this.sqlException = ((SQLException)this.connectionProperty.get("sql_exception"));
this.autoCommit = ((String)this.connectionProperty.get("pool_auto_commit")).equals("true");
this.closeCallback = ((OracleCloseCallback)this.connectionProperty.get("close_callback"));
this.privateData = this.connectionProperty.get("private_data");
Map localMap = (Map)this.connectionProperty.get("obj_type_map");
if (localMap != null) {
((OracleConnection)localConnection).setTypeMap(localMap);
}
String str2 = localProperties.getProperty("trans_isolation");
localConnection.setTransactionIsolation(Integer.parseInt(str2));
str2 = localProperties.getProperty("stmt_cache_size");
int i = Integer.parseInt(str2);
if (i != -1)
{
setStatementCacheSize(i);
str2 = localProperties.getProperty("implicit_cache_enabled");
if ((str2 != null) && (str2.equalsIgnoreCase("true"))) {
setImplicitCachingEnabled(true);
} else {
setImplicitCachingEnabled(false);
}
str2 = localProperties.getProperty("explict_cache_enabled");
if ((str2 != null) && (str2.equalsIgnoreCase("true"))) {
setExplicitCachingEnabled(true);
} else {
setExplicitCachingEnabled(false);
}
}
this.physicalConn.setAutoCommit(((String)localProperties.get("connect_auto_commit")).equals("true"));
}
catch (Exception localException) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment