{
if (pageContext.getAttribute("caucho.jstl.sql.conn") != null)
throw new JspTagException(L.l("nested sql:transaction are forbidden"));
try {
DataSource ds;
ds = SqlQueryTag.getDataSource(pageContext, _dataSource);
int isolationCode = -1;
if (_isolation == null) {
}
else if (_isolation.equals("read_committed"))
isolationCode = Connection.TRANSACTION_READ_COMMITTED;
else if (_isolation.equals("read_uncommitted"))
isolationCode = Connection.TRANSACTION_READ_UNCOMMITTED;
else if (_isolation.equals("repeatable_read"))
isolationCode = Connection.TRANSACTION_REPEATABLE_READ;
else if (_isolation.equals("serializable"))
isolationCode = Connection.TRANSACTION_SERIALIZABLE;
else
throw new JspTagException(L.l("unknown sql:transaction isolation ~{0}'", _isolation));
_conn = ds.getConnection();
_oldIsolation = _conn.getTransactionIsolation();
_conn.setAutoCommit(false);