|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jsp.dbutil.ConnBean | +--oracle.sqlj.runtime.SqljConnBean
SqljConnBean enhances JSP ConnBean with the "m_contextClass" bean property, the "getContext" method, and the "getDefaultContext" method.
A SqljConnBean instance is associated with at most one JDBC connection and one SQLJ connection context, called the current connection and the current connection context respectively.
ConnBean
,
ConnectionContext
,
Bean for ConnBean
- User - user name for connection
- Password password for connection
- URL URL for database connection
- StmtCacheSize Enable and set the statement cache size
- ExecuteBatch Execute Batch Size for DMLs
- PreFetch Row prefetch size for the rows returned for queries.
- ContextClass Set the type for connection context
, Serialized FormFields inherited from class oracle.jsp.dbutil.ConnBean |
m_conn |
Constructor Summary | |
SqljConnBean()
|
Method Summary | |
ConnectionContext |
getContext()
Returns a connection context, whose type is determine by the bean property "ContextClass". |
ConnectionContext |
getContext(boolean autoCommit)
Returns the same result as getContext, except that the auto-commit staus in the underline JDBC connection is reseted according to the parameter. |
ConnectionContext |
getContext(java.lang.Class ctxClass)
Returns a connection context, whose type is determine by the parameter "ctxClass". |
ConnectionContext |
getContext(java.lang.Class ctxClass,
boolean autoCommit)
Returns the same result as getContext(Class), except that the auto-commit staus in the underline JDBC connection is reseted according to the parameter. |
java.lang.String |
getContextClass()
Get the fully qualified name of the underlying connection context class. |
DefaultContext |
getDefaultContext()
Returns a connection context of Type DefaultContext. |
DefaultContext |
getDefaultContext(boolean autoCommit)
Returns the same result as getDefaultContext, except that the auto-commit staus in the underline JDBC connection is reseted according to the parameter. |
void |
setContextClass(java.lang.String className)
Set the fully qualified name of the underlying connection context class. |
Methods inherited from class oracle.jsp.dbutil.ConnBean |
close,
connect,
getConnection,
getCursorBean,
getExecuteBatch,
getPassword,
getPreFetch,
getStmtCacheSize,
getURL,
getUser,
outOfScope,
setExecuteBatch,
setPassword,
setPreFetch,
setStmtCacheSize,
setURL,
setUser |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SqljConnBean() throws java.sql.SQLException
Method Detail |
public void setContextClass(java.lang.String className)
public java.lang.String getContextClass()
public DefaultContext getDefaultContext() throws java.sql.SQLException
If no connection context is created previously, i.e., not "getContext" or "getDefaultContext" methods are called before, a DefaultContext instance will be created and returned.
If the current connection context is a DefaultContext instance, then return the current context.
If the current connection context is not a DefaultContext instance, then close that connection context and creates a DefaultContext instance. When the connection context is closed, the JDBC connection assoicated with that connection context is not closed. The JDBC connection is in turn associated with the newly created connection context.
public ConnectionContext getContext() throws java.sql.SQLException
If "ContextClass" is not defined, returns the same result as the method "getDefaultContext()".
If no connection context is created previously, i.e.,
not "getContext" or "getDefaultContext" methods are called
before, an instance of "ContextClass" will be created and returned.
If the current connection context is an instance of
ContextClass, then return the current context.
If the current connection context is not an instnace of
ContextClass, then close that connection context and creates
a ContextClass instance. When the connection context is closed,
the JDBC connection assoicated with that connection context is
not closed. The JDBC connection is in turn associated with the
newly created connection context.
public ConnectionContext getContext(java.lang.Class ctxClass) throws java.sql.SQLException
If no connection context is created previously, i.e., not "getContext" or "getDefaultContext" methods are called before, an instance of "ctxClass" will be created and returned.
If the current connection context is an instance of ctxClass, then return the current context.
If the current connection context is not an instnace of ctxClass, then close that connection context and creates a ContextClass instance. When the connection context is closed, the JDBC connection assoicated with that connection context is not closed. The JDBC connection is in turn associated with the newly created connection context.
ctxClass
- the type of the returned connection context.public DefaultContext getDefaultContext(boolean autoCommit) throws java.sql.SQLException
autoCommit
- the auto-commit setting for the underlying JDBC connection.getDefaultContext()
public ConnectionContext getContext(boolean autoCommit) throws java.sql.SQLException
autoCommit
- the auto-commit setting for the underlying JDBC
connection.public ConnectionContext getContext(java.lang.Class ctxClass, boolean autoCommit) throws java.sql.SQLException
ctxClass
- the type of the returned connection contextautoCommit
- the auto-commit setting for the underlying JDBC connection.getContext(Class)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |