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

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Nov 11 16:19:05 EST 2009


Author: dallen6
Date: 2009-11-11 16:19:05 -0500 (Wed, 11 Nov 2009)
New Revision: 4990

Added:
   core/trunk/impl/src/main/java/org/jboss/weld/CreationException.java
Modified:
   core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.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/logging/messages/BeanMessage.java
   core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BootstrapMessage.java
   core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
   core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties
Log:
Additional exception conversion for localized messages

Added: core/trunk/impl/src/main/java/org/jboss/weld/CreationException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/CreationException.java	                        (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/CreationException.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, 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;
+
+import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import ch.qos.cal10n.IMessageConveyor;
+
+/**
+ * A version of {@link javax.enterprise.inject.CreationException} that supports
+ * message localization.
+ * 
+ * @author David Allen
+ *
+ */
+public class CreationException extends javax.enterprise.inject.CreationException
+{
+
+   private static final long serialVersionUID = 5167626747306493463L;
+
+   // Exception messages
+   private static final IMessageConveyor messageConveyer  = loggerFactory().getMessageConveyor();
+
+   public <E extends Enum<?>> CreationException(E key, Object... args)
+   {
+      super(messageConveyer.getMessage(key, args));
+   }
+
+   public <E extends Enum<?>> CreationException(E key, Throwable throwable, Object... args)
+   {
+      super(messageConveyer.getMessage(key, args), throwable);
+   }
+}


Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/CreationException.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

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	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -16,6 +16,19 @@
  */
 package org.jboss.weld.bean;
 
+import static org.jboss.weld.logging.messages.BeanMessage.CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED;
+import static org.jboss.weld.logging.messages.BeanMessage.CANNOT_DESTROY_NULL_BEAN;
+import static org.jboss.weld.logging.messages.BeanMessage.EJB_CANNOT_BE_DECORATOR;
+import static org.jboss.weld.logging.messages.BeanMessage.EJB_CANNOT_BE_INTERCEPTOR;
+import static org.jboss.weld.logging.messages.BeanMessage.EJB_NOT_FOUND;
+import static org.jboss.weld.logging.messages.BeanMessage.MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED;
+import static org.jboss.weld.logging.messages.BeanMessage.OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS;
+import static org.jboss.weld.logging.messages.BeanMessage.PROXY_INSTANTIATION_BEAN_ACCESS_FAILED;
+import static org.jboss.weld.logging.messages.BeanMessage.PROXY_INSTANTIATION_FAILED;
+import static org.jboss.weld.logging.messages.BeanMessage.SCOPE_NOT_ALLOWED_ON_SINGLETON_BEAN;
+import static org.jboss.weld.logging.messages.BeanMessage.SCOPE_NOT_ALLOWED_ON_STATELESS_SESSION_BEAN;
+import static org.jboss.weld.logging.messages.BeanMessage.SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN;
+
 import java.io.Serializable;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
@@ -31,7 +44,6 @@
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.event.Observes;
-import javax.enterprise.inject.CreationException;
 import javax.enterprise.inject.Typed;
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.enterprise.inject.spi.InjectionTarget;
@@ -39,7 +51,11 @@
 
 import org.jboss.interceptor.model.InterceptionModel;
 import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.CreationException;
 import org.jboss.weld.DefinitionException;
+import org.jboss.weld.ForbiddenArgumentException;
+import org.jboss.weld.ForbiddenStateException;
+import org.jboss.weld.WeldException;
 import org.jboss.weld.bean.interceptor.InterceptorBindingsAdapter;
 import org.jboss.weld.bean.proxy.EnterpriseBeanInstance;
 import org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler;
@@ -170,15 +186,15 @@
                }
                catch (InstantiationException e)
                {
-                  throw new RuntimeException("Could not instantiate enterprise proxy for " + toString(), e);
+                  throw new WeldException(PROXY_INSTANTIATION_FAILED, e, this);
                }
                catch (IllegalAccessException e)
                {
-                  throw new RuntimeException("Could not access bean correctly when creating enterprise proxy for " + toString(), e);
+                  throw new WeldException(PROXY_INSTANTIATION_BEAN_ACCESS_FAILED, e, this);
                }
                catch (Exception e)
                {
-                  throw new CreationException("could not find the EJB in JNDI " + proxyClass, e);
+                  throw new CreationException(EJB_NOT_FOUND, e, proxyClass);
                }
             }
             
@@ -217,11 +233,11 @@
    {
       if (getType().isAnnotationPresent(Interceptor.class))
       {
-         throw new DefinitionException("Enterprise beans cannot be interceptors");
+         throw new DefinitionException(EJB_CANNOT_BE_INTERCEPTOR, getType());
       }
       if (getType().isAnnotationPresent(Decorator.class))
       {
-         throw new DefinitionException("Enterprise beans cannot be decorators");
+         throw new DefinitionException(EJB_CANNOT_BE_DECORATOR, getType());
       }
    }
 
