[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Peter Muir
peter at bleepbleep.org.uk
Mon Aug 13 10:20:34 EDT 2007
User: pmuir
Date: 07/08/13 10:20:34
Modified: src/main/org/jboss/seam Component.java
Log:
JBSEAM-1787
Revision Changes Path
1.281 +11 -0 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -b -r1.280 -r1.281
--- Component.java 8 Aug 2007 09:47:07 -0000 1.280
+++ Component.java 13 Aug 2007 14:20:34 -0000 1.281
@@ -10,6 +10,7 @@
import static org.jboss.seam.ComponentType.JAVA_BEAN;
import static org.jboss.seam.ComponentType.MESSAGE_DRIVEN_BEAN;
import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
+import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
import static org.jboss.seam.ScopeType.APPLICATION;
import static org.jboss.seam.ScopeType.CONVERSATION;
import static org.jboss.seam.ScopeType.EVENT;
@@ -109,7 +110,9 @@
import org.jboss.seam.intercept.Proxy;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
+import org.jboss.seam.persistence.HibernateSessionProxyInterceptor;
import org.jboss.seam.persistence.ManagedEntityIdentityInterceptor;
+import org.jboss.seam.persistence.EntityManagerProxyInterceptor;
import org.jboss.seam.security.SecurityInterceptor;
import org.jboss.seam.transaction.RollbackInterceptor;
import org.jboss.seam.transaction.TransactionInterceptor;
@@ -1002,6 +1005,14 @@
{
addInterceptor( new Interceptor( new RemoveInterceptor(), this ) );
}
+ if ( getType()==STATEFUL_SESSION_BEAN || getType()==STATELESS_SESSION_BEAN )
+ {
+ if (Reflections.isClassAvailable("org.hibernate.Session"))
+ {
+ addInterceptor( new Interceptor ( new HibernateSessionProxyInterceptor(), this ) );
+ }
+ addInterceptor( new Interceptor ( new EntityManagerProxyInterceptor(), this ) );
+ }
if ( getType()!=ENTITY_BEAN )
{
addInterceptor( new Interceptor( new MethodContextInterceptor(), this ) );
More information about the jboss-cvs-commits
mailing list