openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1663887 [2/2] - in /openwebbeans/trunk: webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/ webbeans-impl/src/main/java/org/apache/webbeans/annotation/ webbeans-impl/src/main/java/org/apac...
Date Wed, 04 Mar 2015 08:38:20 GMT
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/AbstractProxyFactory.java
Wed Mar  4 08:38:18 2015
@@ -30,6 +30,7 @@ import java.util.Arrays;
 import java.util.logging.Logger;
 
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.ProxyGenerationException;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.xbean.asm5.ClassWriter;
@@ -106,7 +107,7 @@ public abstract class AbstractProxyFacto
      * @param cw
      * @param classToProxy
      * @param classFileName
-     * @throws ProxyGenerationException
+     * @throws org.apache.webbeans.exception.ProxyGenerationException
      */
     protected abstract void createConstructor(ClassWriter cw, String proxyClassFileName,
Class<?> classToProxy, String classFileName, Constructor<?> injectConstructor)
             throws ProxyGenerationException;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java
Wed Mar  4 08:38:18 2015
@@ -20,6 +20,7 @@ package org.apache.webbeans.proxy;
 
 
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.ProxyGenerationException;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.util.Asserts;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
Wed Mar  4 08:38:18 2015
@@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentMa
 import org.apache.webbeans.component.OwbBean;
 import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.ProxyGenerationException;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler;
 import org.apache.webbeans.util.ClassUtil;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
Wed Mar  4 08:38:18 2015
@@ -24,6 +24,7 @@ import java.lang.reflect.Modifier;
 import java.util.List;
 
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.ProxyGenerationException;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.xbean.asm5.ClassWriter;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Wed Mar  4 08:38:18 2015
@@ -38,9 +38,9 @@ import java.util.Set;
 
 import javax.enterprise.inject.spi.InjectionPoint;
 
+import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
 
