Re: JSTL - <sql:transaction>, rollback?
From: Chris Smith (cdsmith_at_twu.net)
Date: 05/20/04
- Next message: Chris Smith: "Re: JAXP Document to String needed"
- Previous message: Chris Smith: "Re: Compile java files programmatically"
- In reply to: Sid Eaton: "JSTL - <sql:transaction>, rollback?"
- Next in thread: Sid Eaton: "Re: JSTL - <sql:transaction>, rollback?"
- Reply: Sid Eaton: "Re: JSTL - <sql:transaction>, rollback?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 May 2004 15:07:41 -0600
Sid Eaton wrote:
> It's not clear from all the documentation I've read what constitutes a
> reason for JSTL to decide to rollback a transaction.
Apparently, the exception will be committed if the sql:transaction tag
completes normally, and rolled back if it fails with an exception
(including SQLException or any user-defined exception). So you could
throw an exception if you need explicit rollback; but if you're sticking
with no scriptlets, then you'd need to get another tag to do so on your
behalf.
For more flexibility, remove your JDBC code from the JSP page.
-- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
- Next message: Chris Smith: "Re: JAXP Document to String needed"
- Previous message: Chris Smith: "Re: Compile java files programmatically"
- In reply to: Sid Eaton: "JSTL - <sql:transaction>, rollback?"
- Next in thread: Sid Eaton: "Re: JSTL - <sql:transaction>, rollback?"
- Reply: Sid Eaton: "Re: JSTL - <sql:transaction>, rollback?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|