[seam-commits] Seam SVN: r9450 - tags/JBoss_Seam_2_1_0_SP1/src/main/org/jboss/seam.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Oct 27 14:53:51 EDT 2008
Author: norman.richards at jboss.com
Date: 2008-10-27 14:53:50 -0400 (Mon, 27 Oct 2008)
New Revision: 9450
Modified:
tags/JBoss_Seam_2_1_0_SP1/src/main/org/jboss/seam/Component.java
Log:
merge 9420:9422 9448:9449 from trunk
Modified: tags/JBoss_Seam_2_1_0_SP1/src/main/org/jboss/seam/Component.java
===================================================================
--- tags/JBoss_Seam_2_1_0_SP1/src/main/org/jboss/seam/Component.java 2008-10-27 18:42:33 UTC (rev 9449)
+++ tags/JBoss_Seam_2_1_0_SP1/src/main/org/jboss/seam/Component.java 2008-10-27 18:53:50 UTC (rev 9450)
@@ -945,6 +945,26 @@
if ( log.isDebugEnabled() ) log.debug("interceptor stack: " + interceptors);
}
+ public void addInterceptor(Object interceptorInstance)
+ {
+ try
+ {
+ addInterceptor(new Interceptor(interceptorInstance, this));
+ }
+ catch (NoClassDefFoundError e)
+ {
+ log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
+ }
+ catch (TypeNotPresentException e)
+ {
+ log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Unable to load interceptor " + interceptorInstance.getClass(), e);
+ }
+ }
+
public void addInterceptor(Interceptor interceptor)
{
if (interceptor.isInterceptorEnabled())
@@ -1021,12 +1041,22 @@
{
Class<?> clazz = Reflections.classForName(interceptorName);
interceptorInstance = clazz.newInstance();
+
}
+ catch (NoClassDefFoundError e)
+ {
+ log.debug("Unable to load interceptor " + interceptorName, e);
+ }
+ catch (TypeNotPresentException e)
+ {
+ log.debug("Unable to load interceptor " + interceptorName, e);
+ }
catch (Exception e)
{
throw new IllegalArgumentException("Unable to load interceptor " + interceptorName, e);
}
- addInterceptor(new Interceptor(interceptorInstance, this));
+ addInterceptor(interceptorInstance);
+
}
}
More information about the seam-commits
mailing list