public class JDBCRepositoryConnection extends AbstractRepositoryConnection
SdxObject.ConfigurationNode
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized
CLASS_NAME_SUFFIX
DEFAULT_ENCODING
Constructor and Description |
---|
JDBCRepositoryConnection(java.sql.Connection conn) |
JDBCRepositoryConnection(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSource)
Creates a connection using a standard SQL Connection.
|
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit all pending operations within this active connection.
|
java.sql.Connection |
getConnection()
Returns the SQL connection to the datasource component
|
org.apache.avalon.excalibur.datasource.DataSourceComponent |
getDataSource()
Returns the datasource component from which this connection was derived
|
protected void |
releaseSqlConnection()
Releases the SQL Connection to the datasource
|
void |
rollback()
Undo all pending operations within with this connection.
|
void |
setAutoCommit(boolean autoCommit)
Sets this connection in autocommit mode or not.
|
getClassNameSuffix, initToSax, initVolatileObjectsToSax, optimize
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources
public JDBCRepositoryConnection(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSource) throws java.sql.SQLException
dataSource
- The component from cocoon representing the databasejava.sql.SQLException
public JDBCRepositoryConnection(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public void commit() throws SDXException
commit
in interface RepositoryConnection
commit
in class AbstractRepositoryConnection
SDXException
public void rollback() throws SDXException
rollback
in interface RepositoryConnection
rollback
in class AbstractRepositoryConnection
SDXException
public void setAutoCommit(boolean autoCommit) throws SDXException
setAutoCommit
in interface RepositoryConnection
setAutoCommit
in class AbstractRepositoryConnection
autoCommit
- true enables auto-commit ; false disables auto-commit.SDXException
public java.sql.Connection getConnection()
public org.apache.avalon.excalibur.datasource.DataSourceComponent getDataSource()
protected void releaseSqlConnection() throws SDXException
SDXException
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.