[jboss-cvs] jboss-seam/src/main/org/jboss/seam/persistence ...
Norman Richards
norman.richards at jboss.com
Fri Sep 14 16:37:31 EDT 2007
User: nrichards
Date: 07/09/14 16:37:31
Modified: src/main/org/jboss/seam/persistence
ManagedEntityIdentityInterceptor.java
Log:
JBSEAM-1857
Revision Changes Path
1.3 +23 -22 jboss-seam/src/main/org/jboss/seam/persistence/ManagedEntityIdentityInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ManagedEntityIdentityInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/persistence/ManagedEntityIdentityInterceptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ManagedEntityIdentityInterceptor.java 12 Jul 2007 13:47:24 -0000 1.2
+++ ManagedEntityIdentityInterceptor.java 14 Sep 2007 20:37:31 -0000 1.3
@@ -30,28 +30,29 @@
* @author Gavin King
*
*/
- at Interceptor(around=BijectionInterceptor.class, stateless=true)
+ at Interceptor(around=BijectionInterceptor.class)
public class ManagedEntityIdentityInterceptor extends AbstractInterceptor
{
-
+ private boolean reentrant;
//TODO: cache the non-ignored fields, probably on Component
@AroundInvoke
public Object aroundInvoke(InvocationContext ctx) throws Exception
{
+ if (reentrant) {
+ return ctx.proceed();
+ } else {
+ reentrant = true;
entityIdsToRefs(ctx);
- try
- {
+ try {
return ctx.proceed();
- }
- finally
- {
- if ( !isTransactionRolledBackOrMarkedRollback() )
- {
+ } finally {
+ if (!isTransactionRolledBackOrMarkedRollback()) {
entityRefsToIds(ctx);
}
}
}
+ }
private static boolean isTransactionRolledBackOrMarkedRollback()
{
More information about the jboss-cvs-commits
mailing list