Author: pete.muir(a)jboss.org
Date: 2009-07-28 18:50:25 -0400 (Tue, 28 Jul 2009)
New Revision: 3327
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/DeploymentTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/Interceptor1.java
Log:
WBRI-260
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-07-28
22:02:26 UTC (rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -523,32 +523,34 @@
public void addBean(Bean<?> bean)
{
- if (beans.contains(bean))
- {
- return;
- }
- if (bean instanceof NewEnterpriseBean)
- {
- NewEnterpriseBean<?> newEnterpriseBean = (NewEnterpriseBean<?>)
bean;
- newEnterpriseBeans.put(newEnterpriseBean.getType(), newEnterpriseBean);
- }
- else if (bean instanceof DecoratorBean)
- {
- decorators.add((DecoratorBean<?>) bean);
- }
- if (bean instanceof RIBean)
- {
- RIBean<?> riBean = (RIBean<?>) bean;
- riBeans.put(riBean.getId(), riBean);
- }
- registerBeanNamespace(bean);
- for (BeanManagerImpl childActivity : childActivities)
- {
- childActivity.addBean(bean);
- }
- this.beans.add(bean);
- beanResolver.clear();
+ if (beans.contains(bean))
+ {
+ return;
+ }
+ if (bean instanceof NewEnterpriseBean)
+ {
+ NewEnterpriseBean<?> newEnterpriseBean = (NewEnterpriseBean<?>)
bean;
+ newEnterpriseBeans.put(newEnterpriseBean.getType(), newEnterpriseBean);
+ }
+ if (bean instanceof RIBean)
+ {
+ RIBean<?> riBean = (RIBean<?>) bean;
+ riBeans.put(riBean.getId(), riBean);
+ }
+ registerBeanNamespace(bean);
+ for (BeanManagerImpl childActivity : childActivities)
+ {
+ childActivity.addBean(bean);
+ }
+ this.beans.add(bean);
+ beanResolver.clear();
}
+
+ public void addDecorator(DecoratorBean<?> bean)
+ {
+ decorators.add(bean);
+ decoratorResolver.clear();
+ }
@SuppressWarnings("unchecked")
public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event,
Annotation... bindings)
@@ -1317,12 +1319,4 @@
return sortedBeans.last();
}
- /**
- * @param bean
- */
- public void addRIBean(RIBean<?> bean)
- {
- addBean(bean);
- }
-
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java 2009-07-28 22:02:26 UTC
(rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/Validator.java 2009-07-28 22:50:25 UTC
(rev 3327)
@@ -223,18 +223,10 @@
private void validateDisposalMethods(BeanDeployerEnvironment environment)
{
- Set<DisposalMethodBean<?>> all = new
HashSet<DisposalMethodBean<?>>(environment.getAllDisposalBeans());
- Set<DisposalMethodBean<?>> resolved = new
HashSet<DisposalMethodBean<?>>(environment.getResolvedDisposalBeans());
- if (all.size() > 0 && !resolved.containsAll(all))
+ Set<DisposalMethodBean<?>> beans =
environment.getUnresolvedDisposalBeans();
+ if (!beans.isEmpty())
{
- StringBuffer buff = new StringBuffer();
- buff.append("The following Disposal methods where not declared but not
resolved to a producer method\n");
- all.removeAll(resolved);
- for (DisposalMethodBean<?> bean : all)
- {
- buff.append(bean.toString());
- }
- throw new DefinitionException(buff.toString());
+ throw new DefinitionException("The following Disposal methods where not
declared but not resolved to a producer method" + beans);
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-28
22:02:26 UTC (rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -210,5 +210,15 @@
{
// No-op, decorators can't have decorators
}
+
+ /* (non-Javadoc)
+ * @see org.jboss.webbeans.bean.SimpleBean#toString()
+ */
+ @Override
+ public String toString()
+ {
+ // TODO Auto-generated method stub
+ return super.toString("decorator");
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-07-28
22:02:26 UTC (rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -163,7 +163,6 @@
if (disposalBeans.size() == 1)
{
this.disposalMethodBean = disposalBeans.iterator().next();
- environment.addResolvedDisposalBean(disposalMethodBean);
}
else if (disposalBeans.size() > 1)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-28
22:02:26 UTC (rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -521,15 +521,20 @@
@Override
public String toString()
{
+ return toString("simple bean");
+ }
+
+ protected String toString(String beanType)
+ {
StringBuilder buffer = new StringBuilder();
buffer.append(Names.scopeTypeToString(getScopeType()));
if (getName() == null)
{
- buffer.append("unnamed simple bean");
+ buffer.append("unnamed ").append(beanType);
}
else
{
- buffer.append("simple bean '" + getName() + "'");
+ buffer.append(beanType).append(" '" + getName() +
"'");
}
buffer.append(" ").append(getType().getName()).append(", ");
buffer.append(" API types =
").append(Names.typesToString(getTypes())).append(", binding types = " +
Names.annotationsToString(getBindings()));
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -54,9 +54,9 @@
private static final LogProvider log =
Logging.getLogProvider(AbstractBeanDeployer.class);
- private final BeanManagerImpl manager;
+ private final BeanManagerImpl manager;
private final BeanDeployerEnvironment environment;
- private final List<Throwable> definitionErrors = new
ArrayList<Throwable>();
+ private final List<Throwable> definitionErrors = new
ArrayList<Throwable>();
public AbstractBeanDeployer(BeanManagerImpl manager, BeanDeployerEnvironment
environment)
{
@@ -69,30 +69,24 @@
return manager;
}
- public <T> AbstractBeanDeployer addBean(RIBean<T> bean)
- {
- this.environment.addBean(bean);
- return this;
- }
-
public AbstractBeanDeployer deploy()
{
- Set<RIBean<?>> beans = environment.getBeans();
- // ensure that all disposal methods are initialized before initializing
+ Set<RIBean<?>> beans = getEnvironment().getBeans();
+ // ensure that all decorators are initialized before initializing
// the rest of the beans
- for (DecoratorBean<?> bean : environment.getDecorators())
+ for (DecoratorBean<?> bean : getEnvironment().getDecorators())
{
- bean.initialize(environment);
- manager.addRIBean(bean);
+ bean.initialize(getEnvironment());
+ manager.addDecorator(bean);
log.debug("Bean: " + bean);
}
for (RIBean<?> bean : beans)
{
- bean.initialize(environment);
- manager.addRIBean(bean);
+ bean.initialize(getEnvironment());
+ manager.addBean(bean);
log.debug("Bean: " + bean);
}
- for (ObserverMethod<?, ?> observer : environment.getObservers())
+ for (ObserverMethod<?, ?> observer : getEnvironment().getObservers())
{
log.debug("Observer : " + observer);
manager.addObserver(observer);
@@ -130,21 +124,21 @@
for (WBMethod<?> method :
annotatedClass.getDeclaredMethodsWithAnnotatedParameters(Disposes.class))
{
DisposalMethodBean<?> disposalBean = DisposalMethodBean.of(manager,
method, declaringBean);
- disposalBean.initialize(environment);
- environment.addDisposalBean(disposalBean);
+ disposalBean.initialize(getEnvironment());
+ getEnvironment().addBean(disposalBean);
}
}
protected <T> void createProducerMethod(AbstractClassBean<?>
declaringBean, WBMethod<T> annotatedMethod)
{
ProducerMethodBean<T> bean = ProducerMethodBean.of(annotatedMethod,
declaringBean, manager);
- addBean(bean);
+ getEnvironment().addBean(bean);
}
protected <T> void createProducerField(AbstractClassBean<?> declaringBean,
WBField<T> field)
{
ProducerFieldBean<T> bean = ProducerFieldBean.of(field, declaringBean,
manager);
- addBean(bean);
+ getEnvironment().addBean(bean);
}
protected void createProducerFields(AbstractClassBean<?> declaringBean,
WBClass<?> annotatedClass)
@@ -166,30 +160,30 @@
protected void createObserverMethod(RIBean<?> declaringBean, WBMethod<?>
method)
{
ObserverMethodImpl<?, ?> observer = ObserverFactory.create(method,
declaringBean, manager);
- environment.getObservers().add(observer);
+ getEnvironment().addObserver(observer);
}
protected <T> void createSimpleBean(WBClass<T> annotatedClass)
{
SimpleBean<T> bean = SimpleBean.of(annotatedClass, manager);
- addBean(bean);
+ getEnvironment().addBean(bean);
createSubBeans(bean);
- addBean(NewSimpleBean.of(annotatedClass, manager));
+ getEnvironment().addBean(NewSimpleBean.of(annotatedClass, manager));
}
protected <T> void createDecorator(WBClass<T> annotatedClass)
{
DecoratorBean<T> bean = DecoratorBean.of(annotatedClass, manager);
- addBean(bean);
+ getEnvironment().addBean(bean);
}
protected <T> void createEnterpriseBean(WBClass<T> annotatedClass)
{
// TODO Don't create enterprise bean if it has no local interfaces!
- EnterpriseBean<T> bean = EnterpriseBean.of(annotatedClass, manager,
environment);
- addBean(bean);
+ EnterpriseBean<T> bean = EnterpriseBean.of(annotatedClass, manager,
getEnvironment());
+ getEnvironment().addBean(bean);
createSubBeans(bean);
- addBean(NewEnterpriseBean.of(annotatedClass, manager, environment));
+ getEnvironment().addBean(NewEnterpriseBean.of(annotatedClass, manager,
getEnvironment()));
}
/**
@@ -222,7 +216,7 @@
return type.getNoArgsConstructor() != null ||
type.getAnnotatedConstructors(Initializer.class).size() > 0;
}
- public BeanDeployerEnvironment getBeanDeployerEnvironment()
+ public BeanDeployerEnvironment getEnvironment()
{
return environment;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-07-28
22:02:26 UTC (rev 3326)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -22,9 +22,9 @@
import javax.decorator.Decorator;
import javax.enterprise.inject.spi.AnnotatedType;
+import javax.interceptor.Interceptor;
import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.RIBean;
import org.jboss.webbeans.ejb.EjbDescriptorCache;
import org.jboss.webbeans.introspector.WBClass;
import org.jboss.webbeans.resources.ClassTransformer;
@@ -48,15 +48,6 @@
this.classes = new HashSet<WBClass<?>>();
}
- public AbstractBeanDeployer addBeans(Iterable<? extends RIBean<?>> beans)
- {
- for (RIBean<?> bean : beans)
- {
- addBean(bean);
- }
- return this;
- }
-
public AbstractBeanDeployer addClass(Class<?> clazz)
{
ClassTransformer classTransformer =
getManager().getServices().get(ClassTransformer.class);
@@ -96,7 +87,7 @@
{
for (WBClass<?> clazz : classes)
{
- if
(getBeanDeployerEnvironment().getEjbDescriptors().containsKey(clazz.getJavaClass()))
+ if (getEnvironment().getEjbDescriptors().containsKey(clazz.getJavaClass()))
{
createEnterpriseBean(clazz);
}
@@ -107,6 +98,10 @@
{
createDecorator(clazz);
}
+ else if (managedBeanOrDecorator &&
clazz.isAnnotationPresent(Interceptor.class))
+ {
+ //createInterceptor(clazz);
+ }
else if (managedBeanOrDecorator && !clazz.isAbstract())
{
createSimpleBean(clazz);
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -32,8 +32,11 @@
import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.DisposalMethodBean;
import org.jboss.webbeans.bean.NewBean;
+import org.jboss.webbeans.bean.ProducerFieldBean;
import org.jboss.webbeans.bean.ProducerMethodBean;
import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.standard.AbstractStandardBean;
+import org.jboss.webbeans.bean.standard.ExtensionBean;
import org.jboss.webbeans.ejb.EjbDescriptorCache;
import org.jboss.webbeans.introspector.WBAnnotated;
import org.jboss.webbeans.introspector.WBClass;
@@ -55,7 +58,6 @@
private final Set<DecoratorBean<?>> decorators;
private final EjbDescriptorCache ejbDescriptors;
private final TypeSafeResolver<DisposalMethodBean<?>>
disposalMethodResolver;
- private final BeanManagerImpl manager;
public BeanDeployerEnvironment(EjbDescriptorCache ejbDescriptors, BeanManagerImpl
manager)
{
@@ -69,7 +71,6 @@
this.observers = new HashSet<ObserverMethod<?, ?>>();
this.ejbDescriptors = ejbDescriptors;
this.disposalMethodResolver = new
TypeSafeBeanResolver<DisposalMethodBean<?>>(manager, allDisposalBeans);
- this.manager = manager;
}
public ProducerMethodBean<?> getProducerMethod(WBMethod<?> method)
@@ -115,63 +116,73 @@
}
}
- public void addBean(RIBean<?> value)
+ public void addBean(ProducerMethodBean<?> bean)
{
- if (value instanceof AbstractClassBean && !(value instanceof NewBean))
+ producerMethodBeanMap.put(bean.getAnnotatedItem(), bean);
+ beans.add(bean);
+ }
+
+ public void addBean(ProducerFieldBean<?> bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(ExtensionBean bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(AbstractStandardBean<?> bean)
+ {
+ beans.add(bean);
+ }
+
+ public void addBean(AbstractClassBean<?> bean)
+ {
+ if (!(bean instanceof NewBean))
{
- AbstractClassBean<?> bean = (AbstractClassBean<?>) value;
classBeanMap.put(bean.getAnnotatedItem(), bean);
}
- else if (value instanceof ProducerMethodBean)
- {
- ProducerMethodBean<?> bean = (ProducerMethodBean<?>) value;
- producerMethodBeanMap.put(bean.getAnnotatedItem(), bean);
- }
- else if (value instanceof DisposalMethodBean)
- {
- DisposalMethodBean<?> bean = (DisposalMethodBean<?>) value;
- disposalMethodBeanMap.put(bean.getAnnotatedItem(), bean);
- }
- beans.add(value);
- if (value instanceof DecoratorBean)
- {
- decorators.add((DecoratorBean<?>) value);
- }
+ beans.add(bean);
}
- public Set<RIBean<?>> getBeans()
+ public void addBean(DecoratorBean<?> bean)
{
- return Collections.unmodifiableSet(beans);
+ decorators.add(bean);
}
- public Set<DecoratorBean<?>> getDecorators()
+ public void addBean(DisposalMethodBean<?> bean)
{
- return Collections.unmodifiableSet(decorators);
+ allDisposalBeans.add(bean);
+ disposalMethodBeanMap.put(bean.getAnnotatedItem(), bean);
}
-
- public Set<ObserverMethod<?, ?>> getObservers()
+
+ public void addObserver(ObserverMethod<?, ?> observer)
{
- return observers;
+ this.observers.add(observer);
}
- public List<DisposalMethodBean<?>> getAllDisposalBeans()
+ public Set<RIBean<?>> getBeans()
{
- return allDisposalBeans;
+ return Collections.unmodifiableSet(beans);
}
-
- public void addDisposalBean(DisposalMethodBean<?> disposalBean)
+
+ public Set<DecoratorBean<?>> getDecorators()
{
- allDisposalBeans.add(disposalBean);
+ return Collections.unmodifiableSet(decorators);
}
- public void addResolvedDisposalBean(DisposalMethodBean<?> disposalBean)
+ public Set<ObserverMethod<?, ?>> getObservers()
{
- resolvedDisposalBeans.add(disposalBean);
+ return Collections.unmodifiableSet(observers);
}
- public Set<DisposalMethodBean<?>> getResolvedDisposalBeans()
+
+ public Set<DisposalMethodBean<?>> getUnresolvedDisposalBeans()
{
- return resolvedDisposalBeans;
+ Set<DisposalMethodBean<?>> beans = new
HashSet<DisposalMethodBean<?>>(allDisposalBeans);
+ beans.removeAll(resolvedDisposalBeans);
+ return Collections.unmodifiableSet(beans);
}
public EjbDescriptorCache getEjbDescriptors()
@@ -180,8 +191,9 @@
}
/**
- * Resolve the disposal method for the given producer method. For internal
- * use.
+ * Resolve the disposal method for the given producer method. Any resolved
+ * beans will be marked as such for the purpose of validating that all
+ * disposal methods are used. For internal use.
*
* @param apiType The API type to match
* @param bindings The binding types to match
@@ -199,7 +211,8 @@
disposalBeans.add((DisposalMethodBean<T>) bean);
}
}
- return disposalBeans;
+ resolvedDisposalBeans.addAll(disposalBeans);
+ return Collections.unmodifiableSet(disposalBeans);
}
}
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/ExtensionBeanDeployer.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -51,7 +51,7 @@
WBClass<Extension> clazz = (WBClass<Extension>)
classTransformer.loadClass(extension.getClass());
ExtensionBean bean = ExtensionBean.of(getManager(), clazz, extension);
- addBean(bean);
+ getEnvironment().addBean(bean);
createObserverMethods(bean, clazz);
}
return this;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -227,10 +227,10 @@
protected void registerBeans(Iterable<Class<?>> classes, BeanDeployer
beanDeployer)
{
beanDeployer.addClasses(classes);
- beanDeployer.addBean(ManagerBean.of(manager));
- beanDeployer.addBean(InjectionPointBean.of(manager));
- beanDeployer.addBean(EventBean.of(manager));
- beanDeployer.addBean(InstanceBean.of(manager));
+ beanDeployer.getEnvironment().addBean(ManagerBean.of(manager));
+ beanDeployer.getEnvironment().addBean(InjectionPointBean.of(manager));
+ beanDeployer.getEnvironment().addBean(EventBean.of(manager));
+ beanDeployer.getEnvironment().addBean(InstanceBean.of(manager));
if (!getEnvironment().equals(Environments.SE))
{
beanDeployer.addClass(ConversationImpl.class);
@@ -282,7 +282,7 @@
registerBeans(deploymentVisitor.getBeanClasses(), beanDeployer);
fireAfterBeanDiscoveryEvent();
log.debug("Web Beans initialized. Validating beans.");
- getServices().get(Validator.class).validateDeployment(manager,
beanDeployer.getBeanDeployerEnvironment());
+ getServices().get(Validator.class).validateDeployment(manager,
beanDeployer.getEnvironment());
fireAfterDeploymentValidationEvent();
endDeploy(requestBeanStore);
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/DeploymentTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/DeploymentTest.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/DeploymentTest.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -65,11 +65,10 @@
public void testOnlyEnabledBeansDeployed()
{
assert !getBeans(User.class).isEmpty();
+ assert getBeans(DataAccessAuthorizationDecorator.class).isEmpty();
+ assert getBeans(Interceptor1.class).isEmpty();
+
// I have no idea how this bean is supposed to be disabled PLM
assert getBeans(DisabledBean.class).isEmpty();
- // Why is this interceptor not a bean? PLM
- assert getBeans(Interceptor1.class).isEmpty();
- // Why is this decorator not a bean? PLM
- assert getBeans(DataAccessAuthorizationDecorator.class).isEmpty();
}
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/Interceptor1.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/Interceptor1.java 2009-07-28
22:02:26 UTC (rev 3326)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/Interceptor1.java 2009-07-28
22:50:25 UTC (rev 3327)
@@ -1,9 +1,10 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle;
import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-@InterceptorType1
+@InterceptorType1 @Interceptor
class Interceptor1
{
@AroundInvoke public Object alwaysReturnThis(InvocationContext ctx) throws Exception