-import javax.enterprise.inject.spi.DefinitionException;
 
 /**
  * Utility classes with respect to the class operations.
@@ -813,7 +813,7 @@ public final class ClassUtil
             Type[] bounds = wildcardType.getUpperBounds();
             if (bounds.length > 1)
             {
-                throw new DefinitionException("Illegal use of wild card type with more than
one upper bound: " + wildcardType);
+                throw new WebBeansConfigurationException("Illegal use of wild card type with
more than one upper bound: " + wildcardType);
             }
             else if (bounds.length == 0)
             {
@@ -829,7 +829,7 @@ public final class ClassUtil
             TypeVariable<?> typeVariable = (TypeVariable<?>)type;
             if (typeVariable.getBounds().length > 1)
             {
-                throw new DefinitionException("Illegal use of type variable with more than
one bound: " + typeVariable);
+                throw new WebBeansConfigurationException("Illegal use of type variable with
more than one bound: " + typeVariable);
             }
             else
             {
@@ -846,7 +846,7 @@ public final class ClassUtil
         }
         else
         {
-            throw new DefinitionException("Unsupported type " + type);
+            throw new WebBeansConfigurationException("Unsupported type " + type);
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SpecializationUtil.java
Wed Mar  4 08:38:18 2015
@@ -37,7 +37,7 @@ import org.apache.webbeans.config.OWBLog
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansDeploymentException;
-import org.apache.webbeans.exception.inject.InconsistentSpecializationException;
+import org.apache.webbeans.exception.InconsistentSpecializationException;
 import org.apache.webbeans.inject.AlternativesManager;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Wed Mar  4 08:38:18 2015
@@ -55,11 +55,11 @@ import org.apache.webbeans.config.OwbPar
 import org.apache.webbeans.config.OwbWildcardTypeImpl;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.AnnotatedTypeWrapper;
-import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.container.InjectionResolver;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 
 
+import org.apache.webbeans.exception.WebBeansDeploymentException;
 import org.apache.webbeans.inject.AlternativesManager;
 import org.apache.webbeans.plugins.PluginLoader;
 import org.apache.webbeans.portable.AbstractProducer;
@@ -104,7 +104,6 @@ import javax.enterprise.inject.spi.BeanA
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.BeforeBeanDiscovery;
 import javax.enterprise.inject.spi.BeforeShutdown;
-import javax.enterprise.inject.spi.DefinitionException;
 import javax.enterprise.inject.spi.DeploymentException;
 import javax.enterprise.inject.spi.Extension;
 import javax.enterprise.inject.spi.InjectionPoint;
@@ -688,7 +687,7 @@ public final class WebBeansUtil
                     Class superClass = b.getBeanClass().getSuperclass();
                     if (classesDisabledDueToSpecialization.contains(superClass))
                     {
-                        throw new DeploymentException("Multiple specializations for the same
producer method got detected for type"
+                        throw new WebBeansDeploymentException("Multiple specializations for
the same producer method got detected for type"
                                 + b.toString());
                     }
                     classesDisabledDueToSpecialization.add(superClass);
@@ -764,7 +763,7 @@ public final class WebBeansUtil
                         {
                             if (disabledProducerMethods.contains(superMethod))
                             {
-                                throw new DefinitionException("Multiple specializations for
the same producer method got detected for type"
+                                throw new WebBeansConfigurationException("Multiple specializations
for the same producer method got detected for type"
                                         + pbean.toString());
                             }
                             disabledProducerMethods.add(superMethod);
@@ -1056,7 +1055,7 @@ public final class WebBeansUtil
         GProcessProducer processProducerEvent = new GProcessProducer(producer, annotatedMember);
         //Fires ProcessProducer
         webBeansContext.getBeanManagerImpl().fireEvent(processProducerEvent, true, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
-        webBeansContext.getWebBeansUtil().inspectErrorStack("There are errors that are added
by ProcessProducer event observers. Look at logs for further details");
+        webBeansContext.getWebBeansUtil().inspectDefinitionErrorStack("There are errors that
are added by ProcessProducer event observers. Look at logs for further details");
         Producer prod = processProducerEvent.getProducer();
         processProducerEvent.setStarted();
         return prod;
@@ -1292,11 +1291,9 @@ public final class WebBeansUtil
         return ((OwbBean) bean).isDependent();
     }
 
-    public void inspectErrorStack(String logMessage)
+    public void inspectDefinitionErrorStack(String logMessage)
     {
-        BeanManagerImpl manager = webBeansContext.getBeanManagerImpl();
-        //Looks for errors
-        ErrorStack stack = manager.getErrorStack();
+        ErrorStack stack = webBeansContext.getBeanManagerImpl().getErrorStack();
         try
         {
             if(stack.hasErrors())
@@ -1309,6 +1306,24 @@ public final class WebBeansUtil
         {
             stack.clear();
         }
+
+    }
+
+    public void inspectDeploymentErrorStack(String logMessage)
+    {
+        ErrorStack stack = webBeansContext.getBeanManagerImpl().getErrorStack();
+        try
+        {
+            if(stack.hasErrors())
+            {
+                stack.logErrors();
+                throw new WebBeansDeploymentException(logMessage);
+            }
+        }
+        finally
+        {
+            stack.clear();
+        }
     }
 
     /**
@@ -1511,7 +1526,8 @@ public final class WebBeansUtil
 
         if(Modifier.isFinal(clazz.getModifiers()) && hasClassInterceptors)
         {
-            throw new WebBeansConfigurationException("Final managed bean class with name
: " + clazz.getName() + " can not define any InterceptorBindings");
+            // spec section 3.15 unproxyable bean types -> Deployment Error
+            throw new WebBeansDeploymentException("Final managed bean class with name : "
+ clazz.getName() + " can not define any InterceptorBindings");
         }
 
         Set<AnnotatedMethod<? super X>> methods = webBeansContext.getAnnotatedElementFactory().getFilteredAnnotatedMethods(type);
@@ -1523,14 +1539,16 @@ public final class WebBeansUtil
             {
                 if (hasClassInterceptors)
                 {
-                    throw new WebBeansConfigurationException("Maanged bean class : " + clazz.getName()
+                    // spec section 3.15 unproxyable bean types -> Deployment Error
+                    throw new WebBeansDeploymentException("Maanged bean class : " + clazz.getName()
                                                     + " can not define non-static, non-private
final methods. Because it is annotated with at least one @InterceptorBinding");
                 }
 
                 if (annotationManager.hasInterceptorBindingMetaAnnotation(
                     AnnotationUtil.asArray(methodA.getAnnotations())))
                 {
-                    throw new WebBeansConfigurationException("Method : " + method.getName()
+ "in managed bean class : " + clazz.getName()
+                    // spec section 3.15 unproxyable bean types -> Deployment Error
+                    throw new WebBeansDeploymentException("Method : " + method.getName()
+ "in managed bean class : " + clazz.getName()
                                                     + " can not be defined as non-static,
non-private and final . Because it is annotated with at least one @InterceptorBinding");
                 }
             }
@@ -1624,7 +1642,7 @@ public final class WebBeansUtil
                     Type[] types = ClassUtil.getActualTypeArguments(injectionPoint.getType());
                     if (types.length != 1 || !GenericsUtil.isAssignableFrom(false, AbstractProducerBean.class.isInstance(bean),
bean.getBeanClass(), types[0]))
                     {
-                        throw new DefinitionException("injected bean parameter must be "
+ rawType);
+                        throw new WebBeansConfigurationException("injected bean parameter
must be " + rawType);
                     }
                 }
 
@@ -1648,7 +1666,7 @@ public final class WebBeansUtil
 
                             if (!methodDeclared)
                             {
-                                throw new DefinitionException("Decorator must not declare
abstract methods which is not declared in any Decorated type.");
+                                throw new WebBeansConfigurationException("Decorator must
not declare abstract methods which is not declared in any Decorated type.");
                             }
                         }
                     }
@@ -1684,14 +1702,14 @@ public final class WebBeansUtil
                     && javax.enterprise.inject.spi.Decorator.class == ParameterizedType.class.cast(injectionPoint.getType()).getRawType()
                     && !isDecorator)
             {
-                throw new DefinitionException("@Inject Decorator<X> only supported
in decorators");
+                throw new WebBeansConfigurationException("@Inject Decorator<X> only
supported in decorators");
             }
             if (injectionPoint.getQualifiers().contains(DefaultLiteral.INSTANCE)
                     && ParameterizedType.class.isInstance(injectionPoint.getType())
                     && Interceptor.class == ParameterizedType.class.cast(injectionPoint.getType()).getRawType()
                     && !isInterceptor)
             {
-                throw new DefinitionException("@Inject Interceptor<X> only supported
in interceptors");
+                throw new WebBeansConfigurationException("@Inject Interceptor<X> only
supported in interceptors");
             }
         }
     }
@@ -1793,12 +1811,12 @@ public final class WebBeansUtil
         }
         catch (final Exception e)
         {
-            throw new DefinitionException("event ProcessBeanAttributes thrown an exception
for " + annotatedType, e);
+            throw new WebBeansConfigurationException("event ProcessBeanAttributes thrown
an exception for " + annotatedType, e);
         }
 
         if (event.getDefinitionError() != null)
         {
-            throw new DefinitionException(event.getDefinitionError());
+            throw new WebBeansConfigurationException(event.getDefinitionError());
         }
 
         final BeanAttributes<T> beanAttributes;
@@ -1807,7 +1825,7 @@ public final class WebBeansUtil
             beanAttributes = event.getAttributes();
             if (!webBeansContext.getBeanManagerImpl().isScope(beanAttributes.getScope()))
             {
-                throw new DefinitionException(beanAttributes.getScope() + " is not a scope");
+                throw new WebBeansConfigurationException(beanAttributes.getScope() + " is
not a scope");
             }
         }
         else
@@ -1839,7 +1857,7 @@ public final class WebBeansUtil
                     final Type beanType = pt.getActualTypeArguments()[0];
                     if (!GenericsUtil.isAssignableFrom(false, AbstractProducerBean.class.isInstance(bean),
beanClass, beanType))
                     {
-                        throw new DefinitionException("@Inject Bean<X> can only be
done in X, found " + beanType + " and " + beanClass);
+                        throw new WebBeansConfigurationException("@Inject Bean<X> can
only be done in X, found " + beanType + " and " + beanClass);
                     }
                 }
             }
@@ -1855,12 +1873,12 @@ public final class WebBeansUtil
             if (types.length != 1 ||
                     !((javax.enterprise.inject.spi.Decorator) bean).getDecoratedTypes().contains(types[0]))
             {
-                throw new DefinitionException("ParametrizedType must be a DecoratedType");
+                throw new WebBeansConfigurationException("ParametrizedType must be a DecoratedType");
             }
         }
         else
         {
-            throw new DefinitionException(injectionPoint.getBean().getBeanClass() + " must
be a Decorator");
+            throw new WebBeansConfigurationException(injectionPoint.getBean().getBeanClass()
+ " must be a Decorator");
         }
     }
 
@@ -1874,12 +1892,12 @@ public final class WebBeansUtil
                     ((WildcardType) types[0]).getLowerBounds().length > 0 ||
                     !(((WildcardType) types[0]).getUpperBounds().length == 1 && Object.class.equals(((WildcardType)
types[0]).getUpperBounds()[0])))
             {
-                throw new DefinitionException("Type parameter for interceptor " + bean.getBeanClass()
+ " must be an unbound wildcard");
+                throw new WebBeansConfigurationException("Type parameter for interceptor
" + bean.getBeanClass() + " must be an unbound wildcard");
             }
         }
         else
         {
-            throw new DefinitionException(bean.getBeanClass() + " must be an Interceptor");
+            throw new WebBeansConfigurationException(bean.getBeanClass() + " must be an Interceptor");
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
Wed Mar  4 08:38:18 2015
@@ -18,7 +18,6 @@
  */
 package org.apache.webbeans.xml;
 
