[weld-commits] Weld SVN: r6335 - in core/trunk/impl/src/main: java/org/jboss/weld/bean and 25 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu May 27 15:15:15 EDT 2010


Author: pete.muir at jboss.org
Date: 2010-05-27 15:15:12 -0400 (Thu, 27 May 2010)
New Revision: 6335

Added:
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java
Removed:
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenArgumentException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenStateException.java
   core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidOperationException.java
Modified:
   core/trunk/impl/src/main/java/org/jboss/weld/Container.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacade.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorFactoryBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/PrincipalBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/UserTransactionBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/interceptor/InterceptorBindingsAdapter.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/util/SerializableProxy.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessAnnotatedTypeImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
   core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/NamingScheme.java
   core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/ejb/EjbDescriptors.java
   core/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
   core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
   core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ConversationMessage.java
   core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/manager/SimpleInjectionTarget.java
   core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
   core/trunk/impl/src/main/java/org/jboss/weld/resolution/InterceptorResolvableBuilder.java
   core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableBuilder.java
   core/trunk/impl/src/main/java/org/jboss/weld/servlet/ConversationBeanStore.java
   core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java
   core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
   core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/ApiAbstraction.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/Decorators.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/DeploymentStructures.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/Observers.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/dom/NodeListIterator.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java
   core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties
Log:
Give exceptions their correct name

Modified: core/trunk/impl/src/main/java/org/jboss/weld/Container.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/Container.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/Container.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -27,7 +27,7 @@
 import org.jboss.weld.bootstrap.api.Singleton;
 import org.jboss.weld.bootstrap.api.SingletonProvider;
 import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.logging.LoggerFactory;
 import org.jboss.weld.logging.MessageConveyorFactory;
 import org.jboss.weld.manager.BeanManagerImpl;
@@ -153,7 +153,7 @@
       String id = manager.getId();
       if (manager.getId() == null)
       {
-         throw new ForbiddenArgumentException(NULL_BEAN_MANAGER_ID, manager);
+         throw new IllegalArgumentException(NULL_BEAN_MANAGER_ID, manager);
       }
       managers.put(id, manager);
       return id;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -57,7 +57,7 @@
 import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
 import org.jboss.weld.exceptions.DefinitionException;
 import org.jboss.weld.exceptions.DeploymentException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.injection.CurrentInjectionPoint;
 import org.jboss.weld.injection.InjectionContextImpl;
 import org.jboss.weld.injection.WeldInjectionPoint;
@@ -106,7 +106,7 @@
             InjectionPoint outerDelegateInjectionPoint = Beans.getDelegateInjectionPoint(decorator);
             if (outerDelegateInjectionPoint == null)
             {
-               throw new ForbiddenStateException(DELEGATE_INJECTION_POINT_NOT_FOUND, decorator);
+               throw new IllegalStateException(DELEGATE_INJECTION_POINT_NOT_FOUND, decorator);
             }
             CurrentInjectionPoint currentInjectionPoint = Container.instance().services().get(CurrentInjectionPoint.class);
             if (currentInjectionPoint.peek() != null)
@@ -492,7 +492,7 @@
             }
             else
             {
-               throw new ForbiddenStateException(NON_CONTAINER_DECORATOR, decorator);
+               throw new IllegalStateException(NON_CONTAINER_DECORATOR, decorator);
             }
 
             for (WeldMethod<?, ?> decoratorMethod : decoratorClass.getWeldMethods())

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -34,7 +34,7 @@
 
 import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
 import org.jboss.weld.exceptions.DefinitionException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.injection.MethodInjectionPoint;
 import org.jboss.weld.injection.ParameterInjectionPoint;
 import org.jboss.weld.introspector.WeldMethod;
@@ -289,7 +289,7 @@
       WeldMethod<?, ?> superClassMethod = getDeclaringBean().getWeldAnnotated().getWeldSuperclass().getWeldMethod(getWeldAnnotated().getJavaMember());
       if (environment.getProducerMethod(superClassMethod) == null)
       {
-         throw new ForbiddenStateException(PRODUCER_METHOD_NOT_SPECIALIZING, this);
+         throw new IllegalStateException(PRODUCER_METHOD_NOT_SPECIALIZING, this);
       }
       this.specializedBean = environment.getProducerMethod(superClassMethod);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -65,8 +65,8 @@
 import org.jboss.weld.ejb.spi.EjbServices;
 import org.jboss.weld.exceptions.CreationException;
 import org.jboss.weld.exceptions.DefinitionException;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.WeldException;
 import org.jboss.weld.injection.InjectionContextImpl;
 import org.jboss.weld.introspector.WeldClass;
