public abstract class AbstractDataSource extends Object implements SAXVisitBefore, DOMVisitBefore, Producer, VisitLifecycleCleanable, ExecutionLifecycleCleanable
Constructor and Description |
---|
AbstractDataSource() |
Modifier and Type | Method and Description |
---|---|
protected void |
bind(ExecutionContext executionContext) |
TransactionManager |
createTransactionManager(Connection connection) |
void |
executeExecutionLifecycleCleanup(ExecutionContext executionContext)
Cleanup the resources allocated by this resource for the specified ExecutionContext.
|
void |
executeVisitLifecycleCleanup(Fragment fragment,
ExecutionContext executionContext)
Cleanup the resources allocated by this resource for the specified ExecutionContext.
|
abstract Connection |
getConnection() |
static Connection |
getConnection(String dataSourceName,
ExecutionContext executionContext) |
abstract String |
getName() |
Set<String> |
getProducts()
Get the set of products produced by this producer instance.
|
abstract boolean |
isAutoCommit() |
protected void |
unbind(ExecutionContext executionContext) |
void |
visitBefore(Element element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
void |
visitBefore(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
public final void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public final void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBefore
visitBefore
in interface DOMVisitBefore
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public final void executeVisitLifecycleCleanup(Fragment fragment, ExecutionContext executionContext)
VisitLifecycleCleanable
executeVisitLifecycleCleanup
in interface VisitLifecycleCleanable
fragment
- The fragment.executionContext
- The ExecutionContext.public final void executeExecutionLifecycleCleanup(ExecutionContext executionContext)
ExecutionLifecycleCleanable
executeExecutionLifecycleCleanup
in interface ExecutionLifecycleCleanable
executionContext
- The ExecutionContext.protected void bind(ExecutionContext executionContext)
protected void unbind(ExecutionContext executionContext)
public static Connection getConnection(String dataSourceName, ExecutionContext executionContext) throws SmooksException
SmooksException
public Set<String> getProducts()
Producer
getProducts
in interface Producer
public abstract String getName()
public abstract Connection getConnection() throws SQLException
SQLException
public abstract boolean isAutoCommit()
public TransactionManager createTransactionManager(Connection connection)
Copyright © 2020. All rights reserved.