-import javax.enterprise.inject.spi.DefinitionException;
 import javax.enterprise.inject.spi.DeploymentException;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -120,7 +119,7 @@ public class DefaultBeanArchiveService i
     {
         if (beansXmlUrl == null)
         {
-            throw new DefinitionException("beans.xml URL must be given!");
+            throw new WebBeansConfigurationException("beans.xml URL must be given!");
         }
 
         if (!beansXmlLocation.endsWith(".xml"))

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/resolution/InterceptorProxyChainTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/resolution/InterceptorProxyChainTest.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/resolution/InterceptorProxyChainTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/resolution/InterceptorProxyChainTest.java
Wed Mar  4 08:38:18 2015
@@ -38,7 +38,7 @@ import org.apache.webbeans.test.intercep
 import org.apache.webbeans.proxy.InterceptorDecoratorProxyFactory;
 import org.apache.webbeans.proxy.InterceptorHandler;
 import org.apache.webbeans.proxy.NormalScopeProxyFactory;
-import org.apache.webbeans.proxy.ProxyGenerationException;
+import org.apache.webbeans.exception.ProxyGenerationException;
 import org.apache.webbeans.test.component.intercept.webbeans.ActionInterceptor;
 import org.apache.webbeans.test.component.intercept.webbeans.SecureInterceptor;
 import org.apache.webbeans.test.component.intercept.webbeans.TransactionalInterceptor;

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/multiple/MultipleSpecializationTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/multiple/MultipleSpecializationTest.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/multiple/MultipleSpecializationTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/multiple/MultipleSpecializationTest.java
Wed Mar  4 08:38:18 2015
@@ -81,7 +81,7 @@ public class MultipleSpecializationTest
 
         Assert.assertNotNull(occuredException);
         Assert.assertEquals(WebBeansConfigurationException.class.getName(), occuredException.getClass().getName());
-        Assert.assertEquals(DefinitionException.class.getName(), occuredException.getCause().getClass().getName());
+        Assert.assertTrue(occuredException.getCause() instanceof DefinitionException);
         
         shutDownContainer();
     }

