[jboss-user] [JBoss Seam] - @Rollback annotation for validation logic causing detached o
p2auljr
do-not-reply at jboss.com
Fri Jul 13 09:54:23 EDT 2007
I have a stateful session bean that uses an extended persistent context and is annotated with @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED).
In a transactional action method annotated with @TransactionAttribute(TransactionAttributeType.REQUIRED), I perform business level validation. If the validation fails, I rollback the transaction using Seam's @Rollback annotation.
However, the EJB specs indicates that a rollback will cause all entities in the entitymanager to be become detached. This seems like overkill because then I need to merge back all the instances and allow the user to fix the validation errors.
Are there any best practices with this? Should I only rely on using Hibernate validation with seam's s:validateAll tag?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063999#4063999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063999
More information about the jboss-user
mailing list