org.apache.commons.jelly.tags.sql
Class TransactionTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.sql.TransactionTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class TransactionTag
extends org.apache.commons.jelly.TagSupport

Tag handler for <Transaction> in JSTL.

Author:
Hans Bergsten

Field Summary
protected  boolean dataSourceSpecified
           
protected  java.lang.Object rawDataSource
           
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
TransactionTag()
           
 
Method Summary
protected  void doFinally()
          Restores the Connection to its initial state and closes it.
 void doTag(org.apache.commons.jelly.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, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rawDataSource

protected java.lang.Object rawDataSource

dataSourceSpecified

protected boolean dataSourceSpecified
Constructor Detail

TransactionTag

public TransactionTag()
Method Detail

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(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Prepares for execution by setting the initial state, such as getting the Connection and preparing it for the transaction.

Throws:
org.apache.commons.jelly.JellyTagException

setIsolation

public void setIsolation(java.lang.String iso)
                  throws org.apache.commons.jelly.JellyTagException
Sets the transaction isolation level.

Throws:
org.apache.commons.jelly.JellyTagException

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-2006 Apache Software Foundation. All Rights Reserved.