Репозитории ALT
5.1: | 10.3.3.0-alt2_1jpp6 |
4.1: | 10.1.1.0-alt1_1jpp1.7 |
4.0: | 10.1.1.0-alt1_1jpp1.7 |
Группа :: Базы Данных
Пакет: derby
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: derby-10.1.1.0-JDBC30only-BrokeredConnection.patch
Скачать
Скачать
--- java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java.sav 2005-07-02 03:57:43.000000000 +0200
+++ java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java 2006-09-07 09:53:52.000000000 +0200
@@ -25,6 +25,7 @@
import java.sql.PreparedStatement;
import java.sql.CallableStatement;
import java.sql.DatabaseMetaData;
+import java.sql.Savepoint;
import java.sql.SQLException;
import java.sql.SQLWarning;
@@ -52,6 +53,7 @@
protected final BrokeredConnectionControl control;
private boolean isClosed;
+
/**
Maintain state as seen by this Connection handle, not the state
of the underlying Connection it is attached to.
@@ -145,6 +147,75 @@
}
}
+ public final Savepoint setSavepoint()
+ throws SQLException
+ {
+ try {
+ control.checkSavepoint();
+ return getRealConnection().setSavepoint();
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final Savepoint setSavepoint(String name)
+ throws SQLException
+ {
+ try {
+ control.checkSavepoint();
+ return getRealConnection().setSavepoint(name);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final void setHoldability(int holdability)
+ throws SQLException
+ {
+ try {
+ control.checkHoldCursors(holdability);
+ getRealConnection().setHoldability(holdability);
+ stateHoldability = holdability;
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final int getHoldability()
+ throws SQLException
+ {
+ try {
+ return getRealConnection().getHoldability();
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final void releaseSavepoint(Savepoint savepoint)
+ throws SQLException
+ {
+ try {
+ getRealConnection().releaseSavepoint(savepoint);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
public final void rollback() throws SQLException
{
try {
@@ -156,6 +227,20 @@
}
}
+ public final void rollback(Savepoint savepoint)
+ throws SQLException
+ {
+ try {
+ control.checkRollback();
+ getRealConnection().rollback(savepoint);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
public final void close() throws SQLException
{
if (isClosed)
@@ -301,6 +386,20 @@
}
}
+ public final Statement createStatement(int resultSetType,
+ int resultSetConcurrency,
+ int resultSetHoldability)
+ throws SQLException {
+ try {
+ control.checkHoldCursors(resultSetHoldability);
+ return control.wrapStatement(getRealConnection().createStatement(resultSetType, resultSetConcurrency, resultSetHoldability));
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
public final PreparedStatement prepareStatement(String sql, int resultSetType,
int resultSetConcurrency)
@@ -318,6 +417,69 @@
}
}
+ public final PreparedStatement prepareStatement(
+ String sql,
+ String[] columnNames)
+ throws SQLException
+ {
+ try {
+ return control.wrapStatement(getRealConnection().prepareStatement(sql, columnNames), sql, columnNames);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final PreparedStatement prepareStatement(
+ String sql,
+ int[] columnIndexes)
+ throws SQLException
+ {
+ try {
+ return control.wrapStatement(getRealConnection().prepareStatement(sql, columnIndexes), sql, columnIndexes);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final PreparedStatement prepareStatement(String sql,
+ int resultSetType,
+ int resultSetConcurrency,
+ int resultSetHoldability)
+
+ throws SQLException {
+ try {
+ control.checkHoldCursors(resultSetHoldability);
+ return control.wrapStatement(
+ getRealConnection().prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability), sql, null);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
+ public final PreparedStatement prepareStatement(
+ String sql,
+ int autoGeneratedKeys)
+ throws SQLException
+ {
+ try {
+ return control.wrapStatement(getRealConnection().prepareStatement(sql, autoGeneratedKeys), sql, new Integer(autoGeneratedKeys));
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
public final CallableStatement prepareCall(String sql, int resultSetType,
int resultSetConcurrency) throws SQLException
{
@@ -333,6 +495,23 @@
}
}
+ public final CallableStatement prepareCall(String sql,
+ int resultSetType,
+ int resultSetConcurrency,
+ int resultSetHoldability)
+ throws SQLException {
+ try {
+ control.checkHoldCursors(resultSetHoldability);
+ return control.wrapStatement(
+ getRealConnection().prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability), sql);
+ }
+ catch (SQLException se)
+ {
+ notifyException(se);
+ throw se;
+ }
+ }
+
public final java.util.Map getTypeMap() throws SQLException
{
try