!--a11y-->
sqlj.runtime.ConnectionContext 
sqlj.runtime.ConnectionContext
The ConnectionContext interface provides a set of methods that manage a set of SQL operations performed during a session with a specific database. A connection context object maintains a JDBC Connectionobject on which dynamic SQL operations are permitted. It also contains a default ExecutionContext object by which the semantics of the execution of SQL operations can be modified.
In addition to
those methods defined by this interface, a concrete implementation <java class name> of a connection context object
provides constructors described in
Database Connection
Context in the Development Manual.
public static final boolean CLOSE_CONNECTION
Constant indicating that the underlying JDBC Connection should be closed.
public static final boolean KEEP_CONNECTION
Constant indicating that the underlying JDBC Connection should not be closed.
public abstract void close (boolean closeConnection) throws SQLException
Releases all resources used in maintaining database state on this connection context object. Since the underlying JDBC Connection object managed by this connection context object is permitted to be shared between multiple connection context objects, it is not always desirable to close the underlying JDBC Connection object when close() is called. If the constant KEEP_CONNECTION is passed as the parameter closeConnection, the underlying JDBC Connection object is not closed. Otherwise, if the constant CLOSE_CONNECTION is passed, the underlying Connection object is closed.
If the method is called with CLOSE_CONNECTION and the underlying Connection object has been obtained from a pooled data source, the connection is not physically closed but returned to the pool.
public abstract void close () throws SQLException
This method is equivalent to calling close(ConnectionContext.CLOSE_CONNECTION).
public abstract ConnectedProfile getConnectedProfile (Object profileKey)
This method is for internal use. Application coding shall not call it directly. It can be changed incompatibly at any time.
public abstract Connection getConnection ()
Returns the underlying JDBC Connectionobject associated with this connection context object.
public abstract ExecutionContext getExecutionContect ()
The method returns the default ExecutionContext object of this ConnectionContext. The default ExecutionContext object is the ExecutionContext object used if no explicit ExecutionContext object is supplied during the execution of a particular SQL operation. Any changes made to the returned object are visible in this ConnectionContext object.
public abstract boolean isClosed ()
Returns true if this ConnectionContext object has been closed; otherwise, false.
