org.apache.commons.jelly.tags.sql
Class TransactionTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.sql.TransactionTag
- All Implemented Interfaces:
- Tag
- public class TransactionTag
- extends TagSupport
Tag handler for <Transaction> in JSTL.
- Author:
- Hans Bergsten
Method Summary |
protected void |
doFinally()
Restores the Connection to its initial state and
closes it. |
void |
doTag(XMLOutput output)
Prepares for execution by setting the initial state, such as
getting the Connection and preparing it for
the transaction. |
java.sql.Connection |
getSharedConnection()
Called by nested parameter elements to get a reference to
the Connection. |
void |
setDataSource(java.lang.Object dataSource)
Sets the SQL DataSource. |
void |
setIsolation(java.lang.String iso)
Sets the transaction isolation level. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rawDataSource
protected java.lang.Object rawDataSource
dataSourceSpecified
protected boolean dataSourceSpecified
TransactionTag
public TransactionTag()
setDataSource
public void setDataSource(java.lang.Object dataSource)
- Sets the SQL DataSource. DataSource can be
a String or a DataSource object.
doTag
public void doTag(XMLOutput output)
throws java.lang.Exception
- Prepares for execution by setting the initial state, such as
getting the
Connection
and preparing it for
the transaction.
setIsolation
public void setIsolation(java.lang.String iso)
throws JellyException
- Sets the transaction isolation level.
getSharedConnection
public java.sql.Connection getSharedConnection()
- Called by nested parameter elements to get a reference to
the Connection.
doFinally
protected void doFinally()
- Restores the
Connection
to its initial state and
closes it.
Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.