You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/01/09 18:01:35 UTC
cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/platforms Platform.java PlatformDefaultImpl.java PlatformFactory.java PlatformInformixImpl.java PlatformOracleImpl.java PlatformSapdbImpl.java PlatformSybaseASAImpl.java PlatformSybaseImpl.java
arminw 2003/01/09 09:01:34
Modified: src/java/org/apache/ojb/broker/platforms Platform.java
PlatformDefaultImpl.java PlatformFactory.java
PlatformInformixImpl.java PlatformOracleImpl.java
PlatformSapdbImpl.java PlatformSybaseASAImpl.java
PlatformSybaseImpl.java
Log:
- move the whole sequence-manager
properties stuff from the OJB.properties to
the repository
- move the 'useAutoCommit' and
'ignoreAutocommitExceptions' properties from OJB.properties
to jdbc-connection-descriptor
- remove the 'maxConnectionsInPool'
property from OJB.properties
- rename DescriptorRepository#getExtentClass
to #getTopLevelClass, deprecate PB#getExtentClass
and add PB#getTopLevelClass
Revision Changes Path
1.11 +33 -51 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/Platform.java
Index: Platform.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/Platform.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Platform.java 5 Jan 2003 10:34:28 -0000 1.10
+++ Platform.java 9 Jan 2003 17:01:33 -0000 1.11
@@ -54,9 +54,13 @@
* <http://www.apache.org/>.
*/
-import org.apache.ojb.broker.util.configuration.Configurable;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
/**
* this interface provides callbacks that allow to perform
@@ -67,12 +71,8 @@
* @version $Id$
* @author Thomas Mahler
*/
-public interface Platform extends Configurable
+public interface Platform
{
- public static final int AUTO_COMMIT_IGNORE_STATE = 0;
- public static final int AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE = 1;
- public static final int AUTO_COMMIT_SET_FALSE = 2;
-
/**
* Called after a jdbc-connection statement was created.
*/
@@ -91,59 +91,41 @@
public void afterStatementClose(Statement stmt, ResultSet rs) throws PlatformException;
/**
- * callback called immediately after a JDBC Connection has been obtained
- * in ...
- * @param conn the Connection to be initialized
- */
- public void initializeJdbcConnection(Connection conn) throws PlatformException;
-
- /**
- * some JdbcDrivers do not support the setting of the autocommit flag
- * properly.
- * This method can be used to tell OJB to ignore exceptions related to
- * this problem.
- * @return boolean if true OJB ignores Autocommit exceptions
- */
- public boolean ignoreAutocommitExceptions();
-
- /**
- * Flag indicates how to use the autoCommit feature of connections.
- *
- * @return
- * 0 - ignore the autoCommit setting of the connection
- * 1 - set autoCommit explicit true, but allow temporary set to false
- * 2 - set autoCommit explicit false
+ * callback called immediately after a JDBC Connection has been obtained
+ * in ...
+ * @param conn the Connection to be initialized
*/
- public int useAutoCommit();
+ public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException;
/**
* Used to do a temporary change of the connection autoCommit state.
* When using this method ensure to reset the original state before
* connection was returned to pool or closed.
- * Only when {@link #useAutoCommit()} was set to
+ * Only when
+ * {@link org.apache.ojb.broker.metadata.JdbcConnectionDescriptor#getUseAutoCommit()} was set to
* {@link #AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE}
* the change of the autoCommit state take effect.
*/
- public void changeAutoCommitState(Connection con, boolean newState);
+ public void changeAutoCommitState(JdbcConnectionDescriptor jcd, Connection con, boolean newState);
- /**
- * some JDBC-Drivers do not support all sqlTypes
- * this callback is used set parameters to a PreparedStatement
- */
- public void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType)
- throws SQLException;
-
- /**
- * some JDBC-Drivers do not support all sqlTypes
- * this callback is used set parameters to a PreparedStatement
- */
- public void setNullForStatement(PreparedStatement ps, int index, int sqlType)
- throws SQLException;
-
- /**
- * Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface
- */
- public byte getJoinSyntaxType();
+ /**
+ * some JDBC-Drivers do not support all sqlTypes
+ * this callback is used set parameters to a PreparedStatement
+ */
+ public void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType)
+ throws SQLException;
+
+ /**
+ * some JDBC-Drivers do not support all sqlTypes
+ * this callback is used set parameters to a PreparedStatement
+ */
+ public void setNullForStatement(PreparedStatement ps, int index, int sqlType)
+ throws SQLException;
+
+ /**
+ * Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface
+ */
+ public byte getJoinSyntaxType();
/**
* Override default ResultSet size determination (rs.last();rs.getRow())
1.12 +48 -44 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java
Index: PlatformDefaultImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PlatformDefaultImpl.java 5 Jan 2003 10:34:28 -0000 1.11
+++ PlatformDefaultImpl.java 9 Jan 2003 17:01:33 -0000 1.12
@@ -54,15 +54,20 @@
* <http://www.apache.org/>.
*/
+import org.apache.ojb.broker.PersistenceBrokerException;
import org.apache.ojb.broker.accesslayer.JoinSyntaxTypes;
-import org.apache.ojb.broker.util.configuration.Configuration;
-import org.apache.ojb.broker.util.configuration.ConfigurationException;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
import org.apache.ojb.broker.util.logging.Logger;
import org.apache.ojb.broker.util.logging.LoggerFactory;
-import org.apache.ojb.broker.PersistenceBrokerException;
import java.io.StringReader;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
/**
* This class is a concrete implementation of <code>Platform</code>. Provides default implementations for all
@@ -75,17 +80,8 @@
{
private Logger log = LoggerFactory.getLogger(PlatformDefaultImpl.class);
- private boolean ignoreAutocommitExceptions;
private boolean m_batchUpdatesChecked = false;
private boolean m_supportsBatchUpdates = false;
- private int useAutoCommit;
-
- public void configure(Configuration config) throws ConfigurationException
- {
- PlatformConfiguration myConfig = (PlatformConfiguration) config;
- ignoreAutocommitExceptions = myConfig.ignoreAutocommitExceptions();
- useAutoCommit = myConfig.useAutoCommit();
- }
public boolean supportsBatchOperations()
{
@@ -104,7 +100,7 @@
}
catch (SQLException e)
{
- log.error("batch support check failed",e);
+ log.error("batch support check failed", e);
m_supportsBatchUpdates = false;
}
finally
@@ -142,53 +138,61 @@
/**
* @see Platform#initializeJdbcConnection
*/
- public void initializeJdbcConnection(Connection conn) throws PlatformException
+ public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException
{
checkForBatchSupport(conn);
- switch (useAutoCommit)
+ switch (jcd.getUseAutoCommit())
{
- case Platform.AUTO_COMMIT_IGNORE_STATE:
+ case JdbcConnectionDescriptor.AUTO_COMMIT_IGNORE_STATE:
// nothing to do
break;
- case Platform.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE:
+ case JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE:
try
{
if (!conn.getAutoCommit()) conn.setAutoCommit(true);
}
catch (SQLException e)
{
- log.info("Connection initializing: setAutoCommit jdbc-driver problems. " + e.getMessage());
- if (!ignoreAutocommitExceptions)
+ if (!jcd.isIgnoreAutoCommitExceptions())
{
throw new PlatformException("Connection initializing: setAutoCommit(true) failed", e);
}
+ else
+ {
+ log.info(
+ "Connection initializing: setAutoCommit jdbc-driver problems. " + e.getMessage());
+ }
}
break;
- case Platform.AUTO_COMMIT_SET_FALSE:
+ case JdbcConnectionDescriptor.AUTO_COMMIT_SET_FALSE:
try
{
if (conn.getAutoCommit()) conn.setAutoCommit(false);
}
catch (SQLException e)
{
- log.info("Connection initializing: setAutoCommit jdbc-driver problems. " + e.getMessage());
- if (!ignoreAutocommitExceptions)
+ if (!jcd.isIgnoreAutoCommitExceptions())
{
throw new PlatformException("Connection initializing: setAutoCommit(false) failed", e);
}
+ else
+ {
+ log.info(
+ "Connection initializing: setAutoCommit jdbc-driver problems. " + e.getMessage());
+ }
}
break;
}
}
- public void changeAutoCommitState(Connection con, boolean newState)
+ public void changeAutoCommitState(JdbcConnectionDescriptor jcd, Connection con, boolean newState)
{
if (con == null)
{
log.error("Given connection was null, cannot prepare autoCommit state");
return;
}
- if(Platform.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE == useAutoCommit)
+ if (JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE == jcd.getUseAutoCommit())
{
try
{
@@ -196,13 +200,13 @@
}
catch (SQLException e)
{
- if(ignoreAutocommitExceptions)
+ if (jcd.isIgnoreAutoCommitExceptions())
{
- log.warn("Set autoCommit("+newState+") failed: "+e.getMessage());
+ log.info("Set autoCommit(" + newState + ") failed: " + e.getMessage());
}
else
{
- log.error("Set autoCommit("+newState+") failed", e);
+ log.error("Set autoCommit(" + newState + ") failed", e);
throw new PersistenceBrokerException("Set autoCommit(false) failed", e);
}
}
@@ -234,21 +238,21 @@
ps.setNull(index, sqlType);
}
- /*
- * @see Platform#ignoreAutocommitExceptions()
- */
- public boolean ignoreAutocommitExceptions()
- {
- return ignoreAutocommitExceptions;
- }
-
- /*
- * @see Platform#useAutoCommit()
- */
- public int useAutoCommit()
- {
- return useAutoCommit;
- }
+// /*
+// * @see Platform#ignoreAutocommitExceptions()
+// */
+// public boolean ignoreAutocommitExceptions()
+// {
+// return ignoreAutocommitExceptions;
+// }
+//
+// /*
+// * @see Platform#useAutoCommit()
+// */
+// public int useAutoCommit()
+// {
+// return useAutoCommit;
+// }
/**
* Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface
@@ -266,7 +270,7 @@
*/
public boolean useCountForResultsetSize()
{
- return false;
+ return false;
}
/**
1.3 +11 -19 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformFactory.java
Index: PlatformFactory.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PlatformFactory.java 17 Jun 2002 19:34:11 -0000 1.2
+++ PlatformFactory.java 9 Jan 2003 17:01:33 -0000 1.3
@@ -54,12 +54,10 @@
* <http://www.apache.org/>.
*/
-import java.util.HashMap;
-
import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
import org.apache.ojb.broker.util.logging.LoggerFactory;
-import org.apache.ojb.broker.util.configuration.impl.OjbConfigurator;
-import org.apache.ojb.broker.util.configuration.ConfigurationException;
+
+import java.util.HashMap;
/**
* this factory class is responsible to create Platform objects that
@@ -73,10 +71,10 @@
/**
* returns the Platform matching to the JdbcConnectionDescriptor jcd.
- * The method jcd.getDbms(...) is used to determine the Name of the
- * platform.
+ * The method jcd.getDbms(...) is used to determine the Name of the
+ * platform.
* BRJ : cache platforms
- * @param jcd the JdbcConnectionDescriptor defining the platform
+ * @param jcd the JdbcConnectionDescriptor defining the platform
*/
public static Platform getPlatformFor(JdbcConnectionDescriptor jcd)
{
@@ -96,21 +94,14 @@
}
catch (Throwable t)
{
- LoggerFactory.getDefaultLogger().info(
- "problems with platform " + platformName + ": " + t.getMessage());
- LoggerFactory.getDefaultLogger().info("OJB will use PlatformDefaultImpl instead");
+ LoggerFactory.getDefaultLogger().warn(
+ "[PlatformFactory] problems with platform " + platformName + ": " + t.getMessage());
+ LoggerFactory.getDefaultLogger().warn(
+ "[PlatformFactory] OJB will use PlatformDefaultImpl instead");
result = new PlatformDefaultImpl();
}
- try
- {
- OjbConfigurator.getInstance().configure(result);
- }
- catch (ConfigurationException ce)
- {
- LoggerFactory.getDefaultLogger().warn("Error during platform configuration");
- }
- getPlatforms().put(dbms, result); // cache the Platform
+ getPlatforms().put(dbms, result); // cache the Platform
}
return result;
}
@@ -129,6 +120,7 @@
}
return "org.apache.ojb.broker.platforms.Platform" + pf.substring(0, 1).toUpperCase() + pf.substring(1) + "Impl";
}
+
/**
* Gets the platforms.
* @return Returns a HashMap
1.6 +4 -2 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformInformixImpl.java
Index: PlatformInformixImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformInformixImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PlatformInformixImpl.java 21 Aug 2002 14:01:16 -0000 1.5
+++ PlatformInformixImpl.java 9 Jan 2003 17:01:33 -0000 1.6
@@ -54,6 +54,8 @@
* <http://www.apache.org/>.
*/
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
+
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
@@ -70,9 +72,9 @@
/**
* @see Platform#initializeJdbcConnection
*/
- public void initializeJdbcConnection(Connection conn) throws PlatformException
+ public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException
{
- super.initializeJdbcConnection(conn);
+ super.initializeJdbcConnection(jcd, conn);
try
{
Statement stmt = conn.createStatement();
1.10 +38 -46 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformOracleImpl.java
Index: PlatformOracleImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformOracleImpl.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- PlatformOracleImpl.java 26 Oct 2002 04:03:39 -0000 1.9
+++ PlatformOracleImpl.java 9 Jan 2003 17:01:33 -0000 1.10
@@ -58,7 +58,6 @@
import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
@@ -73,16 +72,8 @@
* @version $Id$
*/
-public class PlatformOracleImpl extends PlatformDefaultImpl {
-
- /**
- * Initializes the ESCAPE_PROCESSING member in StatementsForClass.
- * @see Platform#initializeJdbcConnection(Connection)
- */
- public void initializeJdbcConnection(Connection conn) throws PlatformException
- {
- super.initializeJdbcConnection(conn);
- }
+public class PlatformOracleImpl extends PlatformDefaultImpl
+{
/**
* In Oracle we set escape processing explizit 'true' after a
@@ -110,53 +101,54 @@
*
* @see Platform#setObjectForStatement
*/
- public void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType) throws SQLException
- {
- if (((sqlType == Types.VARBINARY) || (sqlType == Types.LONGVARBINARY) ||
- (sqlType == Types.BLOB)) && (value instanceof byte[]))
- {
- byte buf[] = (byte[])value;
- ByteArrayInputStream inputStream = new ByteArrayInputStream(buf);
- changePreparedStatementResultSetType(ps);
- ps.setBinaryStream(index, inputStream, buf.length);
- }
- else if (value instanceof Double)
- {
- // workaround for the bug in Oracle thin driver
- ps.setDouble(index, ((Double) value).doubleValue());
- }
- else if (sqlType == Types.BIGINT && value instanceof Integer)
- {
- // workaround: Oracle thin driver problem when expecting long
- ps.setLong(index, ((Integer)value).intValue());
- }
- else
- {
- super.setObjectForStatement(ps, index, value, sqlType);
- }
+ public void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType) throws SQLException
+ {
+ if (((sqlType == Types.VARBINARY) || (sqlType == Types.LONGVARBINARY) ||
+ (sqlType == Types.BLOB)) && (value instanceof byte[]))
+ {
+ byte buf[] = (byte[]) value;
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(buf);
+ changePreparedStatementResultSetType(ps);
+ ps.setBinaryStream(index, inputStream, buf.length);
+ }
+ else if (value instanceof Double)
+ {
+ // workaround for the bug in Oracle thin driver
+ ps.setDouble(index, ((Double) value).doubleValue());
+ }
+ else if (sqlType == Types.BIGINT && value instanceof Integer)
+ {
+ // workaround: Oracle thin driver problem when expecting long
+ ps.setLong(index, ((Integer) value).intValue());
+ }
+ else
+ {
+ super.setObjectForStatement(ps, index, value, sqlType);
+ }
}
- /**
+ /**
* Attempts to modify a private member in the Oracle thin driver's resultset
* to allow proper setting of large binary streams.
- */
+ */
private void changePreparedStatementResultSetType(PreparedStatement ps)
{
try
{
final Field f = ps.getClass().getSuperclass().getDeclaredField("m_userRsetType");
AccessController.doPrivileged(
- new PrivilegedAction()
- {
- public Object run()
+ new PrivilegedAction()
{
- f.setAccessible(true);
- return null;
- }
- });
+ public Object run()
+ {
+ f.setAccessible(true);
+ return null;
+ }
+ });
f.setInt(ps, 1);
f.setAccessible(false);
- } catch (Exception e)
+ }
+ catch (Exception e)
{
e.printStackTrace();
}
1.7 +8 -16 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSapdbImpl.java
Index: PlatformSapdbImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSapdbImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PlatformSapdbImpl.java 5 Jan 2003 10:34:28 -0000 1.6
+++ PlatformSapdbImpl.java 9 Jan 2003 17:01:34 -0000 1.7
@@ -54,9 +54,6 @@
* <http://www.apache.org/>.
*/
-import org.apache.ojb.broker.util.configuration.Configuration;
-import org.apache.ojb.broker.util.configuration.ConfigurationException;
-
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
@@ -70,14 +67,14 @@
public class PlatformSapdbImpl extends PlatformDefaultImpl
{
public void setObjectForStatement(
- PreparedStatement ps,
- int index,
- Object value,
- int sqlType)
- throws SQLException
+ PreparedStatement ps,
+ int index,
+ Object value,
+ int sqlType)
+ throws SQLException
{
if (((sqlType == Types.VARBINARY) || (sqlType == Types.LONGVARBINARY))
- && (value instanceof byte[]))
+ && (value instanceof byte[]))
{
byte buf[] = (byte[]) value;
ps.setBytes(index, buf);
@@ -95,7 +92,7 @@
return ORACLE_JOIN_SYNTAX;
}
- /**
+ /**
* Override default ResultSet size determination (rs.last();rs.getRow())
* with select count(*) operation
* SAP db doesn't let you use the .last, .getRow() mechanism (.getRow() will return -1)
@@ -103,11 +100,6 @@
public boolean useCountForResultsetSize()
{
return true;
- }
-
- public void configure(Configuration config) throws ConfigurationException
- {
- super.configure(config);
}
public String createSequenceQuery(String sequenceName)
1.3 +13 -8 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseASAImpl.java
Index: PlatformSybaseASAImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseASAImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PlatformSybaseASAImpl.java 20 Nov 2002 18:26:35 -0000 1.2
+++ PlatformSybaseASAImpl.java 9 Jan 2003 17:01:34 -0000 1.3
@@ -54,7 +54,11 @@
* <http://www.apache.org/>.
*/
-import java.sql.*;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
/**
* This class is a concrete implementation of <code>Platform</code>.
@@ -64,13 +68,14 @@
*
* This class extends <code>PlatformDefaultImpl</code> and defines specific
* behavior for the Sybase ASA platform.
- *
+ *
* NOTE: Different than the Sybase ASE platform
*
* @author <a href="mailto:mattbaird@yahoo.com">Matthew Baird<a>
* @version $Id$
*/
-public class PlatformSybaseASAImpl extends PlatformDefaultImpl {
+public class PlatformSybaseASAImpl extends PlatformDefaultImpl
+{
/**
* Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface
@@ -90,11 +95,11 @@
*
* @author Lorenzo Nicora
*/
- public void initializeJdbcConnection(Connection conn) throws PlatformException
+ public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException
{
- // Do origial init
- super.initializeJdbcConnection(conn);
- // Execute a statement setting the tempory option
+ // Do origial init
+ super.initializeJdbcConnection(jcd, conn);
+ // Execute a statement setting the tempory option
try
{
Statement stmt = conn.createStatement();
1.4 +11 -6 jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseImpl.java
Index: PlatformSybaseImpl.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PlatformSybaseImpl.java 25 Jul 2002 19:22:54 -0000 1.3
+++ PlatformSybaseImpl.java 9 Jan 2003 17:01:34 -0000 1.4
@@ -54,7 +54,11 @@
* <http://www.apache.org/>.
*/
-import java.sql.*;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
/**
* This class is a concrete implementation of <code>Platform</code>.
@@ -65,7 +69,8 @@
*@author Oleg Nitz
*@version 1.0
*/
-public class PlatformSybaseImpl extends PlatformDefaultImpl {
+public class PlatformSybaseImpl extends PlatformDefaultImpl
+{
/**
* Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface
@@ -85,11 +90,11 @@
*
* @author Lorenzo Nicora
*/
- public void initializeJdbcConnection(Connection conn) throws PlatformException
+ public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException
{
- // Do origial init
- super.initializeJdbcConnection(conn);
- // Execute a statement setting the tempory option
+ // Do origial init
+ super.initializeJdbcConnection(jcd, conn);
+ // Execute a statement setting the tempory option
try
{
Statement stmt = conn.createStatement();