|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.db.E4DBConnectionDefault
e4s.db.E4DBConnectionTransactional
public class E4DBConnectionTransactional
This is the main class that connects the application with the database, there is no
single statement transaction defined, so you must take care of transactions using
commit/rollback functionality. By default, when the connection is closed a commit() will
be performed. Each object of this class is a new connection to the database. Hold this objects for
a short period only, avoid to store them as session objects over several user requests.
As with each object a connection is created on the JDBC driver, depending on the product
and license of your database or JDBC driver you might run out of connections if there are
some limitations!
| Example_DB_Transaction.java |
E4DBSettings,
E4DBConnectionDefault| Field Summary |
|---|
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4DBConnectionTransactional(java.sql.Connection con,
int dbtype)
|
|
E4DBConnectionTransactional(java.lang.String driver_name,
java.lang.String connection_name,
int dbtype)
|
|
E4DBConnectionTransactional(java.lang.String driver_name,
java.lang.String connection_name,
java.lang.String userid,
java.lang.String password,
int dbtype)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
void |
close()
Close the connection. |
void |
commit()
Commit the current transaction - only when not running in SST mode ( getAutoCommit()). |
void |
finalize()
|
boolean |
getAutoCommit()
Get the JDBC auto commit state (SST mode). |
java.lang.String |
getID()
|
static E4DBConnection_Intf |
getInstance()
|
static E4DBConnectionTransactional |
getTransactionalConnection()
|
void |
rollback()
Rollback the current transaction - only when not running in SST mode ( getAutoCommit()). |
void |
setAutoCommit(boolean autocommit)
Set the JDBC auto commit state (SST mode). |
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface e4s.db.E4DBConnection_Intf |
|---|
connectionIsPooled, getCatalog, getDatabaseMetaData, getDatabaseType, getIndexes, getStatement, getTables, istabledefined |
| Constructor Detail |
|---|
public E4DBConnectionTransactional(java.sql.Connection con,
int dbtype)
public E4DBConnectionTransactional(java.lang.String driver_name,
java.lang.String connection_name,
int dbtype)
throws E4DBException
E4DBException
public E4DBConnectionTransactional(java.lang.String driver_name,
java.lang.String connection_name,
java.lang.String userid,
java.lang.String password,
int dbtype)
throws E4DBException
E4DBException| Method Detail |
|---|
public static E4DBConnection_Intf getInstance()
throws E4DBException
E4DBException
public static E4DBConnectionTransactional getTransactionalConnection()
throws E4DBException
E4DBException
public void commit()
throws E4DBException
getAutoCommit()).
Refer to your JDBC documentation about this functionality.
E4DBExceptionrollback()
public void rollback()
throws E4DBException
getAutoCommit()).
Refer to your JDBC documentation about this functionality.
E4DBExceptioncommit()
public void setAutoCommit(boolean autocommit)
throws E4DBException
autocommit - true - this connection runs in auto commit mode, a commit() is not necessary
and a rollback() will take no effect. false - You must take
care of transactions using commit() or rollback().
E4DBExceptiongetAutoCommit()
public boolean getAutoCommit()
throws E4DBException
commit() is not necessary
and a rollback() will take no effect.
false: You must take care of transactions using commit() or rollback().
E4DBException#setAutoCommit()
public void close()
throws E4DBException
close in interface E4DBConnection_Intfclose in class E4DBConnectionDefaultE4DBExceptionpublic void finalize()
finalize in class E4DBConnectionDefaultpublic java.lang.String getID()
getID in interface E4DBConnection_IntfgetID in class E4DBConnectionDefaultpublic static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||