Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

22.5. Annotations for transaction demarcation

Seam provides an annotation that lets you force a rollback of the JTA transaction for certain action listener outcomes.
@Rollback
@Rollback(ifOutcome={"failure", "not-found"})
If the outcome of the method matches any of the listed outcomes, or if no outcomes are listed, set the transaction to rollback only when the method completes.
  • ifOutcome — the JSF outcomes that cause a transaction rollback (no outcomes is interpreted to mean any outcome).
@Transactional
@Transactional
Specifies that a JavaBean component should have a similar transactional behavior to the default behavior of a session bean component. ie. method invocations should take place in a transaction, and if no transaction exists when the method is called, a transaction will be started just for that method. This annotation may be applied at either class or method level.
Seam applications usually use the standard EJB3 annotations for all other transaction demarcation needs.

 
 
  Published under the terms of the Open Publication License Design by Interspire