Author: manaRH
Date: 2012-08-08 14:27:29 -0400 (Wed, 08 Aug 2012)
New Revision: 15022
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java
Log:
JBSEAM-5006
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
===================================================================
---
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-08
14:00:02 UTC (rev 15021)
+++
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-08
18:27:29 UTC (rev 15022)
@@ -301,7 +301,7 @@
boolean hasAnnotation = getBeanClass().isAnnotationPresent(Synchronized.class);
// Technically, we don't need to synchronize page-scoped components if
StateManager#isSavingStateInClient(FacesContext) is true
- synchronize = ( scope==SESSION || scope==PAGE || hasAnnotation );
+ synchronize = ( scope==SESSION || scope==PAGE || hasAnnotation ) && type !=
ComponentType.STATEFUL_SESSION_BEAN;
if (synchronize)
{
@@ -314,6 +314,11 @@
{
log.warn("Interceptors are disabled for @Synchronized component -
synchronization will be disabled for: " + name);
}
+
+ if (hasAnnotation && type != ComponentType.STATEFUL_SESSION_BEAN)
+ {
+ log.warn("Seam synchronization interceptor is disabled for @Synchronized
@Stateful component - Seam synchronization will be disabled for: " + name);
+ }
}
private void registerConverterOrValidator(Context applicationContext)
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java
===================================================================
---
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java 2012-08-08
14:00:02 UTC (rev 15021)
+++
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/core/SynchronizationInterceptor.java 2012-08-08
18:27:29 UTC (rev 15022)
@@ -47,9 +47,8 @@
}
public boolean isInterceptorEnabled()
- {
- // JBSEAM-4943
- return getComponent().isSynchronize() && getComponent().getType() !=
ComponentType.STATEFUL_SESSION_BEAN;
+ {
+ return getComponent().isSynchronize() ;
}
}