[jboss-cvs] jboss-seam/src/main/org/jboss/seam/intercept ...
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/intercept
SessionBeanInterceptor.java
Log:
JBSEAM-1787
Revision Changes Path
1.18 +2 -24 jboss-seam/src/main/org/jboss/seam/intercept/SessionBeanInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SessionBeanInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/intercept/SessionBeanInterceptor.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- SessionBeanInterceptor.java 24 Jun 2007 19:40:32 -0000 1.17
+++ SessionBeanInterceptor.java 13 Aug 2007 14:20:34 -0000 1.18
@@ -12,14 +12,11 @@
import javax.ejb.PrePassivate;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
-import javax.persistence.EntityManager;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.persistence.EntityManagerProxy;
import org.jboss.seam.Component;
import org.jboss.seam.Seam;
-import org.jboss.seam.Component.BijectedAttribute;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.intercept.InterceptorType;
@@ -37,7 +34,7 @@
public static ThreadLocal<Component> COMPONENT = new ThreadLocal<Component>();
/**
- * Called when instatiated by EJB container.
+ * Called when instantiated by EJB container.
* (In this case it might be a Seam component,
* but we won't know until postConstruct() is
* called.)
@@ -62,7 +59,6 @@
@PostActivate
public void postActivate(InvocationContext invocation)
{
- proxyPersistenceContexts( invocation.getTarget() ); //just in case the container does some special handling of PC serialization
invokeAndHandle( new EJBInvocationContext(invocation), EventType.POST_ACTIVATE);
}
@@ -114,27 +110,9 @@
initNonSeamComponent();
}
- proxyPersistenceContexts(bean);
-
postConstruct(bean);
invokeAndHandle( new EJBInvocationContext(invocation), EventType.POST_CONSTRUCT );
}
- //TODO: really we should do this stuff in a Seam interceptor, I suppose
- private void proxyPersistenceContexts(Object bean)
- {
- if ( isSeamComponent() )
- {
- //wrap any @PersistenceContext attributes in our proxy
- for ( BijectedAttribute ba: getComponent().getPersistenceContextAttributes() )
- {
- EntityManager entityManager = (EntityManager) ba.get(bean);
- if ( ! (entityManager instanceof EntityManagerProxy ) )
- {
- ba.set( bean, new EntityManagerProxy(entityManager) );
- }
- }
- }
- }
}
More information about the jboss-cvs-commits
mailing list