|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.iapi.services.context.ContextImpl
org.apache.derby.impl.jdbc.EmbedConnectionContext
class EmbedConnectionContext
| Field Summary | |
|---|---|
private java.lang.ref.SoftReference |
connRef
We hold a soft reference to the connection so that when the application releases its reference to the Connection without closing it, its finalize method will be called, which will then close the connection. |
| Fields inherited from interface org.apache.derby.iapi.jdbc.ConnectionContext |
|---|
CONTEXT_ID |
| Constructor Summary | |
|---|---|
EmbedConnectionContext(ContextManager cm,
EmbedConnection conn)
|
|
| Method Summary | |
|---|---|
void |
cleanupOnError(java.lang.Throwable error)
Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action. |
java.sql.Connection |
getNestedConnection(boolean internal)
Get a connection equivalent to the call DriverManager.getConnection("jdbc:default:connection"); |
java.sql.ResultSet |
getResultSet(ResultSet executionResultSet)
Get a jdbc ResultSet based on the execution ResultSet. |
boolean |
processInaccessibleDynamicResult(java.sql.ResultSet resultSet)
Process a ResultSet from a procedure to be a dynamic result, but one that will be closed due to it being inaccessible. |
| Methods inherited from class org.apache.derby.iapi.services.context.ContextImpl |
|---|
appendErrorInfo, getContextManager, getIdName, isLastHandler, popMe, pushMe |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.ref.SoftReference connRef
| Constructor Detail |
|---|
EmbedConnectionContext(ContextManager cm,
EmbedConnection conn)
| Method Detail |
|---|
public void cleanupOnError(java.lang.Throwable error)
ContextContexts must release all their resources before removing themselves from their context manager.
The context manager will "unwind" the contexts during cleanup in the reverse order they were placed on its global stack.
If error is an instance of StandardException then an implementation of this method may throw a new exception if and only if the new exception is an instance of StandardException that is more severe than the original error or the new exception is a not an instance of StandardException (e.g java.lang.NullPointerException).
cleanupOnError in interface Context
public java.sql.Connection getNestedConnection(boolean internal)
throws java.sql.SQLException
DriverManager.getConnection("jdbc:default:connection");
getNestedConnection in interface ConnectionContextjava.sql.SQLException - Parent connection has been closed.
public java.sql.ResultSet getResultSet(ResultSet executionResultSet)
throws java.sql.SQLException
getResultSet in interface ConnectionContextexecutionResultSet - a result set as gotten from execution
java.sql.SQLException - on errorpublic boolean processInaccessibleDynamicResult(java.sql.ResultSet resultSet)
processInaccessibleDynamicResult in interface ConnectionContextresultSet - ResultSet to process.
EmbedStatement.processDynamicResult(EmbedConnection, java.sql.ResultSet, EmbedStatement)
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||