Skip to content

Commit

Permalink
WELD-307
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jan 16, 2010
1 parent 5cd4e52 commit a63383e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Expand Up @@ -25,12 +25,14 @@
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.DefinitionException;
import org.jboss.weld.introspector.ForwardingAnnotatedType;
import org.jboss.weld.literal.InterceptorBindingTypeLiteral;
import org.jboss.weld.literal.NormalScopeLiteral;
import org.jboss.weld.literal.QualifierLiteral;
import org.jboss.weld.literal.ScopeLiteral;
import org.jboss.weld.literal.StereotypeLiteral;
import org.jboss.weld.logging.messages.BootstrapMessage;
import org.jboss.weld.manager.BeanManagerImpl;

public class BeforeBeanDiscoveryImpl extends AbstractBeanDiscoveryEvent implements BeforeBeanDiscovery
Expand Down Expand Up @@ -85,6 +87,10 @@ public void addScope(Class<? extends Annotation> scopeType, boolean normal, bool
{
getTypeStore().add(scopeType, new NormalScopeLiteral(passivating));
}
else if (passivating)
{
throw new DefinitionException(BootstrapMessage.PASSIVATING_NON_NORMAL_SCOPE_ILLEGAL, scopeType);
}
else
{
getTypeStore().add(scopeType, ScopeLiteral.INSTANCE);
Expand Down
Expand Up @@ -35,6 +35,7 @@ public enum BootstrapMessage
@MessageId("000114") DEPLOYMENT_REQUIRED,
@MessageId("000115") BEAN_STORE_MISSING,
@MessageId("000116") MANAGER_NOT_INITIALIZED,
@MessageId("000117") UNSPECIFIED_REQUIRED_SERVICE;
@MessageId("000117") UNSPECIFIED_REQUIRED_SERVICE,
@MessageId("000118") PASSIVATING_NON_NORMAL_SCOPE_ILLEGAL;

}
Expand Up @@ -15,3 +15,4 @@ 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
PASSIVATING_NON_NORMAL_SCOPE_ILLEGAL=Only normal scopes can be passivating. Scope {0}

0 comments on commit a63383e

Please sign in to comment.