[jboss-cvs] jboss-seam/src/main/org/jboss/seam/intercept ...
Gavin King
gavin.king at jboss.com
Mon Nov 13 15:11:10 EST 2006
User: gavin
Date: 06/11/13 15:11:10
Modified: src/main/org/jboss/seam/intercept
SessionBeanInterceptor.java
Log:
todo
Revision Changes Path
1.8 +15 -0 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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- SessionBeanInterceptor.java 13 Nov 2006 20:05:17 -0000 1.7
+++ SessionBeanInterceptor.java 13 Nov 2006 20:11:10 -0000 1.8
@@ -13,6 +13,8 @@
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jboss.seam.Component;
import org.jboss.seam.InterceptorType;
import org.jboss.seam.Seam;
@@ -26,6 +28,7 @@
*/
public class SessionBeanInterceptor extends RootInterceptor
{
+ private static final Log log = LogFactory.getLog(SessionBeanInterceptor.class);
public static ThreadLocal<Component> COMPONENT = new ThreadLocal<Component>();
@@ -74,6 +77,10 @@
//the session bean was obtained by the application by
//calling Component.getInstance(), could be a role
//other than the default role
+ if ( log.isTraceEnabled() )
+ {
+ log.trace("post construct phase for instance of component: " + invokingComponent.getName());
+ }
init(invokingComponent);
}
else if ( bean.getClass().isAnnotationPresent(Name.class) )
@@ -82,10 +89,18 @@
//JNDI (or it was an MDB), so assume the default role
//TODO: look at more than just @Name, consider components.xml
String defaultComponentName = bean.getClass().getAnnotation(Name.class).value();
+ if ( log.isTraceEnabled() )
+ {
+ log.trace("post construct phase for component instantiated outside Seam, assuming default role: " + defaultComponentName);
+ }
init( Seam.componentForName( defaultComponentName ) );
}
else
{
+ if ( log.isTraceEnabled() )
+ {
+ log.trace("post construct phase for non-component bean");
+ }
initNonSeamComponent();
}
More information about the jboss-cvs-commits
mailing list