@@ -233,11 +249,11 @@
    {
       if (ejbDescriptor.isStateless() && !isDependent())
       {
-         throw new DefinitionException("Scope " + getScope() + " is not allowed on stateless enterprise beans for " + getType() + ". Only @Dependent is allowed on stateless enterprise beans");
+         throw new DefinitionException(SCOPE_NOT_ALLOWED_ON_STATELESS_SESSION_BEAN, getScope(), getType());
       }
       if (ejbDescriptor.isSingleton() && !(isDependent() || getScope().equals(ApplicationScoped.class)))
       {
-         throw new DefinitionException("Scope " + getScope() + " is not allowed on singleton enterprise beans for " + getType() + ". Only @Dependent or @ApplicationScoped is allowed on singleton enterprise beans");
+         throw new DefinitionException(SCOPE_NOT_ALLOWED_ON_SINGLETON_BEAN, getScope(), getType());
       }
    }
 
@@ -251,7 +267,7 @@
       // We appear to check this twice?
       if (!environment.getEjbDescriptors().contains(getAnnotatedItem().getWeldSuperclass().getJavaClass()))
       {
-         throw new DefinitionException("Annotation defined specializing EJB must have EJB superclass");
+         throw new DefinitionException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
    }
 
@@ -260,12 +276,12 @@
    {
       if (environment.getClassBean(getAnnotatedItem().getWeldSuperclass()) == null)
       {
-         throw new IllegalStateException(toString() + " does not specialize a bean");
+         throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
       AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWeldSuperclass());
       if (!(specializedBean instanceof SessionBean<?>))
       {
-         throw new IllegalStateException(toString() + " doesn't have a session bean as a superclass " + specializedBean);
+         throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
       else
       {
@@ -292,11 +308,11 @@
    {
       if (instance == null)
       {
-         throw new IllegalArgumentException("instance to destroy cannot be null");
+         throw new ForbiddenArgumentException(CANNOT_DESTROY_NULL_BEAN, this);
       }
       if (!(instance instanceof EnterpriseBeanInstance))
       {
-         throw new IllegalArgumentException("Cannot destroy session bean instance not created by the container");
+         throw new ForbiddenArgumentException(CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED, instance);
       }
       EnterpriseBeanInstance enterpriseBeanInstance = (EnterpriseBeanInstance) instance;
       enterpriseBeanInstance.destroy(Marker.INSTANCE, this, creationalContext);
@@ -310,7 +326,7 @@
    {
       if (ejbDescriptor.isMessageDriven())
       {
-         throw new DefinitionException("Message Driven Beans can't be Managed Beans");
+         throw new DefinitionException(MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED, this);
       }
    }
 
@@ -372,7 +388,7 @@
          {
             if (!isMethodExistsOnTypes(method))
             {
-               throw new DefinitionException("Observer method must be static or business method: " + method + " on " + getAnnotatedItem());
+               throw new DefinitionException(OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS, method, getAnnotatedItem());
             }
          }
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -16,6 +16,8 @@
  */
 package org.jboss.weld.bootstrap;
 
+import static org.jboss.weld.logging.messages.BootstrapMessage.BEAN_IS_BOTH_INTERCEPTOR_AND_DECORATOR;
+
 import java.util.HashSet;
 import java.util.Set;
 
@@ -130,7 +132,7 @@
    {
       if (clazz.isAnnotationPresent(Decorator.class))
       {
-         throw new DeploymentException("Class " + clazz.getName() + " has both @Interceptor and @Decorator annotations");
+         throw new DeploymentException(BEAN_IS_BOTH_INTERCEPTOR_AND_DECORATOR, clazz.getName());
       }
    }
 
@@ -138,7 +140,7 @@
    {
       if (clazz.isAnnotationPresent(Interceptor.class))
       {
-         throw new DeploymentException("Class " + clazz.getName() + " has both @Interceptor and @Decorator annotations");
+         throw new DeploymentException(BEAN_IS_BOTH_INTERCEPTOR_AND_DECORATOR, clazz.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	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -19,7 +19,12 @@
 import static org.jboss.weld.logging.Category.BOOTSTRAP;
 import static org.jboss.weld.logging.Category.VERSION;
 import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import static org.jboss.weld.logging.messages.BootstrapMessage.BEAN_STORE_MISSING;
+import static org.jboss.weld.logging.messages.BootstrapMessage.DEPLOYMENT_ARCHIVE_NULL;
+import static org.jboss.weld.logging.messages.BootstrapMessage.DEPLOYMENT_REQUIRED;
 import static org.jboss.weld.logging.messages.BootstrapMessage.JTA_UNAVAILABLE;
+import static org.jboss.weld.logging.messages.BootstrapMessage.MANAGER_NOT_INITIALIZED;
+import static org.jboss.weld.logging.messages.BootstrapMessage.UNSPECIFIED_REQUIRED_SERVICE;
 import static org.jboss.weld.logging.messages.BootstrapMessage.VALIDATING_BEANS;
 
 import java.net.URL;
@@ -30,13 +35,14 @@
 import java.util.Set;
 import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
- 
 
 import javax.enterprise.inject.spi.Extension;
 
 import org.jboss.weld.BeanManagerImpl;
 import org.jboss.weld.Container;
 import org.jboss.weld.ContextualStoreImpl;
+import org.jboss.weld.ForbiddenArgumentException;
+import org.jboss.weld.ForbiddenStateException;
 import org.jboss.weld.Validator;
 import org.jboss.weld.Container.Status;
 import org.jboss.weld.bean.builtin.BeanManagerBean;
@@ -187,7 +193,7 @@
          // Check the id is not null
          if (beanDeploymentArchive.getId() == null)
          {
-            throw new IllegalArgumentException("BeanDeploymentArchive must not be null " + beanDeploymentArchive);
+            throw new ForbiddenArgumentException(DEPLOYMENT_ARCHIVE_NULL, beanDeploymentArchive);
          }
          
          BeanDeployment parent = managerAwareBeanDeploymentArchives.get(beanDeploymentArchive);
@@ -233,7 +239,7 @@
       {
          if (deployment == null)
          {
-            throw new IllegalArgumentException("Must start the container with a deployment");
+            throw new ForbiddenArgumentException(DEPLOYMENT_REQUIRED);
          }
          if (!deployment.getServices().contains(ResourceLoader.class))
          {
@@ -265,7 +271,7 @@
 //         }
          if (applicationBeanStore == null)
          {
-            throw new IllegalStateException("No application context BeanStore set");
+            throw new ForbiddenStateException(BEAN_STORE_MISSING);
          }
          
          this.deployment = deployment;
@@ -335,7 +341,7 @@
       {
          if (deploymentManager == null)
          {
-            throw new IllegalStateException("Manager has not been initialized");
+            throw new ForbiddenStateException(MANAGER_NOT_INITIALIZED);
          }
          
          ExtensionBeanDeployer extensionBeanDeployer = new ExtensionBeanDeployer(deploymentManager, deployment, beanDeployments);
@@ -446,7 +452,7 @@
       {
          if (!services.contains(serviceType))
          {
-            throw new IllegalStateException("Required service " + serviceType.getName() + " has not been specified");
+            throw new ForbiddenStateException(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	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessAnnotatedTypeImpl.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -16,12 +16,15 @@
  */
 package org.jboss.weld.bootstrap.events;
 
+import static org.jboss.weld.logging.messages.BootstrapMessage.ANNOTATION_TYPE_NULL;
+
 import java.lang.reflect.Type;
 
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.ProcessAnnotatedType;
 
 import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.ForbiddenArgumentException;
 import org.jboss.weld.introspector.WeldClass;
 
 /**
@@ -60,7 +63,7 @@
    {
       if (type == null)
       {
-         throw new IllegalArgumentException("Cannot set the type to null (if you want to stop the type being used, call veto()) " + this);
+         throw new ForbiddenArgumentException(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	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -1,5 +1,7 @@
 package org.jboss.weld.bootstrap.events;
 
+import static org.jboss.weld.logging.messages.BootstrapMessage.BEAN_TYPE_NOT_EJB;
+
 import java.lang.reflect.Type;
 
 import javax.enterprise.inject.spi.AnnotatedType;
@@ -7,6 +9,7 @@
 import javax.enterprise.inject.spi.SessionBeanType;
 
 import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.ForbiddenStateException;
 import org.jboss.weld.bean.SessionBean;
 
 public class ProcessSessionBeanImpl<X> extends AbstractProcessClassBean<Object, SessionBean<Object>> implements ProcessSessionBean<X>
@@ -48,7 +51,7 @@
       }
       else
       {
-         throw new IllegalStateException("Bean type is not STATELESS, STATEFUL or SINGELTON " + getBean());
+         throw new ForbiddenStateException(BEAN_TYPE_NOT_EJB, getBean());
       }
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -96,6 +96,16 @@
    @MessageId("000075") PUBLIC_FIELD_ON_NORMAL_SCOPED_BEAN_NOT_ALLOWED,
    @MessageId("000076") PARAMETER_ANNOTATION_NOT_ALLOWED_ON_CONSTRUCTOR,
    @MessageId("000077") MULTIPLE_DISPOSAL_METHODS,
-   @MessageId("000078") PRODUCER_METHOD_NOT_SPECIALIZING
+   @MessageId("000078") PRODUCER_METHOD_NOT_SPECIALIZING,
+   @MessageId("000079") EJB_NOT_FOUND,
+   @MessageId("000080") EJB_CANNOT_BE_INTERCEPTOR,
+   @MessageId("000081") EJB_CANNOT_BE_DECORATOR,
+   @MessageId("000082") SCOPE_NOT_ALLOWED_ON_STATELESS_SESSION_BEAN,
+   @MessageId("000083") SCOPE_NOT_ALLOWED_ON_SINGLETON_BEAN,
+   @MessageId("000084") SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN,
+   @MessageId("000085") CANNOT_DESTROY_NULL_BEAN,
+   @MessageId("000086") CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED,
+   @MessageId("000087") MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED,
+   @MessageId("000088") OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS;
    
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BootstrapMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BootstrapMessage.java	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BootstrapMessage.java	2009-11-11 21:19:05 UTC (rev 4990)
@@ -27,6 +27,14 @@
    @MessageId("000106") FOUND_BEAN,
    @MessageId("000107") FOUND_INTERCEPTOR,
    @MessageId("000108") FOUND_DECORATOR,
-   @MessageId("000109") FOUND_OBSERVER_METHOD;
+   @MessageId("000109") FOUND_OBSERVER_METHOD,
+   @MessageId("000110") ANNOTATION_TYPE_NULL,
+   @MessageId("000111") BEAN_TYPE_NOT_EJB,
+   @MessageId("000112") BEAN_IS_BOTH_INTERCEPTOR_AND_DECORATOR,
+   @MessageId("000113") DEPLOYMENT_ARCHIVE_NULL,
+   @MessageId("000114") DEPLOYMENT_REQUIRED,
+   @MessageId("000115") BEAN_STORE_MISSING,
+   @MessageId("000116") MANAGER_NOT_INITIALIZED,
+   @MessageId("000117") UNSPECIFIED_REQUIRED_SERVICE;
 
 }

Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties	2009-11-11 21:19:05 UTC (rev 4990)
@@ -77,3 +77,13 @@
 PARAMETER_ANNOTATION_NOT_ALLOWED_ON_CONSTRUCTOR=Managed bean constructor must not have a parameter annotated {0}\:  {1}
 MULTIPLE_DISPOSAL_METHODS=Cannot declare multiple disposal methods for this producer method.\\n\\nProducer method\:  {0}\\nDisposal methods\:  {1}
 PRODUCER_METHOD_NOT_SPECIALIZING=Specialized producer method does not override a method on the direct superclass\:  {0}
+EJB_NOT_FOUND=Could not find the EJB in JNDI\:  {0}
+EJB_CANNOT_BE_INTERCEPTOR=Enterprise beans cannot be interceptors\:  {0}
+EJB_CANNOT_BE_DECORATOR=Enterprise beans cannot be decorators\:  {0}
+SCOPE_NOT_ALLOWED_ON_STATELESS_SESSION_BEAN=Scope {0} is not allowed on stateless enterprise beans for {1}.  Only @Dependent is allowed on stateless enterprise beans.
+SCOPE_NOT_ALLOWED_ON_SINGLETON_BEAN=Scope {0} is not allowed on singleton enterprise beans for {1}.  Only @Dependent is allowed on singleton enterprise beans.
+SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN=Specializing enterprise bean must extend another enterprise bean\:  {0}
+CANNOT_DESTROY_NULL_BEAN=Cannot destroy null instance of {0}
+CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED=Cannot destroy session bean instance not created by the container\:  {0}
+MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED=Message driven beans cannot be Managed Beans\:  {0}
+OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS=Observer method must be static or business method\:  {0} on {1}

Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties	2009-11-11 18:03:28 UTC (rev 4989)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/bootstrap_en.properties	2009-11-11 21:19:05 UTC (rev 4990)
@@ -7,3 +7,11 @@
 FOUND_INTERCEPTOR=Interceptor: {0}
 FOUND_DECORATOR=Decorator: {0}
 FOUND_OBSERVER_METHOD=ObserverMethod\: {0}
+ANNOTATION_TYPE_NULL=Cannot set the annotation type to null (if you want to stop the type being used, call veto())\:  {0}
+BEAN_TYPE_NOT_EJB=Bean type is not STATELESS, STATEFUL or SINGLETON\:  {0}
+BEAN_IS_BOTH_INTERCEPTOR_AND_DECORATOR=Class {0} has both @Interceptor and @Decorator annotations
+DEPLOYMENT_ARCHIVE_NULL=BeanDeploymentArchive must not be null\:  {0}
+DEPLOYMENT_REQUIRED=Must start the container with a deployment
+BEAN_STORE_MISSING=No application context BeanStore set
+MANAGER_NOT_INITIALIZED=Manager has not been initialized
+UNSPECIFIED_REQUIRED_SERVICE=Required service {0} has not been specified



More information about the weld-commits mailing list