[jboss-cvs] jboss-seam/src/main/org/jboss/seam/interceptors ...
Shane Bryzak
Shane_Bryzak at symantec.com
Wed Dec 20 21:38:27 EST 2006
User: sbryzak2
Date: 06/12/20 21:38:27
Modified: src/main/org/jboss/seam/interceptors
AbstractInterceptor.java
AsynchronousInterceptor.java
BijectionInterceptor.java
BusinessProcessInterceptor.java
ConversationInterceptor.java
ConversationalInterceptor.java
EventInterceptor.java ExceptionInterceptor.java
ManagedEntityIdentityInterceptor.java
MethodContextInterceptor.java
OutcomeInterceptor.java RemoveInterceptor.java
RollbackInterceptor.java SecurityInterceptor.java
SynchronizationInterceptor.java
TransactionInterceptor.java
ValidationInterceptor.java
Log:
fixed compiler warnings
Revision Changes Path
1.8 +34 -33 jboss-seam/src/main/org/jboss/seam/interceptors/AbstractInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/AbstractInterceptor.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- AbstractInterceptor.java 10 Oct 2006 06:43:16 -0000 1.7
+++ AbstractInterceptor.java 21 Dec 2006 02:38:27 -0000 1.8
@@ -1,4 +1,4 @@
-//$Id: AbstractInterceptor.java,v 1.7 2006/10/10 06:43:16 gavin Exp $
+//$Id: AbstractInterceptor.java,v 1.8 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import java.io.Serializable;
@@ -12,6 +12,7 @@
*/
public class AbstractInterceptor implements Serializable
{
+ private static final long serialVersionUID = -8838873111255032911L;
private transient Component component; //a cache of the Component reference
private String componentName;
1.9 +36 -38 jboss-seam/src/main/org/jboss/seam/interceptors/AsynchronousInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AsynchronousInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/AsynchronousInterceptor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- AsynchronousInterceptor.java 14 Dec 2006 10:27:00 -0000 1.8
+++ AsynchronousInterceptor.java 21 Dec 2006 02:38:27 -0000 1.9
@@ -1,7 +1,5 @@
package org.jboss.seam.interceptors;
-
import javax.ejb.Timer;
-
import org.jboss.seam.InterceptorType;
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Asynchronous;
@@ -10,10 +8,10 @@
import org.jboss.seam.core.Dispatcher;
import org.jboss.seam.core.LocalDispatcher;
import org.jboss.seam.intercept.InvocationContext;
-
@Interceptor(type=InterceptorType.CLIENT)
public class AsynchronousInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 9194177339867853303L;
@AroundInvoke
public Object invokeAsynchronouslyIfNecessary(InvocationContext invocation) throws Exception
{
1.25 +2 -1 jboss-seam/src/main/org/jboss/seam/interceptors/BijectionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BijectionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/BijectionInterceptor.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- BijectionInterceptor.java 16 Dec 2006 02:58:11 -0000 1.24
+++ BijectionInterceptor.java 21 Dec 2006 02:38:27 -0000 1.25
@@ -1,4 +1,4 @@
-//$Id: BijectionInterceptor.java,v 1.24 2006/12/16 02:58:11 nrichards Exp $
+//$Id: BijectionInterceptor.java,v 1.25 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import static org.jboss.seam.util.EJB.POST_ACTIVATE;
@@ -25,6 +25,7 @@
@Interceptor(stateless=true)
public class BijectionInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 4686458105931528659L;
private static final LogProvider log = Logging.getLogProvider(BijectionInterceptor.class);
1.49 +2 -1 jboss-seam/src/main/org/jboss/seam/interceptors/BusinessProcessInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BusinessProcessInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/BusinessProcessInterceptor.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- BusinessProcessInterceptor.java 18 Dec 2006 20:23:08 -0000 1.48
+++ BusinessProcessInterceptor.java 21 Dec 2006 02:38:27 -0000 1.49
@@ -29,12 +29,13 @@
* Interceptor which handles interpretation of jBPM-related annotations.
*
* @author <a href="mailto:steve at hibernate.org">Steve Ebersole </a>
- * @version $Revision: 1.48 $
+ * @version $Revision: 1.49 $
*/
@Interceptor(stateless=true,
around={ValidationInterceptor.class, BijectionInterceptor.class, OutcomeInterceptor.class})
public class BusinessProcessInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 758197867958840918L;
private static final LogProvider log = Logging.getLogProvider( BusinessProcessInterceptor.class );
1.57 +2 -1 jboss-seam/src/main/org/jboss/seam/interceptors/ConversationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/ConversationInterceptor.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- ConversationInterceptor.java 19 Dec 2006 16:57:04 -0000 1.56
+++ ConversationInterceptor.java 21 Dec 2006 02:38:27 -0000 1.57
@@ -1,4 +1,4 @@
-//$Id: ConversationInterceptor.java,v 1.56 2006/12/19 16:57:04 gavin Exp $
+//$Id: ConversationInterceptor.java,v 1.57 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import java.lang.reflect.Method;
@@ -31,6 +31,7 @@
within=BusinessProcessInterceptor.class)
public class ConversationInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = -5405533438107796414L;
@AroundInvoke
public Object endOrBeginLongRunningConversation(InvocationContext invocation) throws Exception
1.12 +3 -2 jboss-seam/src/main/org/jboss/seam/interceptors/ConversationalInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConversationalInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/ConversationalInterceptor.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- ConversationalInterceptor.java 16 Dec 2006 02:58:11 -0000 1.11
+++ ConversationalInterceptor.java 21 Dec 2006 02:38:27 -0000 1.12
@@ -1,4 +1,4 @@
-//$Id: ConversationalInterceptor.java,v 1.11 2006/12/16 02:58:11 nrichards Exp $
+//$Id: ConversationalInterceptor.java,v 1.12 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import java.lang.reflect.Method;
@@ -31,6 +31,7 @@
around={ValidationInterceptor.class, BijectionInterceptor.class, OutcomeInterceptor.class, BusinessProcessInterceptor.class})
public class ConversationalInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 1127583515811479385L;
private static final LogProvider log = Logging.getLogProvider(ConversationalInterceptor.class);
1.5 +59 -63 jboss-seam/src/main/org/jboss/seam/interceptors/EventInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EventInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/EventInterceptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- EventInterceptor.java 1 Nov 2006 02:54:02 -0000 1.4
+++ EventInterceptor.java 21 Dec 2006 02:38:27 -0000 1.5
@@ -1,13 +1,10 @@
package org.jboss.seam.interceptors;
-
import java.lang.reflect.Method;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.annotations.RaiseEvent;
import org.jboss.seam.core.Events;
import org.jboss.seam.intercept.InvocationContext;
-
/**
* Raises Seam events connected with a bean lifecycle.
*
@@ -20,18 +17,18 @@
RollbackInterceptor.class})
public class EventInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = -136300200838134612L;
+
/*@PostConstruct
public void postConstruct(InvocationContext ctx)
{
Events.instance().raiseEvent("org.jboss.seam.postConstruct." + component.getName());
}
-
@PreDestroy
public void preDestroy(InvocationContext ctx)
{
Events.instance().raiseEvent("org.jboss.seam.preDestroy." + component.getName());
}
-
@PrePassivate
public void prePassivate(InvocationContext ctx)
{
@@ -43,7 +40,6 @@
{
Events.instance().raiseEvent("org.jboss.seam.postActivate." + component.getName());
}*/
-
@AroundInvoke
public Object aroundInvoke(InvocationContext ctx) throws Exception
{
1.15 +3 -2 jboss-seam/src/main/org/jboss/seam/interceptors/ExceptionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ExceptionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/ExceptionInterceptor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ExceptionInterceptor.java 29 Nov 2006 12:43:22 -0000 1.14
+++ ExceptionInterceptor.java 21 Dec 2006 02:38:27 -0000 1.15
@@ -1,4 +1,4 @@
-// $Id: ExceptionInterceptor.java,v 1.14 2006/11/29 12:43:22 gavin Exp $
+// $Id: ExceptionInterceptor.java,v 1.15 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import static org.jboss.seam.contexts.Contexts.getEventContext;
@@ -21,6 +21,7 @@
@Interceptor(stateless = true, type = InterceptorType.CLIENT)
public class ExceptionInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 748337911616171944L;
private static final String OUTERMOST_EXCEPTION_INTERCEPTOR = "org.jboss.seam.outermostExceptionInterceptor";
1.18 +106 -110 jboss-seam/src/main/org/jboss/seam/interceptors/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/interceptors/ManagedEntityIdentityInterceptor.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- ManagedEntityIdentityInterceptor.java 16 Dec 2006 10:17:14 -0000 1.17
+++ ManagedEntityIdentityInterceptor.java 21 Dec 2006 02:38:27 -0000 1.18
@@ -1,10 +1,8 @@
package org.jboss.seam.interceptors;
-
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Interceptor;
@@ -12,7 +10,6 @@
import org.jboss.seam.core.PersistenceContexts;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.util.Reflections;
-
/**
* Swizzles entity references around each invocation, maintaining
* referential integrity even across passivation of the stateful
@@ -25,9 +22,9 @@
@Interceptor(around=BijectionInterceptor.class)
public class ManagedEntityIdentityInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 3105217046803964083L;
//TODO: cache much more - the list of fields, PassivatedEntity obects, etc
-
private List<PassivatedEntity> passivatedEntities = new ArrayList<PassivatedEntity>();
@AroundInvoke
@@ -80,7 +77,6 @@
}
}
}
-
public void entityIdsToRefs(InvocationContext ctx) throws Exception
{
if ( passivatedEntities.size()>0 )
1.3 +34 -35 jboss-seam/src/main/org/jboss/seam/interceptors/MethodContextInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MethodContextInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/MethodContextInterceptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- MethodContextInterceptor.java 16 Dec 2006 10:17:14 -0000 1.2
+++ MethodContextInterceptor.java 21 Dec 2006 02:38:27 -0000 1.3
@@ -1,12 +1,10 @@
package org.jboss.seam.interceptors;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
import org.jboss.seam.intercept.InvocationContext;
-
/**
* Sets up the METHOD context and unproxies the SFSB
* for the duration of the call.
@@ -17,6 +15,7 @@
@Interceptor(stateless=true, around={BijectionInterceptor.class, EventInterceptor.class, SecurityInterceptor.class})
public class MethodContextInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 6833040683938889232L;
@AroundInvoke
public Object aroundInvoke(InvocationContext ctx) throws Exception
{
1.7 +26 -28 jboss-seam/src/main/org/jboss/seam/interceptors/OutcomeInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OutcomeInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/OutcomeInterceptor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- OutcomeInterceptor.java 1 Nov 2006 02:54:02 -0000 1.6
+++ OutcomeInterceptor.java 21 Dec 2006 02:38:27 -0000 1.7
@@ -1,14 +1,11 @@
-//$Id: OutcomeInterceptor.java,v 1.6 2006/11/01 02:54:02 gavin Exp $
+//$Id: OutcomeInterceptor.java,v 1.7 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
-
import javax.faces.event.PhaseId;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.annotations.Outcome;
import org.jboss.seam.contexts.Lifecycle;
import org.jboss.seam.intercept.InvocationContext;
-
/**
* Translates Outcome.RETRY to null for JSF
*
@@ -17,6 +14,7 @@
@Interceptor(stateless=true)
public class OutcomeInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 3964713422043590510L;
@AroundInvoke
public Object interceptOutcome(InvocationContext invocation) throws Exception
{
1.19 +2 -1 jboss-seam/src/main/org/jboss/seam/interceptors/RemoveInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RemoveInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/RemoveInterceptor.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- RemoveInterceptor.java 16 Dec 2006 02:58:11 -0000 1.18
+++ RemoveInterceptor.java 21 Dec 2006 02:38:27 -0000 1.19
@@ -1,4 +1,4 @@
-//$Id: RemoveInterceptor.java,v 1.18 2006/12/16 02:58:11 nrichards Exp $
+//$Id: RemoveInterceptor.java,v 1.19 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import java.lang.reflect.Method;
@@ -24,6 +24,7 @@
@Interceptor(type=InterceptorType.CLIENT)
public class RemoveInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = -6693606158918954699L;
private static final LogProvider log = Logging.getLogProvider(RemoveInterceptor.class);
1.15 +69 -75 jboss-seam/src/main/org/jboss/seam/interceptors/RollbackInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RollbackInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/RollbackInterceptor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- RollbackInterceptor.java 8 Nov 2006 17:32:43 -0000 1.14
+++ RollbackInterceptor.java 21 Dec 2006 02:38:27 -0000 1.15
@@ -1,21 +1,17 @@
-//$Id: RollbackInterceptor.java,v 1.14 2006/11/08 17:32:43 gavin Exp $
+//$Id: RollbackInterceptor.java,v 1.15 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
-
import static org.jboss.seam.ComponentType.JAVA_BEAN;
import static org.jboss.seam.util.EJB.APPLICATION_EXCEPTION;
import static org.jboss.seam.util.EJB.rollback;
-
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.annotations.Outcome;
import org.jboss.seam.annotations.Rollback;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.util.Transactions;
-
/**
* Automatically sets transactions to rollback only.
*
@@ -24,7 +20,7 @@
@Interceptor(stateless=true, around=OutcomeInterceptor.class)
public class RollbackInterceptor extends AbstractInterceptor
{
-
+ private static final long serialVersionUID = 5551801508325093417L;
@AroundInvoke
public Object rollbackIfNecessary(InvocationContext invocation) throws Exception
{
@@ -54,7 +50,6 @@
throw e;
}
}
-
private boolean isRollbackRequired(Method method, final Object result)
{
if ( !method.isAnnotationPresent(Rollback.class) ) return false;
@@ -64,7 +59,6 @@
( result==null && outcomeList.contains(Outcome.REDISPLAY) ) ||
outcomeList.contains(result);
}
-
private boolean isRollbackRequired(Exception e)
{
Class<? extends Exception> clazz = e.getClass();
1.15 +27 -29 jboss-seam/src/main/org/jboss/seam/interceptors/SecurityInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SecurityInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/SecurityInterceptor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- SecurityInterceptor.java 13 Dec 2006 04:59:31 -0000 1.14
+++ SecurityInterceptor.java 21 Dec 2006 02:38:27 -0000 1.15
@@ -14,15 +14,13 @@
*
* @author Shane Bryzak
*/
- at Interceptor(stateless = true,
- around = ValidationInterceptor.class,
- within = BijectionInterceptor.class)
+ at Interceptor(stateless = true, around = ValidationInterceptor.class, within = BijectionInterceptor.class)
public class SecurityInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = -6567750187000766925L;
@AroundInvoke
- public Object checkSecurity(InvocationContext invocation)
- throws Exception
+ public Object checkSecurity(InvocationContext invocation) throws Exception
{
Restrict r = null;
1.5 +2 -1 jboss-seam/src/main/org/jboss/seam/interceptors/SynchronizationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SynchronizationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/SynchronizationInterceptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SynchronizationInterceptor.java 1 Nov 2006 02:54:02 -0000 1.4
+++ SynchronizationInterceptor.java 21 Dec 2006 02:38:27 -0000 1.5
@@ -1,4 +1,4 @@
-//$Id: SynchronizationInterceptor.java,v 1.4 2006/11/01 02:54:02 gavin Exp $
+//$Id: SynchronizationInterceptor.java,v 1.5 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
import java.util.concurrent.TimeUnit;
@@ -17,6 +17,7 @@
@Interceptor(type=InterceptorType.CLIENT)
public class SynchronizationInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = -4173880108889358566L;
private ReentrantLock lock = new ReentrantLock(true);
1.12 +52 -61 jboss-seam/src/main/org/jboss/seam/interceptors/TransactionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransactionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/TransactionInterceptor.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- TransactionInterceptor.java 16 Dec 2006 10:17:14 -0000 1.11
+++ TransactionInterceptor.java 21 Dec 2006 02:38:27 -0000 1.12
@@ -1,14 +1,11 @@
package org.jboss.seam.interceptors;
-
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Method;
-
import org.jboss.seam.annotations.AroundInvoke;
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.util.Work;
-
/**
* Implements transaction propagation rules for Seam JavaBean components.
*
@@ -19,37 +16,32 @@
around={RollbackInterceptor.class, BusinessProcessInterceptor.class, ConversationInterceptor.class})
public class TransactionInterceptor extends AbstractInterceptor
{
-
+ private static final long serialVersionUID = -4364203056333738988L;
@AroundInvoke
public Object doInTransactionIfNecessary(final InvocationContext invocation) throws Exception
{
return new Work()
{
-
@Override
protected Object work() throws Exception
{
return invocation.proceed();
}
-
@Override
protected boolean isNewTransactionRequired(boolean transactionActive)
{
return isNewTransactionRequired( invocation.getMethod(), getComponent().getBeanClass(), transactionActive );
}
-
private boolean isNewTransactionRequired(Method method, Class beanClass, boolean transactionActive)
{
return isTransactionAnnotationPresent(method) ?
isNewTransactionRequired(method, transactionActive) :
isTransactionAnnotationPresent(beanClass) && isNewTransactionRequired(beanClass, transactionActive);
}
-
private boolean isTransactionAnnotationPresent(AnnotatedElement element)
{
return element.isAnnotationPresent(Transactional.class);
}
-
private boolean isNewTransactionRequired(AnnotatedElement element, boolean transactionActive)
{
return element.getAnnotation(Transactional.class).value().isNewTransactionRequired(transactionActive);
@@ -57,5 +49,4 @@
}.workInTransaction();
}
-
}
1.26 +96 -101 jboss-seam/src/main/org/jboss/seam/interceptors/ValidationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ValidationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/ValidationInterceptor.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- ValidationInterceptor.java 16 Dec 2006 10:17:14 -0000 1.25
+++ ValidationInterceptor.java 21 Dec 2006 02:38:27 -0000 1.26
@@ -1,11 +1,8 @@
-//$Id: ValidationInterceptor.java,v 1.25 2006/12/16 10:17:14 gavin Exp $
+//$Id: ValidationInterceptor.java,v 1.26 2006/12/21 02:38:27 sbryzak2 Exp $
package org.jboss.seam.interceptors;
-
import java.lang.reflect.Method;
-
import javax.persistence.Entity;
import javax.persistence.EntityManager;
-
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.hibernate.Session;
@@ -16,7 +13,6 @@
import org.jboss.seam.annotations.Interceptor;
import org.jboss.seam.core.FacesMessages;
import org.jboss.seam.intercept.InvocationContext;
-
/**
* Validate the method receiver using Hibernate validator before
* invoking the method. If a validation failure occurs, put
@@ -31,9 +27,9 @@
@SuppressWarnings("deprecation")
public class ValidationInterceptor extends AbstractInterceptor
{
+ private static final long serialVersionUID = 4724500409653141512L;
private static final LogProvider log = Logging.getLogProvider(ValidationInterceptor.class);
-
@AroundInvoke
public Object validateTargetComponent(InvocationContext invocation) throws Exception
{
@@ -67,7 +63,6 @@
return invocation.proceed();
}
}
-
private void refreshInvalidEntity(IfInvalid ifInvalid, Object entity) {
Object persistenceContext = Component.getInstance( ifInvalid.persistenceContext(), false );
if (persistenceContext==null)
More information about the jboss-cvs-commits
mailing list