Modified: openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatWebPlugin.java
Wed Mar  4 08:38:18 2015
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpSessionAtt
 import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionListener;
 
-import javax.enterprise.inject.spi.DefinitionException;
+import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.spi.SecurityService;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansWebPlugin;
@@ -86,7 +86,7 @@ public class TomcatWebPlugin extends Abs
                 ServletRequestListener.class.isAssignableFrom(clazz) ||
                 ServletRequestAttributeListener.class.isAssignableFrom(clazz) )
         {
-            throw new DefinitionException("Given class  : " + clazz.getName() + " is not
managed bean");
+            throw new WebBeansConfigurationException("Given class  : " + clazz.getName()
+ " is not managed bean");
         }
     }
     

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java?rev=1663887&r1=1663886&r2=1663887&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat7/TomcatWebPlugin.java
Wed Mar  4 08:38:18 2015
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpSessionAtt
 import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionListener;
 
-import javax.enterprise.inject.spi.DefinitionException;
+import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.spi.SecurityService;
 import org.apache.webbeans.spi.plugins.AbstractOwbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansWebPlugin;
@@ -86,7 +86,7 @@ public class TomcatWebPlugin extends Abs
             ServletRequestListener.class.isAssignableFrom(clazz) ||
             ServletRequestAttributeListener.class.isAssignableFrom(clazz) )
         {
-            throw new DefinitionException("Given class  : " + clazz.getName() + " is not
managed bean");
+            throw new WebBeansConfigurationException("Given class  : " + clazz.getName()
+ " is not managed bean");
         }
     }
     



Mime
View raw message