@@ -298,12 +298,12 @@
    {
       if (environment.getClassBean(getWeldAnnotated().getWeldSuperclass()) == null)
       {
-         throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
+         throw new IllegalStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
       AbstractClassBean<?> specializedBean = environment.getClassBean(getWeldAnnotated().getWeldSuperclass());
       if (!(specializedBean instanceof SessionBean<?>))
       {
-         throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
+         throw new IllegalStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
       else
       {
@@ -348,11 +348,11 @@
    {
       if (instance == null)
       {
-         throw new ForbiddenArgumentException(CANNOT_DESTROY_NULL_BEAN, this);
+         throw new IllegalArgumentException(CANNOT_DESTROY_NULL_BEAN, this);
       }
       if (!(instance instanceof EnterpriseBeanInstance))
       {
-         throw new ForbiddenArgumentException(CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED, instance);
+         throw new IllegalArgumentException(CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED, instance);
       }
       EnterpriseBeanInstance enterpriseBeanInstance = (EnterpriseBeanInstance) instance;
       enterpriseBeanInstance.destroy(Marker.INSTANCE, this, creationalContext);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacade.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacade.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacade.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -26,7 +26,7 @@
 
 import javax.enterprise.inject.spi.InjectionPoint;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 
 /**
@@ -48,7 +48,7 @@
       }
       else
       {
-         throw new ForbiddenStateException(TYPE_PARAMETER_MUST_BE_CONCRETE, injectionPoint);
+         throw new IllegalStateException(TYPE_PARAMETER_MUST_BE_CONCRETE, injectionPoint);
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -21,7 +21,7 @@
 import javax.validation.Validator;
 
 import org.jboss.weld.Container;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.validation.spi.ValidationServices;
 
@@ -50,7 +50,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(VALIDATION_SERVICE_NOT_AVAILABLE);
+            throw new IllegalStateException(VALIDATION_SERVICE_NOT_AVAILABLE);
          }
       }
       

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorFactoryBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorFactoryBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/DefaultValidatorFactoryBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -20,7 +20,7 @@
 
 import javax.validation.ValidatorFactory;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.validation.spi.ValidationServices;
 
@@ -49,7 +49,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(VALIDATION_SERVICE_NOT_AVAILABLE);
+            throw new IllegalStateException(VALIDATION_SERVICE_NOT_AVAILABLE);
          }
       }
       

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -33,7 +33,7 @@
 import org.jboss.weld.bean.proxy.ProxyFactory;
 import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
 import org.jboss.weld.ejb.EJBApiAbstraction;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.introspector.WeldField;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.persistence.PersistenceApiAbstraction;
@@ -77,7 +77,7 @@
             }
             else
             {
-               throw new ForbiddenStateException(BEAN_NOT_EE_RESOURCE_PRODUCER, contextual);
+               throw new IllegalStateException(BEAN_NOT_EE_RESOURCE_PRODUCER, contextual);
             }
          }
          return instance;
@@ -126,7 +126,7 @@
       WSApiAbstraction wsApiAbstraction = beanManager.getServices().get(WSApiAbstraction.class);
       if (!(getWeldAnnotated().isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS)) || getWeldAnnotated().isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS))
       {
-         throw new ForbiddenStateException(INVALID_RESOURCE_PRODUCER_FIELD, getWeldAnnotated());
+         throw new IllegalStateException(INVALID_RESOURCE_PRODUCER_FIELD, getWeldAnnotated());
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/PrincipalBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/PrincipalBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/PrincipalBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -20,7 +20,7 @@
 
 import java.security.Principal;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.security.spi.SecurityServices;
 
@@ -49,7 +49,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(SECURITY_SERVICES_NOT_AVAILABLE);
+            throw new IllegalStateException(SECURITY_SERVICES_NOT_AVAILABLE);
          }
       }
       

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/UserTransactionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/UserTransactionBean.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/UserTransactionBean.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -20,7 +20,7 @@
 
 import javax.transaction.UserTransaction;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.transaction.spi.TransactionServices;
 
@@ -49,7 +49,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(TRANSACTION_SERVICES_NOT_AVAILABLE);
+            throw new IllegalStateException(TRANSACTION_SERVICES_NOT_AVAILABLE);
          }
       }
       

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/interceptor/InterceptorBindingsAdapter.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/interceptor/InterceptorBindingsAdapter.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/interceptor/InterceptorBindingsAdapter.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -33,7 +33,7 @@
 
 import org.jboss.interceptor.model.InterceptionModel;
 import org.jboss.weld.ejb.spi.InterceptorBindings;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.serialization.spi.helpers.SerializableContextual;
 
 /**
@@ -48,7 +48,7 @@
    {
       if (interceptionModel == null)
       {
-         throw new ForbiddenArgumentException(INTERCEPTION_MODEL_NULL);
+         throw new IllegalArgumentException(INTERCEPTION_MODEL_NULL);
       }
       this.interceptionModel = interceptionModel;
    }
@@ -63,19 +63,19 @@
    {
       if (interceptionType == null)
       {
-         throw new ForbiddenArgumentException(INTERCEPTION_TYPE_NULL);
+         throw new IllegalArgumentException(INTERCEPTION_TYPE_NULL);
       }
 
       if (method == null)
       {
-         throw new ForbiddenArgumentException(METHOD_NULL);
+         throw new IllegalArgumentException(METHOD_NULL);
       }
 
       org.jboss.interceptor.model.InterceptionType internalInterceptionType = org.jboss.interceptor.model.InterceptionType.valueOf(interceptionType.name());
 
       if (internalInterceptionType.isLifecycleCallback())
       {
-         throw new ForbiddenArgumentException(INTERCEPTION_TYPE_LIFECYCLE, interceptionType.name());
+         throw new IllegalArgumentException(INTERCEPTION_TYPE_LIFECYCLE, interceptionType.name());
       }
 
       return toInterceptorList(interceptionModel.getInterceptors(internalInterceptionType, method));
@@ -86,14 +86,14 @@
    {
       if (interceptionType == null)
       {
-         throw new ForbiddenArgumentException(INTERCEPTION_TYPE_NULL);
+         throw new IllegalArgumentException(INTERCEPTION_TYPE_NULL);
       }
 
       org.jboss.interceptor.model.InterceptionType internalInterceptionType = org.jboss.interceptor.model.InterceptionType.valueOf(interceptionType.name());
 
       if (!internalInterceptionType.isLifecycleCallback())
       {
-         throw new ForbiddenArgumentException(INTERCEPTION_TYPE_NOT_LIFECYCLE, interceptionType.name());
+         throw new IllegalArgumentException(INTERCEPTION_TYPE_NOT_LIFECYCLE, interceptionType.name());
       }
 
       return toInterceptorList(interceptionModel.getInterceptors(internalInterceptionType, null));

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -27,7 +27,7 @@
 
 import org.jboss.interceptor.util.proxy.TargetInstanceProxyMethodHandler;
 import org.jboss.weld.bean.WeldDecorator;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.introspector.MethodSignature;
 import org.jboss.weld.introspector.WeldMethod;
 import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
@@ -99,7 +99,7 @@
       }
       else
       {
-         throw new ForbiddenStateException(UNEXPECTED_UNWRAPPED_CUSTOM_DECORATOR, beanInstance.getContextual().get());
+         throw new IllegalStateException(UNEXPECTED_UNWRAPPED_CUSTOM_DECORATOR, beanInstance.getContextual().get());
       }
 
       return SecureReflections.invoke(getTargetInstance(), method, args);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/EnterpriseBeanProxyMethodHandler.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -33,7 +33,7 @@
 
 import org.jboss.weld.bean.SessionBean;
 import org.jboss.weld.ejb.api.SessionObjectReference;
-import org.jboss.weld.exceptions.InvalidOperationException;
+import org.jboss.weld.exceptions.UnsupportedOperationException;
 import org.jboss.weld.introspector.MethodSignature;
 import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
 import org.jboss.weld.util.reflection.Reflections;
@@ -116,7 +116,7 @@
          MethodSignature methodSignature = new MethodSignatureImpl(method);
          if (removeMethodSignatures.contains(methodSignature))
          {
-            throw new InvalidOperationException(INVALID_REMOVE_METHOD_INVOCATION, method);
+            throw new UnsupportedOperationException(INVALID_REMOVE_METHOD_INVOCATION, method);
          }
       }
       Class<?> businessInterface = getBusinessInterface(method);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/util/SerializableProxy.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/util/SerializableProxy.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/util/SerializableProxy.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -31,7 +31,7 @@
 
 import org.jboss.weld.Container;
 import org.jboss.weld.bean.proxy.ProxyFactory;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.WeldException;
 import org.jboss.weld.serialization.spi.ProxyServices;
 import org.jboss.weld.util.collections.ArraySet;
@@ -63,7 +63,7 @@
    {
       if (!ProxyFactory.isProxy(proxyObject))
       {
-         throw new ForbiddenStateException(PROXY_REQUIRED);
+         throw new IllegalStateException(PROXY_REQUIRED);
       }
       this.proxyClassName = proxyObject.getClass().getName();
       this.proxySuperClassName = proxyObject.getClass().getSuperclass().getName();

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -72,8 +72,8 @@
 import org.jboss.weld.ejb.EJBApiAbstraction;
 import org.jboss.weld.ejb.EjbDescriptors;
 import org.jboss.weld.ejb.spi.EjbDescriptor;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.injection.CurrentInjectionPoint;
 import org.jboss.weld.jsf.JsfApiAbstraction;
 import org.jboss.weld.logging.messages.VersionMessage;
@@ -195,7 +195,7 @@
          // Check the id is not null
          if (beanDeploymentArchive.getId() == null)
          {
-            throw new ForbiddenArgumentException(DEPLOYMENT_ARCHIVE_NULL, beanDeploymentArchive);
+            throw new IllegalArgumentException(DEPLOYMENT_ARCHIVE_NULL, beanDeploymentArchive);
          }
          
          BeanDeployment parent = managerAwareBeanDeploymentArchives.get(beanDeploymentArchive);
@@ -240,7 +240,7 @@
       {
          if (deployment == null)
          {
-            throw new ForbiddenArgumentException(DEPLOYMENT_REQUIRED);
+            throw new IllegalArgumentException(DEPLOYMENT_REQUIRED);
          }
          if (!deployment.getServices().contains(ResourceLoader.class))
          {
@@ -276,7 +276,7 @@
 //         }
          if (applicationBeanStore == null)
          {
-            throw new ForbiddenStateException(BEAN_STORE_MISSING);
+            throw new IllegalStateException(BEAN_STORE_MISSING);
          }
          
          this.deployment = deployment;
@@ -348,7 +348,7 @@
       {
          if (deploymentManager == null)
          {
-            throw new ForbiddenStateException(MANAGER_NOT_INITIALIZED);
+            throw new IllegalStateException(MANAGER_NOT_INITIALIZED);
          }
          
          ExtensionBeanDeployer extensionBeanDeployer = new ExtensionBeanDeployer(deploymentManager, deployment, beanDeployments);
@@ -470,7 +470,7 @@
       {
          if (!services.contains(serviceType))
          {
-            throw new ForbiddenStateException(UNSPECIFIED_REQUIRED_SERVICE, serviceType.getName());
+            throw new IllegalStateException(UNSPECIFIED_REQUIRED_SERVICE, serviceType.getName());
          }
       }
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessAnnotatedTypeImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessAnnotatedTypeImpl.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessAnnotatedTypeImpl.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -23,7 +23,7 @@
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.ProcessAnnotatedType;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.introspector.WeldClass;
 import org.jboss.weld.manager.BeanManagerImpl;
 
@@ -63,7 +63,7 @@
    {
       if (type == null)
       {
-         throw new ForbiddenArgumentException(ANNOTATION_TYPE_NULL, this);
+         throw new IllegalArgumentException(ANNOTATION_TYPE_NULL, this);
       }
       this.annotatedType = type;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -25,7 +25,7 @@
 import javax.enterprise.inject.spi.SessionBeanType;
 
 import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 
 public class ProcessSessionBeanImpl<X> extends AbstractProcessClassBean<Object, SessionBean<Object>> implements ProcessSessionBean<X>
@@ -67,7 +67,7 @@
       }
       else
       {
-         throw new ForbiddenStateException(BEAN_TYPE_NOT_EJB, getBean());
+         throw new IllegalStateException(BEAN_TYPE_NOT_EJB, getBean());
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -33,8 +33,8 @@
 import org.jboss.weld.Container;
 import org.jboss.weld.context.api.BeanStore;
 import org.jboss.weld.context.api.ContextualInstance;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.serialization.spi.ContextualStore;
 import org.slf4j.cal10n.LocLogger;
 
@@ -87,7 +87,7 @@
       }
       if (contextual == null)
       {
-         throw new ForbiddenArgumentException(CONTEXTUAL_IS_NULL);
+         throw new IllegalArgumentException(CONTEXTUAL_IS_NULL);
       }
       String id = getId(contextual);
       ContextualInstance<T> beanInstance = getBeanStore().get(id);
@@ -140,7 +140,7 @@
    {
       if (getBeanStore() == null)
       {
-         throw new ForbiddenStateException(NO_BEAN_STORE_AVAILABLE, this);
+         throw new IllegalStateException(NO_BEAN_STORE_AVAILABLE, this);
       }
       ContextualInstance<T> beanInstance = getBeanStore().get(id);
       beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
@@ -156,7 +156,7 @@
       log.trace(CONTEXT_CLEARED, this);
       if (getBeanStore() == null)
       {
-         throw new ForbiddenStateException(NO_BEAN_STORE_AVAILABLE, this);
+         throw new IllegalStateException(NO_BEAN_STORE_AVAILABLE, this);
       }
       for (String id : getBeanStore().getContextualIds())
       {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/NamingScheme.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/NamingScheme.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/context/beanstore/NamingScheme.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -18,7 +18,7 @@
 
 import static org.jboss.weld.logging.messages.ContextMessage.DELIMITER_IN_PREFIX;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 
 
 
@@ -36,7 +36,7 @@
    {
       if (prefix.indexOf(delimiter) >= 0)
       {
-         throw new ForbiddenArgumentException(DELIMITER_IN_PREFIX, delimiter, prefix);
+         throw new IllegalArgumentException(DELIMITER_IN_PREFIX, delimiter, prefix);
       }
       this.prefix = prefix;
       this.delimiter = delimiter;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -19,6 +19,7 @@
 import static org.jboss.weld.logging.Category.CONVERSATION;
 import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
 import static org.jboss.weld.logging.messages.ConversationMessage.BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION;
+import static org.jboss.weld.logging.messages.ConversationMessage.CONVERSATION_ID_ALREADY_IN_USE;
 import static org.jboss.weld.logging.messages.ConversationMessage.DEMOTED_LRC;
 import static org.jboss.weld.logging.messages.ConversationMessage.END_CALLED_ON_TRANSIENT_CONVERSATION;
 import static org.jboss.weld.logging.messages.ConversationMessage.PROMOTED_TRANSIENT;
@@ -33,7 +34,7 @@
 import javax.inject.Inject;
 import javax.inject.Named;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.slf4j.cal10n.LocLogger;
 
 /**
@@ -115,7 +116,7 @@
       checkForActiveConversationContext("Conversation.begin()");
       if (!_transient)
       {
-         throw new ForbiddenStateException(BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION);
+         throw new IllegalStateException(BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION);
       }
       log.debug(PROMOTED_TRANSIENT, id);
       _transient = false;
@@ -127,11 +128,11 @@
       checkForActiveConversationContext("Conversation.begin(String)");
       if (!_transient)
       {
-         throw new ForbiddenStateException(BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION);
+         throw new IllegalStateException(BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION);
       }
       if (conversationManager.getConversations().containsKey(id))
       {
-         throw new IllegalStateException("Conversation ID " + id + " is already in use");
+         throw new IllegalStateException(CONVERSATION_ID_ALREADY_IN_USE, id);
       }
       _transient = false;
       this.id = id;
@@ -142,7 +143,7 @@
       checkForActiveConversationContext("Conversation.end()");
       if (_transient)
       {
-         throw new ForbiddenStateException(END_CALLED_ON_TRANSIENT_CONVERSATION);
+         throw new IllegalStateException(END_CALLED_ON_TRANSIENT_CONVERSATION);
       }
       log.debug(DEMOTED_LRC, id);
       _transient = true;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/ejb/EjbDescriptors.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/ejb/EjbDescriptors.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/ejb/EjbDescriptors.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -27,7 +27,7 @@
 
 import org.jboss.weld.bootstrap.api.Service;
 import org.jboss.weld.ejb.spi.EjbDescriptor;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 
 import com.google.common.base.Supplier;
 import com.google.common.collect.Multimaps;
@@ -118,7 +118,7 @@
       Set<String> ejbs = ejbByClass.get(beanClass);
       if (ejbs.size() > 0)
       {
-         throw new ForbiddenStateException(TOO_MANY_EJBS_FOR_CLASS, beanClass, ejbs);
+         throw new IllegalStateException(TOO_MANY_EJBS_FOR_CLASS, beanClass, ejbs);
       }
       else if (ejbs.size() == 0)
       {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -23,7 +23,7 @@
 import javax.el.MethodExpression;
 import javax.el.ValueExpression;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.util.el.ForwardingExpressionFactory;
 
 /**
@@ -39,7 +39,7 @@
    {
       if (expressionFactory == null)
       {
-         throw new ForbiddenArgumentException(NULL_EXPRESSION_FACTORY);
+         throw new IllegalArgumentException(NULL_EXPRESSION_FACTORY);
       }
       this.delegate = expressionFactory;
    }

Deleted: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenArgumentException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenArgumentException.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenArgumentException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.exceptions;
-
-/**
- * This exception is used when the specification calls for an
- * {@link java.lang.IllegalArgumentException}.
- * 
- * @author David Allen
- */
-public class ForbiddenArgumentException extends IllegalArgumentException
-{
-
-   private static final long    serialVersionUID = 2L;
-
-   private WeldExceptionMessage message;
-
-   /**
-    * Creates a new exception with the given cause.
-    * 
-    * @param throwable The cause of the exception
-    */
-   public ForbiddenArgumentException(Throwable throwable)
-   {
-      super(throwable);
-      message = new WeldExceptionStringMessage(throwable.getLocalizedMessage());
-   }
-
-   /**
-    * Creates a new exception with the given localized message key and optional
-    * arguments for the message.
-    * 
-    * @param <E> The enumeration type for the message keys
-    * @param key The localized message to use
-    * @param args Optional arguments to insert into the message
-    */
-   public <E extends Enum<?>> ForbiddenArgumentException(E key, Object... args)
-   {
-      message = new WeldExceptionKeyMessage(key, args);
-   }
-
-   @Override
-   public String getLocalizedMessage()
-   {
-      return getMessage();
-   }
-
-   @Override
-   public String getMessage()
-   {
-      return message.getAsString();
-   }
-}

Deleted: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenStateException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenStateException.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenStateException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.exceptions;
-
-/**
- * This exception is used when the specification calls for an
- * {@link java.lang.IllegalStateException}.
- * 
- * @author David Allen
- */
-public class ForbiddenStateException extends IllegalStateException
-{
-   private static final long    serialVersionUID = 2L;
-
-   private WeldExceptionMessage message;
-
-   /**
-    * Creates a new exception with the given localized message key and optional
-    * arguments for the message.
-    * 
-    * @param <E> The enumeration type for the message keys
-    * @param key The localized message to use
-    * @param args Optional arguments to insert into the message
-    */
-   public <E extends Enum<?>> ForbiddenStateException(E key, Object... args)
-   {
-      message = new WeldExceptionKeyMessage(key, args);
-   }
-
-   /**
-    * Creates a new exception with the given cause.
-    * 
-    * @param throwable The cause of the exception
-    */
-   public ForbiddenStateException(Throwable cause)
-   {
-      super(cause.getLocalizedMessage(), cause);
-   }
-
-   @Override
-   public String getLocalizedMessage()
-   {
-      return getMessage();
-   }
-
-   @Override
-   public String getMessage()
-   {
-      return message.getAsString();
-   }
-}

Copied: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java (from rev 6327, core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenArgumentException.java)
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java	                        (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalArgumentException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.exceptions;
+
+/**
+ * An {@link java.lang.IllegalArgumentException} with support for
+ * localized messages in Weld.
+ * 
+ * @author David Allen
+ */
+public class IllegalArgumentException extends java.lang.IllegalArgumentException
+{
+
+   private static final long    serialVersionUID = 2L;
+
+   private WeldExceptionMessage message;
+
+   /**
+    * Creates a new exception with the given cause.
+    * 
+    * @param throwable The cause of the exception
+    */
+   public IllegalArgumentException(Throwable throwable)
+   {
+      super(throwable);
+      message = new WeldExceptionStringMessage(throwable.getLocalizedMessage());
+   }
+
+   /**
+    * Creates a new exception with the given localized message key and optional
+    * arguments for the message.
+    * 
+    * @param <E> The enumeration type for the message keys
+    * @param key The localized message to use
+    * @param args Optional arguments to insert into the message
+    */
+   public <E extends Enum<?>> IllegalArgumentException(E key, Object... args)
+   {
+      message = new WeldExceptionKeyMessage(key, args);
+   }
+
+   @Override
+   public String getLocalizedMessage()
+   {
+      return getMessage();
+   }
+
+   @Override
+   public String getMessage()
+   {
+      return message.getAsString();
+   }
+}

Copied: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java (from rev 6327, core/trunk/impl/src/main/java/org/jboss/weld/exceptions/ForbiddenStateException.java)
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java	                        (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/IllegalStateException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.exceptions;
+
+/**
+ * An {@link java.lang.IllegalStateException} with support for
+ * localized messages in Weld.
+ * 
+ * @author David Allen
+ */
+public class IllegalStateException extends java.lang.IllegalStateException
+{
+   private static final long    serialVersionUID = 2L;
+
+   private WeldExceptionMessage message;
+
+   /**
+    * Creates a new exception with the given localized message key and optional
+    * arguments for the message.
+    * 
+    * @param <E> The enumeration type for the message keys
+    * @param key The localized message to use
+    * @param args Optional arguments to insert into the message
+    */
+   public <E extends Enum<?>> IllegalStateException(E key, Object... args)
+   {
+      message = new WeldExceptionKeyMessage(key, args);
+   }
+
+   /**
+    * Creates a new exception with the given cause.
+    * 
+    * @param throwable The cause of the exception
+    */
+   public IllegalStateException(Throwable cause)
+   {
+      super(cause.getLocalizedMessage(), cause);
+   }
+
+   @Override
+   public String getLocalizedMessage()
+   {
+      return getMessage();
+   }
+
+   @Override
+   public String getMessage()
+   {
+      return message.getAsString();
+   }
+}

Deleted: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidOperationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidOperationException.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidOperationException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.exceptions;
-
-/**
- * An exception used for unsupported operations or invocations of operations
- * that are invalid in certain contexts.
- * 
- * @author David Allen
- */
-public class InvalidOperationException extends UnsupportedOperationException
-{
-
-   private static final long    serialVersionUID = 2L;
-
-   private WeldExceptionMessage message;
-
-   /**
-    * Creates a new exception with no message.  Here the stacktrace serves as the
-    * main information since it has the method which was invoked causing this
-    * exception.
-    */
-   public InvalidOperationException()
-   {
-      super();
-   }
-
-   /**
-    * Creates a new exception with the given localized message key and optional
-    * arguments for the message.
-    * 
-    * @param <E> The enumeration type for the message keys
-    * @param key The localized message to use
-    * @param args Optional arguments to insert into the message
-    */
-   public <E extends Enum<?>> InvalidOperationException(E key, Object... args)
-   {
-      message = new WeldExceptionKeyMessage(key, args);
-   }
-
-   @Override
-   public String getLocalizedMessage()
-   {
-      return getMessage();
-   }
-
-   @Override
-   public String getMessage()
-   {
-      return message.getAsString();
-   }
-}

Copied: core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java (from rev 6327, core/trunk/impl/src/main/java/org/jboss/weld/exceptions/InvalidOperationException.java)
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java	                        (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/exceptions/UnsupportedOperationException.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.exceptions;
+
+/**
+ * An {@link java.lang.UnsupportedOperationException} with support for
+ * localized messages in Weld.
+ * 
+ * @author David Allen
+ */
+public class UnsupportedOperationException extends java.lang.UnsupportedOperationException
+{
+
+   private static final long    serialVersionUID = 2L;
+
+   private WeldExceptionMessage message;
+
+   /**
+    * Creates a new exception with no message.  Here the stacktrace serves as the
+    * main information since it has the method which was invoked causing this
+    * exception.
+    */
+   public UnsupportedOperationException()
+   {
+      super();
+   }
+
+   /**
+    * Creates a new exception with the given localized message key and optional
+    * arguments for the message.
+    * 
+    * @param <E> The enumeration type for the message keys
+    * @param key The localized message to use
+    * @param args Optional arguments to insert into the message
+    */
+   public <E extends Enum<?>> UnsupportedOperationException(E key, Object... args)
+   {
+      message = new WeldExceptionKeyMessage(key, args);
+   }
+
+   @Override
+   public String getLocalizedMessage()
+   {
+      return getMessage();
+   }
+
+   @Override
+   public String getMessage()
+   {
+      return message.getAsString();
+   }
+}

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -36,9 +36,9 @@
 import javax.enterprise.inject.spi.Annotated;
 import javax.enterprise.inject.spi.Bean;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.InvalidObjectException;
-import org.jboss.weld.exceptions.InvalidOperationException;
+import org.jboss.weld.exceptions.UnsupportedOperationException;
 import org.jboss.weld.introspector.ConstructorSignature;
 import org.jboss.weld.introspector.ForwardingWeldConstructor;
 import org.jboss.weld.introspector.WeldClass;
@@ -166,7 +166,7 @@
 
    public void inject(Object declaringInstance, Object value)
    {
-      throw new InvalidOperationException();
+      throw new UnsupportedOperationException();
    }
 
    /**
@@ -255,7 +255,7 @@
          Bean<T> bean = getDeclaringBean();
          if (constructor == null || bean == null)
          {
-            throw new ForbiddenStateException(ReflectionMessage.UNABLE_TO_GET_CONSTRUCTOR_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), signature);
+            throw new IllegalStateException(ReflectionMessage.UNABLE_TO_GET_CONSTRUCTOR_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), signature);
          }
          return ConstructorInjectionPoint.of(getDeclaringBean(), getWeldConstructor());
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -36,7 +36,7 @@
 import javax.inject.Inject;
 
 import org.jboss.interceptor.util.InterceptionUtils;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.InvalidObjectException;
 import org.jboss.weld.introspector.ForwardingWeldField;
 import org.jboss.weld.introspector.WeldField;
@@ -190,7 +190,7 @@
          Bean<T> bean = getDeclaringBean();
          if (field == null || bean == null)
          {
-            throw new ForbiddenStateException(ReflectionMessage.UNABLE_TO_GET_FIELD_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), fieldName);
+            throw new IllegalStateException(ReflectionMessage.UNABLE_TO_GET_FIELD_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), fieldName);
          }
          return FieldInjectionPoint.of(getDeclaringBean(), getWeldField());
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -35,7 +35,7 @@
 import javax.enterprise.inject.spi.Annotated;
 import javax.enterprise.inject.spi.Bean;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.InvalidObjectException;
 import org.jboss.weld.introspector.ForwardingWeldMethod;
 import org.jboss.weld.introspector.MethodSignature;
@@ -345,7 +345,7 @@
          Bean<T> bean = getDeclaringBean();
          if (method == null || bean == null)
          {
-            throw new ForbiddenStateException(ReflectionMessage.UNABLE_TO_GET_METHOD_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), signature);
+            throw new IllegalStateException(ReflectionMessage.UNABLE_TO_GET_METHOD_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), signature);
          }
          return MethodInjectionPoint.of(getDeclaringBean(), getWeldMethod());
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -35,9 +35,9 @@
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.Decorator;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.InvalidObjectException;
-import org.jboss.weld.exceptions.InvalidOperationException;
+import org.jboss.weld.exceptions.UnsupportedOperationException;
 import org.jboss.weld.introspector.ConstructorSignature;
 import org.jboss.weld.introspector.ForwardingWeldParameter;
 import org.jboss.weld.introspector.MethodSignature;
@@ -104,7 +104,7 @@
 
    public void inject(Object declaringInstance, Object value)
    {
-      throw new InvalidOperationException();
+      throw new UnsupportedOperationException();
    }
 
    @SuppressWarnings("unchecked")
@@ -176,7 +176,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(IP_NOT_CONSTRUCTOR_OR_METHOD, injectionPoint);
+            throw new IllegalStateException(IP_NOT_CONSTRUCTOR_OR_METHOD, injectionPoint);
          }
       }
       
@@ -186,7 +186,7 @@
          Bean<T> bean = getDeclaringBean();
          if (parameter == null || bean == null)
          {
-            throw new ForbiddenStateException(ReflectionMessage.UNABLE_TO_GET_PARAMETER_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), methodSignature, parameterPosition);
+            throw new IllegalStateException(ReflectionMessage.UNABLE_TO_GET_PARAMETER_ON_DESERIALIZATION, getDeclaringBeanId(), getDeclaringWeldClass(), methodSignature, parameterPosition);
          }
          return ParameterInjectionPoint.of(getDeclaringBean(), getWeldParameter());
       }
@@ -207,7 +207,7 @@
             }
             else
             {
-               throw new ForbiddenStateException(PARAM_NOT_IN_PARAM_LIST, parameterPosition, method.getParameters());
+               throw new IllegalStateException(PARAM_NOT_IN_PARAM_LIST, parameterPosition, method.getParameters());
             }
          }
          else if (constructorSignature != null)
@@ -224,12 +224,12 @@
             }
             else
             {
-               throw new ForbiddenStateException(PARAM_NOT_IN_PARAM_LIST, parameterPosition, constructor.getParameters());
+               throw new IllegalStateException(PARAM_NOT_IN_PARAM_LIST, parameterPosition, constructor.getParameters());
             }
          }
          else
          {
-            throw new ForbiddenStateException(CANNOT_READ_OBJECT);
+            throw new IllegalStateException(CANNOT_READ_OBJECT);
          }
          
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -25,7 +25,7 @@
 
 import javax.enterprise.inject.spi.AnnotatedCallable;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.introspector.WeldCallable;
 import org.jboss.weld.introspector.WeldClass;
 import org.jboss.weld.introspector.WeldParameter;
@@ -129,7 +129,7 @@
     */
    public String getName()
    {
-      throw new ForbiddenArgumentException(UNABLE_TO_GET_PARAMETER_NAME);
+      throw new IllegalArgumentException(UNABLE_TO_GET_PARAMETER_NAME);
    }
 
    /**

Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -27,7 +27,7 @@
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpSession;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.slf4j.cal10n.LocLogger;
 
 /**
@@ -92,7 +92,7 @@
       }
       else
       {
-         throw new ForbiddenStateException(IMPROPER_ENVIRONMENT);
+         throw new IllegalStateException(IMPROPER_ENVIRONMENT);
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ConversationMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ConversationMessage.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ConversationMessage.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -58,6 +58,8 @@
    @MessageId("000214") BEGIN_CALLED_ON_LONG_RUNNING_CONVERSATION,
    @MessageId("000215") END_CALLED_ON_TRANSIENT_CONVERSATION,
    @MessageId("000216") NULL_HTTP_SESSION,
-   @MessageId("000217") SWITCHING_MODE_RESETS_TIMEOUTS;
+   @MessageId("000217") SWITCHING_MODE_RESETS_TIMEOUTS,
+   @MessageId("000218") CONVERSATION_ID_ALREADY_IN_USE
+   ;
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -86,8 +86,8 @@
 import org.jboss.weld.el.WeldExpressionFactory;
 import org.jboss.weld.exceptions.AmbiguousResolutionException;
 import org.jboss.weld.exceptions.DeploymentException;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.InjectionException;
 import org.jboss.weld.exceptions.UnproxyableResolutionException;
 import org.jboss.weld.exceptions.UnsatisfiedResolutionException;
@@ -682,7 +682,7 @@
       }
       if (activeContexts.size() > 1)
       {
-         throw new ForbiddenStateException(DUPLICATE_ACTIVE_CONTEXTS, scopeType.getName());
+         throw new IllegalStateException(DUPLICATE_ACTIVE_CONTEXTS, scopeType.getName());
       }
       return activeContexts.iterator().next();
 
@@ -732,19 +732,19 @@
    {
       if (bean == null)
       {
-         throw new ForbiddenArgumentException(NULL_BEAN_ARGUMENT);
+         throw new IllegalArgumentException(NULL_BEAN_ARGUMENT);
       }
       if (beanType == null)
       {
-         throw new ForbiddenArgumentException(NULL_BEAN_TYPE_ARGUMENT);
+         throw new IllegalArgumentException(NULL_BEAN_TYPE_ARGUMENT);
       }
       if (creationalContext == null)
       {
-         throw new ForbiddenArgumentException(NULL_CREATIONAL_CONTEXT_ARGUMENT);
+         throw new IllegalArgumentException(NULL_CREATIONAL_CONTEXT_ARGUMENT);
       }
       if (!Reflections.isAssignableFrom(bean.getTypes(), beanType))
       {
-         throw new ForbiddenArgumentException(SPECIFIED_TYPE_NOT_BEAN_TYPE, beanType, bean );
+         throw new IllegalArgumentException(SPECIFIED_TYPE_NOT_BEAN_TYPE, beanType, bean );
       }
       return getReference(bean, creationalContext, false);
    }
@@ -852,7 +852,7 @@
    {
       if (types.isEmpty())
       {
-         throw new ForbiddenArgumentException(NO_DECORATOR_TYPES);
+         throw new IllegalArgumentException(NO_DECORATOR_TYPES);
       }
    }
 
@@ -931,7 +931,7 @@
    {
       if (!getServices().get(MetaAnnotationStore.class).getScopeModel(scopeType).isNormal())
       {
-         throw new ForbiddenArgumentException(NON_NORMAL_SCOPE, scopeType);
+         throw new IllegalArgumentException(NON_NORMAL_SCOPE, scopeType);
       }
       currentActivities.add(new CurrentActivity(getContext(scopeType), this));
       return this;
@@ -955,7 +955,7 @@
       {
          return activeCurrentActivities.get(0).getManager();
       }
-      throw new ForbiddenStateException(TOO_MANY_ACTIVITIES, currentActivities);
+      throw new IllegalStateException(TOO_MANY_ACTIVITIES, currentActivities);
    }
 
    public ServiceRegistry getServices()
@@ -1090,7 +1090,7 @@
       }
       else
       {
-         throw new ForbiddenArgumentException(NOT_INTERCEPTOR_BINDING_TYPE, bindingType);
+         throw new IllegalArgumentException(NOT_INTERCEPTOR_BINDING_TYPE, bindingType);
       }
    }
 
@@ -1107,7 +1107,7 @@
       }
       else
       {
-         throw new ForbiddenArgumentException(NOT_STEREOTYPE, stereotype);
+         throw new IllegalArgumentException(NOT_STEREOTYPE, stereotype);
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/manager/SimpleInjectionTarget.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/manager/SimpleInjectionTarget.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/manager/SimpleInjectionTarget.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -29,7 +29,7 @@
 import javax.enterprise.inject.spi.InjectionTarget;
 
 import org.jboss.weld.exceptions.DefinitionException;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.exceptions.WeldException;
 import org.jboss.weld.injection.ConstructorInjectionPoint;
 import org.jboss.weld.injection.FieldInjectionPoint;
@@ -106,7 +106,7 @@
          // try again so the correct DefinitionException is thrown
          Beans.getBeanConstructor(null, type);
          // should not be reached
-         throw new ForbiddenStateException(MISSING_BEAN_CONSTRUCTOR_FOUND);
+         throw new IllegalStateException(MISSING_BEAN_CONSTRUCTOR_FOUND);
       }
       return constructor.newInstance(beanManager, ctx);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -22,7 +22,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 
 /**
@@ -69,7 +69,7 @@
          StereotypeModel<?> stereotype = manager.getServices().get(MetaAnnotationStore.class).getStereotype(stereotypeAnnotation.annotationType());
          if (stereotype == null)
          {
-            throw new ForbiddenStateException(STEREOTYPE_NOT_REGISTERED, stereotypeAnnotation);
+            throw new IllegalStateException(STEREOTYPE_NOT_REGISTERED, stereotypeAnnotation);
          }
          if (stereotype.isAlternative())
          {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/resolution/InterceptorResolvableBuilder.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/resolution/InterceptorResolvableBuilder.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/resolution/InterceptorResolvableBuilder.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -30,7 +30,7 @@
 import javax.enterprise.inject.spi.InterceptionType;
 
 import org.jboss.weld.Container;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.metadata.cache.MetaAnnotationStore;
 
 public class InterceptorResolvableBuilder extends ResolvableBuilder
@@ -53,11 +53,11 @@
    {
       if (!Container.instance().services().get(MetaAnnotationStore.class).getInterceptorBindingModel(qualifier.annotationType()).isValid())
       {
-         throw new ForbiddenArgumentException(INTERCEPTOR_RESOLUTION_WITH_NONBINDING_TYPE, qualifier);
+         throw new IllegalArgumentException(INTERCEPTOR_RESOLUTION_WITH_NONBINDING_TYPE, qualifier);
       }
       if (qualifiers.contains(qualifier))
       {
-         throw new ForbiddenArgumentException(DUPLICATE_INTERCEPTOR_BINDING, Arrays.asList(qualifiers));
+         throw new IllegalArgumentException(DUPLICATE_INTERCEPTOR_BINDING, Arrays.asList(qualifiers));
       }
    }
    
@@ -114,7 +114,7 @@
    {
       if (qualifiers.size() == 0)
       {
-         throw new ForbiddenArgumentException(INTERCEPTOR_BINDINGS_EMPTY);
+         throw new IllegalArgumentException(INTERCEPTOR_BINDINGS_EMPTY);
       }
       return new InterceptorResolvableImpl(rawType, types, qualifiers, mappedQualifiers, declaringBean, interceptionType);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableBuilder.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableBuilder.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableBuilder.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -39,7 +39,7 @@
 import javax.inject.Provider;
 
 import org.jboss.weld.Container;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.literal.AnyLiteral;
 import org.jboss.weld.literal.DefaultLiteral;
 import org.jboss.weld.literal.NamedLiteral;
@@ -71,7 +71,7 @@
          this.rawType = Reflections.getRawType(type);
          if (rawType == null)
          {
-            throw new ForbiddenArgumentException(CANNOT_EXTRACT_RAW_TYPE, type);
+            throw new IllegalArgumentException(CANNOT_EXTRACT_RAW_TYPE, type);
          }
          this.types.add(type);
       }
@@ -209,11 +209,11 @@
    {
       if (!Container.instance().services().get(MetaAnnotationStore.class).getBindingTypeModel(qualifier.annotationType()).isValid())
       {
-         throw new ForbiddenArgumentException(INVALID_QUALIFIER, qualifier);
+         throw new IllegalArgumentException(INVALID_QUALIFIER, qualifier);
       }
       if (qualifiers.contains(qualifier))
       {
-         throw new ForbiddenArgumentException(DUPLICATE_QUALIFIERS, Arrays.asList(qualifiers));
+         throw new IllegalArgumentException(DUPLICATE_QUALIFIERS, Arrays.asList(qualifiers));
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ConversationBeanStore.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ConversationBeanStore.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ConversationBeanStore.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -21,7 +21,7 @@
 import org.jboss.weld.context.ConversationContext;
 import org.jboss.weld.context.api.BeanStore;
 import org.jboss.weld.context.beanstore.NamingScheme;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 
 import static org.jboss.weld.logging.messages.ConversationMessage.NULL_HTTP_SESSION;
 
@@ -38,7 +38,7 @@
    {
       if (session == null)
       {
-         throw new ForbiddenArgumentException(NULL_HTTP_SESSION);
+         throw new IllegalArgumentException(NULL_HTTP_SESSION);
       }
       this.namingScheme = new NamingScheme(ConversationContext.class.getName() + "[" + cid + "]", "#");
       if (sessionInvalidated)

Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -22,7 +22,7 @@
 import javax.enterprise.inject.spi.BeanManager;
 import javax.servlet.ServletContext;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.manager.BeanManagerImpl;
 
 /**
@@ -36,12 +36,12 @@
    {
       if (ctx == null)
       {
-         throw new ForbiddenArgumentException(CONTEXT_NULL);
+         throw new IllegalArgumentException(CONTEXT_NULL);
       }
       BeanManagerImpl beanManagerImpl = (BeanManagerImpl) ctx.getAttribute(BeanManager.class.getName());
       if (beanManagerImpl == null)
       {
-         throw new ForbiddenArgumentException(BEAN_MANAGER_NOT_FOUND, ctx);
+         throw new IllegalArgumentException(BEAN_MANAGER_NOT_FOUND, ctx);
       }
       else
       {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -34,7 +34,7 @@
 import org.jboss.weld.context.api.BeanStore;
 import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
 import org.jboss.weld.conversation.ServletConversationManager;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 
 /**
  * Implementation of the Weld lifecycle that can react to servlet events and
@@ -188,7 +188,7 @@
       BeanStore beanStore = RequestBeanStoreCache.get(request);
       if (beanStore == null)
       {
-         throw new ForbiddenStateException(REQUEST_SCOPE_BEAN_STORE_MISSING);
+         throw new IllegalStateException(REQUEST_SCOPE_BEAN_STORE_MISSING);
       }
       lifecycle.endRequest(request.getRequestURI(), beanStore);
       RequestBeanStoreCache.clear(request);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -42,7 +42,7 @@
 import org.jboss.weld.Container;
 import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 import org.jboss.weld.servlet.api.ServletServices;
 import org.jboss.weld.servlet.api.helpers.AbstractServletListener;
@@ -79,12 +79,12 @@
       BeanDeploymentArchive war = Container.instance().services().get(ServletServices.class).getBeanDeploymentArchive(ctx);
       if (war == null)
       {
-         throw new ForbiddenStateException(BEAN_DEPLOYMENT_ARCHIVE_MISSING, ctx);
+         throw new IllegalStateException(BEAN_DEPLOYMENT_ARCHIVE_MISSING, ctx);
       }
       BeanManagerImpl beanManager = Container.instance().beanDeploymentArchives().get(war);
       if (beanManager == null)
       {
-         throw new ForbiddenStateException(BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND, ctx, war);
+         throw new IllegalStateException(BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND, ctx, war);
       }
       return beanManager;
    }
@@ -100,7 +100,7 @@
       }
       if (!Container.instance().services().contains(ServletServices.class))
       {
-         throw new ForbiddenStateException(ILLEGAL_USE_OF_WELD_LISTENER);
+         throw new IllegalStateException(ILLEGAL_USE_OF_WELD_LISTENER);
       }
       sce.getServletContext().setAttribute(BeanManager.class.getName(), getBeanManager(sce.getServletContext()));
    }
@@ -160,7 +160,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
+            throw new IllegalStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
          }
       }
    }
@@ -183,7 +183,7 @@
          }
          else
          {
-            throw new ForbiddenStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
+            throw new IllegalStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
          }
       }
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/ApiAbstraction.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/ApiAbstraction.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/ApiAbstraction.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -20,7 +20,7 @@
 
 import java.lang.annotation.Annotation;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.resources.spi.ResourceLoader;
 import org.jboss.weld.resources.spi.ResourceLoadingException;
 import org.jboss.weld.util.reflection.SecureReflections;
@@ -116,7 +116,7 @@
    {
       if (!clazz.isEnum())
       {
-         throw new ForbiddenArgumentException(CLASS_NOT_ENUM, clazz);
+         throw new IllegalArgumentException(CLASS_NOT_ENUM, clazz);
       }
       try
       {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -72,7 +72,7 @@
 import org.jboss.weld.bean.SessionBean;
 import org.jboss.weld.ejb.EJBApiAbstraction;
 import org.jboss.weld.exceptions.DefinitionException;
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.injection.ConstructorInjectionPoint;
 import org.jboss.weld.injection.FieldInjectionPoint;
 import org.jboss.weld.injection.MethodInjectionPoint;
@@ -795,7 +795,7 @@
    {
       if (injectableFields.size() != initializerMethods.size())
       {
-         throw new ForbiddenArgumentException(INVALID_QUANTITY_INJECTABLE_FIELDS_AND_INITIALIZER_METHODS, injectableFields, initializerMethods);  
+         throw new IllegalArgumentException(INVALID_QUANTITY_INJECTABLE_FIELDS_AND_INITIALIZER_METHODS, injectableFields, initializerMethods);  
       }
       for (int i = 0; i < injectableFields.size(); i++)
       {
@@ -836,11 +836,11 @@
       {
          if (!Container.instance().services().get(MetaAnnotationStore.class).getBindingTypeModel(qualifier.annotationType()).isValid())
          {
-            throw new ForbiddenArgumentException(ANNOTATION_NOT_QUALIFIER, qualifier);
+            throw new IllegalArgumentException(ANNOTATION_NOT_QUALIFIER, qualifier);
          }
          if (checkedNewQualifiers.contains(qualifier))
          {
-            throw new ForbiddenArgumentException(REDUNDANT_QUALIFIER, qualifier, Arrays.asList(newQualifiers));
+            throw new IllegalArgumentException(REDUNDANT_QUALIFIER, qualifier, Arrays.asList(newQualifiers));
          }
          checkedNewQualifiers.add(qualifier);
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Decorators.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Decorators.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Decorators.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -17,7 +17,7 @@
 
 package org.jboss.weld.util;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.introspector.MethodSignature;
 import org.jboss.weld.introspector.WeldClass;
 import org.jboss.weld.introspector.WeldMethod;
@@ -66,6 +66,6 @@
       {
          return (WeldClass<?>) beanManager.createAnnotatedType((Class<?>) ((ParameterizedType) type).getRawType());
       }
-      throw new ForbiddenStateException(UNABLE_TO_PROCESS, type);
+      throw new IllegalStateException(UNABLE_TO_PROCESS, type);
    }
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/DeploymentStructures.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/DeploymentStructures.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/DeploymentStructures.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -23,7 +23,7 @@
 import org.jboss.weld.bootstrap.BeanDeployment;
 import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.weld.bootstrap.spi.Deployment;
-import org.jboss.weld.exceptions.ForbiddenStateException;
+import org.jboss.weld.exceptions.IllegalStateException;
 import org.jboss.weld.manager.BeanManagerImpl;
 
 public class DeploymentStructures
@@ -36,7 +36,7 @@
       BeanDeploymentArchive beanDeploymentArchive = deployment.loadBeanDeploymentArchive(clazz);
       if (beanDeploymentArchive == null)
       {
-         throw new ForbiddenStateException(UNABLE_TO_FIND_BEAN_DEPLOYMENT_ARCHIVE, clazz);
+         throw new IllegalStateException(UNABLE_TO_FIND_BEAN_DEPLOYMENT_ARCHIVE, clazz);
       }
       else
       {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Observers.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Observers.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Observers.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -23,7 +23,7 @@
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.util.reflection.HierarchyDiscovery;
 
 /**
@@ -47,13 +47,13 @@
       }
       else
       {
-         throw new ForbiddenArgumentException(EVENT_TYPE_NOT_ALLOWED, resolvedType);
+         throw new IllegalArgumentException(EVENT_TYPE_NOT_ALLOWED, resolvedType);
       }
       for (Type type : types)
       {
          if (type instanceof TypeVariable<?>)
          {
-            throw new ForbiddenArgumentException(TYPE_PARAMETER_NOT_ALLOWED_IN_EVENT_TYPE, resolvedType);
+            throw new IllegalArgumentException(TYPE_PARAMETER_NOT_ALLOWED_IN_EVENT_TYPE, resolvedType);
          }
       }
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -42,7 +42,7 @@
 import javassist.util.proxy.ProxyFactory;
 import javassist.util.proxy.ProxyObject;
 
-import org.jboss.weld.exceptions.ForbiddenArgumentException;
+import org.jboss.weld.exceptions.IllegalArgumentException;
 import org.jboss.weld.exceptions.UnproxyableResolutionException;
 import org.jboss.weld.exceptions.WeldException;
 import org.jboss.weld.util.reflection.Reflections;
@@ -163,7 +163,7 @@
          }
          else
          {
-            throw new ForbiddenArgumentException(CANNOT_PROXY_NON_CLASS_TYPE, type);
+            throw new IllegalArgumentException(CANNOT_PROXY_NON_CLASS_TYPE, type);
          }
          return this;
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/dom/NodeListIterator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/dom/NodeListIterator.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/dom/NodeListIterator.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -20,7 +20,7 @@
 
 import java.util.Iterator;
 
-import org.jboss.weld.exceptions.InvalidOperationException;
+import org.jboss.weld.exceptions.UnsupportedOperationException;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
@@ -48,7 +48,7 @@
 
    public void remove()
    {
-      throw new InvalidOperationException(XML_DOM_READONLY);
+      throw new UnsupportedOperationException(XML_DOM_READONLY);
    }
    
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java	2010-05-27 19:15:12 UTC (rev 6335)
@@ -35,8 +35,8 @@
 import java.util.List;
 import java.util.Set;
 
-import org.jboss.weld.exceptions.ForbiddenStateException;
-import org.jboss.weld.exceptions.InvalidOperationException;
+import org.jboss.weld.exceptions.IllegalStateException;
+import org.jboss.weld.exceptions.UnsupportedOperationException;
 import org.jboss.weld.util.collections.EnumerationList;
 import org.jboss.weld.util.reflection.SecureReflections;
 import org.slf4j.cal10n.LocLogger;
@@ -138,7 +138,7 @@
     */
    public static <S> DefaultServiceLoader<S> loadInstalled(Class<S> service)
    {
-      throw new InvalidOperationException();
+      throw new UnsupportedOperationException();
    }
 
    private final String serviceFile;
@@ -208,7 +208,7 @@
       catch (IOException e)
       {
          logX.throwing(Level.ERROR, e);
-         throw new ForbiddenStateException(COULD_NOT_READ_SERVICES_FILE, serviceFile);
+         throw new IllegalStateException(COULD_NOT_READ_SERVICES_FILE, serviceFile);
       }
       finally
       {

Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties	2010-05-27 19:03:01 UTC (rev 6334)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/conversation_en.properties	2010-05-27 19:15:12 UTC (rev 6335)
@@ -22,3 +22,4 @@
 END_CALLED_ON_TRANSIENT_CONVERSATION=Attempt to call end() on a transient conversation
 NULL_HTTP_SESSION=Cannot create ConversationBeanStore with a null HTTP session
 SWITCHING_MODE_RESETS_TIMEOUTS=Switching modes with non-transient conversations present resets the timeouts
+CONVERSATION_ID_ALREADY_IN_USE=Conversation ID {0} is already in use
\ No newline at end of file



More information about the weld-commits mailing list