[webbeans-commits] Webbeans SVN: r1262 - in ri/trunk/webbeans-ri/src: main/java/org/jboss/webbeans/bean and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-28 09:14:12 -0500 (Wed, 28 Jan 2009)
New Revision: 1262
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/Resolver.java
Removed:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/AnnotatedInjectionPoint.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedField.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedClass.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedField.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedParameter.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedFieldImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Names.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
Log:
Initial wiring of creational context (needs tidying up)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -63,12 +63,12 @@
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.event.EventManager;
import org.jboss.webbeans.event.ObserverImpl;
-import org.jboss.webbeans.injection.AnnotatedInjectionPoint;
import org.jboss.webbeans.injection.InjectionPointProvider;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.lookup.Resolver;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.util.Beans;
@@ -129,7 +129,9 @@
// The Naming (JNDI) access
private transient final NamingContext namingContext;
- private final Map<Bean<?>, Bean<?>> specializedBeans;
+ private final transient Map<Bean<?>, Bean<?>> specializedBeans;
+
+ private final transient ThreadLocal<Map<Bean<?>, ?>> incompleteInstances;
/**
* Create a new manager
@@ -153,7 +155,16 @@
this.ejbDescriptorCache = new EjbDescriptorCache();
this.injectionPointProvider = new InjectionPointProvider();
this.specializedBeans = new HashMap<Bean<?>, Bean<?>>();
-
+ this.incompleteInstances = new ThreadLocal<Map<Bean<?>,?>>()
+ {
+
+ @Override
+ protected Map<Bean<?>, ?> initialValue()
+ {
+ return new HashMap<Bean<?>, Object>();
+ }
+
+ };
List<Class<? extends Annotation>> defaultEnabledDeploymentTypes = new ArrayList<Class<? extends Annotation>>();
defaultEnabledDeploymentTypes.add(0, Standard.class);
defaultEnabledDeploymentTypes.add(1, Production.class);
@@ -553,6 +564,18 @@
return getInstance(bean, true);
}
+ public <T> T getInstance(Bean<T> bean, boolean create)
+ {
+ if (create)
+ {
+ return getInstance(bean, new CreationalContextImpl<T>(bean));
+ }
+ else
+ {
+ return getInstance(bean, null);
+ }
+ }
+
/**
* Returns an instance of a bean
*
@@ -561,36 +584,51 @@
*
* @see javax.inject.manager.Manager#getInstance(javax.inject.manager.Bean)
*/
- public <T> T getInstance(Bean<T> bean, boolean create)
+ private <T> T getInstance(Bean<T> bean, CreationalContextImpl<T> creationalContext)
{
if (specializedBeans.containsKey(bean))
{
- return getInstance((Bean<T>) specializedBeans.get(bean), create);
+ return getInstance((Bean<T>) specializedBeans.get(bean), creationalContext);
}
else if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
{
- return (T) proxyPool.getClientProxy(bean, create);
+ return (T) proxyPool.getClientProxy(bean, creationalContext != null);
}
else
{
- return getContext(bean.getScopeType()).get(bean, new CreationalContextImpl<T>());
+ return getContext(bean.getScopeType()).get(bean, creationalContext);
}
}
public <T> T getInstanceToInject(InjectionPoint injectionPoint)
{
- throw new UnsupportedOperationException();
+ return getInstanceToInject(AnnotatedClassImpl.of((Class<T>) injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0])), null);
}
public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<?> creationalContext)
{
- throw new UnsupportedOperationException();
+ return getInstanceToInject(AnnotatedClassImpl.of((Class<T>) injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0])), creationalContext);
}
- public <T> T getInstanceToInject(AnnotatedInjectionPoint<T, ?> injectionPoint, CreationalContext<?> creationalContext)
+ private <T> T getInstanceToInject(AnnotatedItem<T, ?> element, CreationalContext<?> creationalContext)
{
- Bean<T> bean = getBeanByType(injectionPoint, injectionPoint.getBindings().toArray(EMPTY_ANNOTATION_ARRAY));
- return getInstance(bean);
+ Bean<T> bean = getBeanByType(element, element.getBindingTypesAsArray());
+ if (creationalContext instanceof CreationalContextImpl)
+ {
+ CreationalContextImpl<?> ctx = (CreationalContextImpl<?>) creationalContext;
+ if (ctx.containsIncompleteInstance(bean))
+ {
+ return ctx.getIncompleteInstance(bean);
+ }
+ else
+ {
+ return getInstance(bean, ctx.getCreationalContext(bean));
+ }
+ }
+ else
+ {
+ return getInstance(bean);
+ }
}
/**
@@ -658,7 +696,7 @@
* @param bindingTypes The binding types to match
* @return An instance of the bean
*/
- public <T> T getInstanceByType(AnnotatedItem<T, ?> element, Annotation... bindings)
+ private <T> T getInstanceByType(AnnotatedItem<T, ?> element, Annotation... bindings)
{
return getInstance(getBeanByType(element, bindings));
}
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -1,388 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, 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.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.concurrent.Callable;
-
-import javax.inject.TypeLiteral;
-import javax.inject.manager.Bean;
-import javax.inject.manager.Decorator;
-import javax.inject.manager.InjectionPoint;
-import javax.inject.manager.InterceptionType;
-import javax.inject.manager.Interceptor;
-
-import org.jboss.webbeans.bean.InjectionPointBean;
-import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.introspector.ForwardingAnnotatedItem;
-import org.jboss.webbeans.model.BindingTypeModel;
-import org.jboss.webbeans.util.ConcurrentCache;
-import org.jboss.webbeans.util.ListComparator;
-
-/**
- * Implementation of Web Beans type safe and name based bean resolution
- *
- * @author Pete Muir
- */
-public class Resolver
-{
- private static final long serialVersionUID = 1L;
-
- private static final Class<AnnotatedItem<Object, Object>> ANNOTATED_ITEM_GENERIFIED_WITH_OBJECT_OBJECT = new TypeLiteral<AnnotatedItem<Object, Object>>(){}.getRawType();
- private static final Class<Set<Bean<Object>>> BEAN_SET_GENERIFIED_WITH_OBJECT = new TypeLiteral<Set<Bean<Object>>>(){}.getRawType();
- private static final Class<Set<Bean<?>>> BEAN_SET_GENERIFIED_WITH_WILDCARD = new TypeLiteral<Set<Bean<?>>>(){}.getRawType();
-
- /**
- * Extension of an element which bases equality not only on type, but also on
- * binding type
- */
- private abstract class ResolvableAnnotatedItem<T, S> extends ForwardingAnnotatedItem<T, S>
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public boolean equals(Object other)
- {
- if (other instanceof AnnotatedItem)
- {
- AnnotatedItem<?, ?> that = (AnnotatedItem<?, ?>) other;
- return delegate().isAssignableFrom(that) && that.getBindingTypes().equals(this.getBindingTypes());
- }
- else
- {
- return false;
- }
- }
-
- @Override
- public int hashCode()
- {
- return delegate().hashCode();
- }
-
- @Override
- public String toString()
- {
- return "Resolvable annotated item for " + delegate();
- }
-
- }
-
- // The resolved injection points
- private ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>> resolvedInjectionPoints;
- // The registerd injection points
- private Set<AnnotatedItem<?, ?>> injectionPoints;
- // The resolved names
- private ConcurrentCache<String, Set<Bean<?>>> resolvedNames;
- // The Web Beans manager
- private ManagerImpl manager;
-
- /**
- * Constructor
- *
- * @param manager The Web Beans manager
- */
- public Resolver(ManagerImpl manager)
- {
- this.injectionPoints = new HashSet<AnnotatedItem<?, ?>>();
- this.resolvedInjectionPoints = new ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>>();
- this.resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
- this.manager = manager;
- }
-
- /**
- * Add multiple injection points for later resolving using
- * {@link #registerInjectionPoint(AnnotatedItem)}. Useful during bootstrap.
- *
- * @param elements The injection points to add
- */
- public void addInjectionPoints(Collection<? extends AnnotatedItem<?, ?>> elements)
- {
- injectionPoints.addAll(elements);
- }
-
- /**
- * Registers an injection point
- *
- * @param <T>
- * @param <S>
- * @param element The injection point to add
- * @return A set of matching beans for the injection point
- */
- private <T, S> Set<Bean<T>> registerInjectionPoint(final ResolvableAnnotatedItem<T, S> element)
- {
- Callable<Set<Bean<T>>> callable = new Callable<Set<Bean<T>>>()
- {
-
- public Set<Bean<T>> call() throws Exception
- {
- return retainHighestPrecedenceBeans(getMatchingBeans(element, manager.getBeans()), manager.getEnabledDeploymentTypes());
- }
-
- };
- return resolvedInjectionPoints.putIfAbsent(element, callable);
- }
-
- /**
- * Reset all cached injection points. You must reset all cached injection
- * points when you add a bean to the manager
- */
- public void clear()
- {
- this.resolvedInjectionPoints = new ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>>();
- resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
- }
-
- /**
- * Resolve all injection points added using
- * {@link #addInjectionPoints(Collection)}
- */
- public void resolveInjectionPoints()
- {
- for (final AnnotatedItem<? extends Object, ? extends Object> injectable : injectionPoints)
- {
-
- registerInjectionPoint(new ResolvableAnnotatedItem<Object, Object>()
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public AnnotatedItem<Object, Object> delegate()
- {
- return ANNOTATED_ITEM_GENERIFIED_WITH_OBJECT_OBJECT.cast(injectable);
- }
- });
- }
- }
-
- /**
- * Get the possible beans for the given element
- *
- * @param key The resolving criteria
- * @return An unmodifiable set of matching beans
- */
- public <T, S> Set<Bean<T>> get(final AnnotatedItem<T, S> key)
- {
- Set<Bean<T>> beans = new HashSet<Bean<T>>();
-
- final ResolvableAnnotatedItem<T, S> element = new ResolvableAnnotatedItem<T, S>()
- {
-
- @Override
- public AnnotatedItem<T, S> delegate()
- {
- return key;
- }
-
- };
-
- if (InjectionPoint.class.isAssignableFrom(element.getType()))
- {
- beans.add(InjectionPointBean.of(key, manager));
- }
- else
- {
- beans = registerInjectionPoint(element);
- }
- return Collections.unmodifiableSet(beans);
- }
-
- /**
- * Get the possible beans for the given name
- *
- * @param name The name to match
- * @return The set of matching beans
- */
- public Set<Bean<? extends Object>> get(final String name)
- {
- return resolvedNames.putIfAbsent(name, new Callable<Set<Bean<?>>>()
- {
-
- public Set<Bean<? extends Object>> call() throws Exception
- {
-
- Set<Bean<?>> beans = new HashSet<Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if ((bean.getName() == null && name == null) || (bean.getName() != null && bean.getName().equals(name)))
- {
- beans.add(bean);
- }
- }
- return retainHighestPrecedenceBeans(beans, manager.getEnabledDeploymentTypes());
- }
-
- // Helper method to deal with dynamic casts being needed
- private Set<Bean<?>> retainHighestPrecedenceBeans(Set<Bean<?>> beans, List<Class<? extends Annotation>> enabledDeploymentTypes)
- {
- return BEAN_SET_GENERIFIED_WITH_WILDCARD.cast(Resolver.retainHighestPrecedenceBeans(BEAN_SET_GENERIFIED_WITH_OBJECT.cast(beans), enabledDeploymentTypes));
- }
-
- });
- }
-
-
-
- /**
- * Filters out the beans with the highest enabled deployment type
- *
- * @param <T>
- * @param beans The beans to filter
- * @param enabledDeploymentTypes The enabled deployment types
- * @return The filtered beans
- */
- private static <T> Set<Bean<T>> retainHighestPrecedenceBeans(Set<Bean<T>> beans, List<Class<? extends Annotation>> enabledDeploymentTypes)
- {
- if (beans.size() > 0)
- {
- SortedSet<Class<? extends Annotation>> possibleDeploymentTypes = new TreeSet<Class<? extends Annotation>>(new ListComparator<Class<? extends Annotation>>(enabledDeploymentTypes));
- for (Bean<?> bean : beans)
- {
- possibleDeploymentTypes.add(bean.getDeploymentType());
- }
- possibleDeploymentTypes.retainAll(enabledDeploymentTypes);
- Set<Bean<T>> trimmed = new HashSet<Bean<T>>();
- if (possibleDeploymentTypes.size() > 0)
- {
- Class<? extends Annotation> highestPrecedencePossibleDeploymentType = possibleDeploymentTypes.last();
-
- for (Bean<T> bean : beans)
- {
- if (bean.getDeploymentType().equals(highestPrecedencePossibleDeploymentType))
- {
- trimmed.add(bean);
- }
- }
- }
- return trimmed;
- }
- else
- {
- return beans;
- }
- }
-
- /**
- * Gets the matching beans for binding criteria from a list of beans
- *
- * @param <T> The type of the beans
- * @param element The binding criteria
- * @param beans The beans to filter
- * @return A set of filtered beans
- */
- private <T> Set<Bean<T>> getMatchingBeans(AnnotatedItem<T, ?> element, List<Bean<?>> beans)
- {
- Set<Bean<T>> resolvedBeans = new HashSet<Bean<T>>();
- for (Bean<?> bean : beans)
- {
- if (element.isAssignableFrom(bean.getTypes()) && containsAllBindingBindingTypes(element, bean.getBindings()))
- {
- @SuppressWarnings("unchecked")
- Bean<T> b = (Bean<T>) bean;
- resolvedBeans.add(b);
- }
- }
- return resolvedBeans;
- }
-
- /**
- * Checks if binding criteria fulfill all binding types
- *
- * @param element The binding criteria to check
- * @param bindingTypes The binding types to check
- * @return True if all matches, false otherwise
- */
- private boolean containsAllBindingBindingTypes(AnnotatedItem<?, ?> element, Set<Annotation> bindingTypes)
- {
- for (Annotation bindingType : element.getBindingTypes())
- {
- BindingTypeModel<?> bindingTypeModel = MetaDataCache.instance().getBindingTypeModel(bindingType.annotationType());
- if (bindingTypeModel.getNonBindingTypes().size() > 0)
- {
- boolean matchFound = false;
- for (Annotation otherBindingType : bindingTypes)
- {
- if (bindingTypeModel.isEqual(bindingType, otherBindingType))
- {
- matchFound = true;
- }
- }
- if (!matchFound)
- {
- return false;
- }
- }
- else if (!bindingTypes.contains(bindingType))
- {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Resolves decorators according to binding criteria
- *
- * @param types The set of API types to match
- * @param bindingTypes The binding types to match
- * @return The set of matching decorators
- */
- public List<Decorator> resolveDecorators(Set<Type> types, Annotation[] bindingTypes)
- {
- // TODO Implement decorators
- return Collections.emptyList();
- }
-
- /**
- * Resolves interceptors according to binding criteria
- *
- * @param types The set of API types to match
- * @param bindingTypes The binding types to match
- * @return The set of matching interceptors
- */
- public List<Interceptor> resolveInterceptors(InterceptionType type, Annotation[] interceptorBindings)
- {
- // TODO Implement interceptors
- return null;
- }
-
- /**
- * Gets a string representation
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append("Resolver\n");
- buffer.append("Injection points: " + injectionPoints.size() + "\n");
- buffer.append("Resolved injection points: " + resolvedInjectionPoints.size() + "\n");
- buffer.append("Resolved names points: " + resolvedNames.size() + "\n");
- return buffer.toString();
- }
-
-}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -21,6 +21,7 @@
import java.util.HashSet;
import java.util.Set;
+import javax.context.CreationalContext;
import javax.context.Dependent;
import javax.context.ScopeType;
import javax.event.Observes;
@@ -35,9 +36,12 @@
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injection.FieldInjectionPoint;
import org.jboss.webbeans.injection.InjectionPointProvider;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
+import org.jboss.webbeans.injection.ParameterInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.Reflections;
@@ -60,7 +64,7 @@
// The injectable fields
private Set<FieldInjectionPoint<?>> injectableFields;
// The initializer methods
- private Set<AnnotatedMethod<?>> initializerMethods;
+ private Set<MethodInjectionPoint<?>> initializerMethods;
/**
* Constructor
@@ -92,7 +96,7 @@
*
* @param instance The instance to inject into
*/
- protected void injectBoundFields(T instance)
+ protected void injectBoundFields(T instance, CreationalContext<T> creationalContext)
{
InjectionPointProvider injectionPointProvider = manager.getInjectionPointProvider();
for (FieldInjectionPoint<?> injectableField : injectableFields)
@@ -100,7 +104,7 @@
injectionPointProvider.pushInjectionPoint(injectableField);
try
{
- injectableField.inject(instance, manager);
+ injectableField.inject(instance, manager, creationalContext);
}
finally
{
@@ -108,6 +112,19 @@
}
}
}
+
+ /**
+ * Calls all initializers of the bean
+ *
+ * @param instance The bean instance
+ */
+ protected void callInitializers(T instance, CreationalContext<T> creationalContext)
+ {
+ for (MethodInjectionPoint<?> initializer : getInitializerMethods())
+ {
+ initializer.invoke(instance, manager, creationalContext);
+ }
+ }
/**
* Initializes the bean type
@@ -141,6 +158,13 @@
super.injectionPoints.add(fieldInjectionPoint);
}
}
+ for (AnnotatedMethod<?> initializer : getInitializerMethods())
+ {
+ for (AnnotatedParameter<?> parameter : initializer.getParameters())
+ {
+ injectionPoints.add(ParameterInjectionPoint.of(this, parameter));
+ }
+ }
}
/**
@@ -148,28 +172,28 @@
*/
protected void initInitializerMethods()
{
- initializerMethods = new HashSet<AnnotatedMethod<?>>();
- for (AnnotatedMethod<?> annotatedMethod : annotatedItem.getAnnotatedMethods(Initializer.class))
+ initializerMethods = new HashSet<MethodInjectionPoint<?>>();
+ for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(Initializer.class))
{
- if (annotatedMethod.isStatic())
+ if (method.isStatic())
{
- throw new DefinitionException("Initializer method " + annotatedMethod.toString() + " cannot be static");
+ throw new DefinitionException("Initializer method " + method.toString() + " cannot be static");
}
- else if (annotatedMethod.getAnnotation(Produces.class) != null)
+ else if (method.getAnnotation(Produces.class) != null)
{
- throw new DefinitionException("Initializer method " + annotatedMethod.toString() + " cannot be annotated @Produces");
+ throw new DefinitionException("Initializer method " + method.toString() + " cannot be annotated @Produces");
}
- else if (annotatedMethod.getAnnotatedParameters(Disposes.class).size() > 0)
+ else if (method.getAnnotatedParameters(Disposes.class).size() > 0)
{
- throw new DefinitionException("Initializer method " + annotatedMethod.toString() + " cannot have parameters annotated @Disposes");
+ throw new DefinitionException("Initializer method " + method.toString() + " cannot have parameters annotated @Disposes");
}
- else if (annotatedMethod.getAnnotatedParameters(Observes.class).size() > 0)
+ else if (method.getAnnotatedParameters(Observes.class).size() > 0)
{
- throw new DefinitionException("Initializer method " + annotatedMethod.toString() + " cannot be annotated @Observes");
+ throw new DefinitionException("Initializer method " + method.toString() + " cannot be annotated @Observes");
}
else
{
- initializerMethods.add(annotatedMethod);
+ initializerMethods.add(MethodInjectionPoint.of(this, method));
}
}
}
@@ -308,7 +332,7 @@
*
* @return The set of annotated methods
*/
- public Set<AnnotatedMethod<?>> getInitializerMethods()
+ public Set<? extends MethodInjectionPoint<?>> getInitializerMethods()
{
return initializerMethods;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -305,7 +305,7 @@
DependentContext.INSTANCE.setCurrentInjectionInstance(dependentCollector);
}
DependentContext.INSTANCE.setActive(true);
- T instance = produceInstance();
+ T instance = produceInstance(creationalContext);
checkReturnValue(instance);
return instance;
}
@@ -333,7 +333,7 @@
}
}
- protected abstract T produceInstance();
+ protected abstract T produceInstance(CreationalContext<T> creationalContext);
/**
* Gets a string representation
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -126,15 +126,6 @@
checkObserverMethods();
}
- /**
- * Initializes the injection points
- */
- @Override
- protected void initInjectionPoints()
- {
- super.initInjectionPoints();
- }
-
protected void initTypes()
{
types = new LinkedHashSet<Type>();
@@ -217,6 +208,7 @@
{
DependentContext.INSTANCE.setActive(true);
T instance = proxyClass.newInstance();
+ creationalContext.push(instance);
((ProxyObject) instance).setHandler(new EnterpriseBeanProxyMethodHandler(this, ejbDescriptor.getRemoveMethods()));
if (log.isTraceEnabled())
log.trace("Enterprise bean instance created for bean " + this);
@@ -254,19 +246,8 @@
}
}
- /**
- * Calls all initializers of the bean
- *
- * @param instance The bean instance
- */
- protected void callInitializers(T instance)
- {
- for (AnnotatedMethod<?> initializer : getInitializerMethods())
- {
- initializer.invoke(manager, instance);
- }
- }
+
/**
* Injects EJBs and common fields
*/
@@ -314,19 +295,23 @@
{
try
{
- manager.getInjectionPointProvider().pushBean(this);
+ CreationalContext<T> creationalContext = new CreationalContext<T>()
+ {
+
+ public void push(T incompleteInstance) {};
+
+ };
DependentContext.INSTANCE.setCurrentInjectionInstance(instance);
DependentContext.INSTANCE.setActive(true);
bindDecorators();
bindInterceptors();
injectEjbAndCommonFields();
- injectBoundFields(instance);
- callInitializers(instance);
+ injectBoundFields(instance, creationalContext);
+ callInitializers(instance, creationalContext);
}
finally
{
DependentContext.INSTANCE.clearCurrentInjectionInstance(instance);
- manager.getInjectionPointProvider().popBean();
DependentContext.INSTANCE.setActive(false);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -19,6 +19,8 @@
import java.lang.reflect.Field;
+import javax.context.CreationalContext;
+
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.jlr.AnnotatedFieldImpl;
@@ -78,7 +80,7 @@
@Override
- public T produceInstance()
+ protected T produceInstance(CreationalContext<T> creationalContext)
{
return field.get(getReceiver());
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -21,12 +21,14 @@
import java.lang.reflect.Method;
import java.util.Set;
+import javax.context.CreationalContext;
import javax.event.Observes;
import javax.inject.DefinitionException;
import javax.inject.Disposes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.MetaDataCache;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.injection.ParameterInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
@@ -43,7 +45,7 @@
public class ProducerMethodBean<T> extends AbstractProducerBean<T, Method>
{
// The underlying method
- private AnnotatedMethod<T> method;
+ private MethodInjectionPoint<T> method;
private AnnotatedMethod<?> disposalMethod;
@@ -70,13 +72,13 @@
protected ProducerMethodBean(AnnotatedMethod<T> method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
{
super(declaringBean, manager);
- this.method = method;
+ this.method = MethodInjectionPoint.of(this, method);
init();
}
- public T produceInstance()
+ protected T produceInstance(CreationalContext<T> creationalContext)
{
- return method.invoke(getReceiver(), manager);
+ return method.invoke(getReceiver(), manager, creationalContext);
}
/**
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -35,6 +35,7 @@
import org.jboss.webbeans.MetaDataCache;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.injection.AnnotatedInjectionPoint;
+import org.jboss.webbeans.injection.ConstructorInjectionPoint;
import org.jboss.webbeans.injection.FieldInjectionPoint;
import org.jboss.webbeans.injection.InjectionPointProvider;
import org.jboss.webbeans.injection.MethodInjectionPoint;
@@ -64,7 +65,7 @@
// Empty list representing no-args
private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
// The constructor
- private AnnotatedConstructor<T> constructor;
+ private ConstructorInjectionPoint<T> constructor;
// The post-construct method
private AnnotatedMethod<?> postConstruct;
// The pre-destroy method
@@ -125,23 +126,22 @@
{
DependentContext.INSTANCE.setActive(true);
InjectionPointProvider injectionPointProvider = manager.getInjectionPointProvider();
- injectionPointProvider.pushBean(this);
T instance = null;
try
{
- instance = constructor.newInstance(manager);
+ instance = constructor.newInstance(manager, creationalContext);
+ creationalContext.push(instance);
DependentContext.INSTANCE.setCurrentInjectionInstance(instance);
bindDecorators();
bindInterceptors();
injectEjbAndCommonFields(instance);
- injectBoundFields(instance);
- callInitializers(instance);
+ injectBoundFields(instance, creationalContext);
+ callInitializers(instance, creationalContext);
callPostConstruct(instance);
}
finally
{
DependentContext.INSTANCE.clearCurrentInjectionInstance(instance);
- injectionPointProvider.popBean();
}
return instance;
}
@@ -187,7 +187,7 @@
try
{
// note: RI supports injection into @PreDestroy
- preDestroy.invoke(instance, manager);
+ preDestroy.invoke(instance);
}
catch (Exception e)
{
@@ -208,8 +208,7 @@
{
try
{
- // note: RI supports injection into @PostConstruct
- postConstruct.invoke(instance, manager);
+ postConstruct.invoke(instance);
}
catch (Exception e)
{
@@ -217,19 +216,6 @@
}
}
}
-
- /**
- * Calls any initializers
- *
- * @param instance The instance to invoke the initializers on
- */
- protected void callInitializers(T instance)
- {
- for (AnnotatedMethod<?> initializer : getInitializerMethods())
- {
- initializer.invoke(instance, manager);
- }
- }
protected void initEjbInjectionPoints()
{
@@ -331,13 +317,6 @@
{
injectionPoints.add(ParameterInjectionPoint.of(this, parameter));
}
- for (AnnotatedMethod<?> initializer : getInitializerMethods())
- {
- for (AnnotatedParameter<?> parameter : initializer.getParameters())
- {
- injectionPoints.add(ParameterInjectionPoint.of(this, parameter));
- }
- }
}
/**
@@ -408,7 +387,7 @@
}
else if (initializerAnnotatedConstructors.size() == 1)
{
- this.constructor = initializerAnnotatedConstructors.iterator().next();
+ this.constructor = ConstructorInjectionPoint.of(this, initializerAnnotatedConstructors.iterator().next());
log.trace("Exactly one constructor (" + constructor + ") annotated with @Initializer defined, using it as the bean constructor for " + getType());
return;
}
@@ -416,7 +395,7 @@
if (getAnnotatedItem().getConstructor(NO_ARGUMENTS) != null)
{
- this.constructor = getAnnotatedItem().getConstructor(NO_ARGUMENTS);
+ this.constructor = ConstructorInjectionPoint.of(this, getAnnotatedItem().getConstructor(NO_ARGUMENTS));
log.trace("Exactly one constructor (" + constructor + ") defined, using it as the bean constructor for " + getType());
return;
}
@@ -515,7 +494,7 @@
public String toString()
{
StringBuilder buffer = new StringBuilder();
- buffer.append("Annotated " + Names.scopeTypeToString(getScopeType()));
+ buffer.append(Names.scopeTypeToString(getScopeType()));
if (getName() == null)
{
buffer.append("unnamed simple bean");
@@ -524,8 +503,8 @@
{
buffer.append("simple bean '" + getName() + "'");
}
- buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
+ buffer.append(" ").append(getType().getName()).append(", ");
+ buffer.append(" API types = ").append(Names.typesToString(getTypes())).append(", binding types = " + Names.annotationsToString(getBindings()));
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -98,7 +98,7 @@
private <T> T getProxiedInstance(Bean<T> bean)
{
Context context = CurrentManager.rootManager().getContext(bean.getScopeType());
- return context.get(bean, CreationalContextImpl.<T>newInstance());
+ return context.get(bean, new CreationalContextImpl<T>(bean));
}
/**
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -1,19 +1,47 @@
package org.jboss.webbeans.context;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.context.CreationalContext;
+import javax.inject.manager.Bean;
public class CreationalContextImpl<T> implements CreationalContext<T>
{
- public static final <T> CreationalContextImpl<T> newInstance()
+ private final Map<Bean<?>, Object> incompleteInstances;
+ private final Bean<T> bean;
+
+ public CreationalContextImpl(Bean<T> bean)
{
- return new CreationalContextImpl<T>();
+ this.incompleteInstances = new HashMap<Bean<?>, Object>();
+ this.bean = bean;
}
+ private CreationalContextImpl(Bean<T> bean, Map<Bean<?>, Object> incompleteInstances)
+ {
+ this.incompleteInstances = incompleteInstances;
+ this.bean = bean;
+ }
+
public void push(T incompleteInstance)
{
- // TODO Auto-generated method stub
-
+ incompleteInstances.put(bean, incompleteInstance);
}
+ public <S> CreationalContextImpl<S> getCreationalContext(Bean<S> bean)
+ {
+ return new CreationalContextImpl<S>(bean, incompleteInstances);
+ }
+
+ public <S> S getIncompleteInstance(Bean<S> bean)
+ {
+ return (S) incompleteInstances.get(bean);
+ }
+
+ public boolean containsIncompleteInstance(Bean<?> bean)
+ {
+ return incompleteInstances.containsKey(bean);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -44,6 +44,7 @@
import org.jboss.webbeans.bean.AbstractBean;
import org.jboss.webbeans.bean.AbstractClassBean;
import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.transaction.UserTransaction;
@@ -72,7 +73,7 @@
}
private final Bean<?> observerBean;
- private final AnnotatedMethod<?> observerMethod;
+ private final MethodInjectionPoint<?> observerMethod;
private TransactionObservationPhase transactionObservationPhase;
private final boolean conditional;
private ManagerImpl manager;
@@ -104,7 +105,7 @@
{
this.manager = manager;
this.observerBean = observerBean;
- this.observerMethod = observer;
+ this.observerMethod = MethodInjectionPoint.of(observerBean, observer);
checkObserverMethod();
@SuppressWarnings("unchecked")
@@ -200,7 +201,7 @@
DependentContext.INSTANCE.setCurrentInjectionInstance(dependentsCollector);
}
// Get the most specialized instance of the component
- instance = manager.getInstance(observerBean, !isConditional());
+ instance = getInstance(observerBean);
if (instance == null)
{
return;
@@ -211,7 +212,7 @@
}
else
{
- observerMethod.invokeWithSpecialValue(instance, Observes.class, event, manager);
+ observerMethod.invokeWithSpecialValue(instance, Observes.class, event, manager, null);
}
}
catch (ExecutionException e)
@@ -238,6 +239,11 @@
}
}
}
+
+ private <B> B getInstance(Bean<B> observerBean)
+ {
+ return manager.getInstance(observerBean, !isConditional());
+ }
/**
* Checks if there is currently a transaction active
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/AnnotatedInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/AnnotatedInjectionPoint.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/AnnotatedInjectionPoint.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -1,7 +1,6 @@
package org.jboss.webbeans.injection;
import javax.inject.manager.InjectionPoint;
-import javax.inject.manager.Manager;
import org.jboss.webbeans.introspector.AnnotatedItem;
@@ -9,14 +8,6 @@
{
/**
- * Injects using the value provided by the manager.
- *
- * @param declaringInstance The instance to inject into
- * @param manager The Web Beans manager
- */
- public void inject(Object declaringInstance, Manager manager);
-
- /**
* Injects an instance
*
*
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -0,0 +1,155 @@
+package org.jboss.webbeans.injection;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.util.AbstractList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.context.CreationalContext;
+import javax.inject.Produces;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.introspector.AnnotatedConstructor;
+import org.jboss.webbeans.introspector.AnnotatedParameter;
+import org.jboss.webbeans.introspector.ForwardingAnnotatedConstructor;
+
+public class ConstructorInjectionPoint<T> extends ForwardingAnnotatedConstructor<T> implements AnnotatedInjectionPoint<T, Constructor<T>>
+{
+
+ private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?>>
+ {
+
+ protected abstract List<? extends AnnotatedParameter<?>> delegate();
+
+ protected abstract Bean<?> declaringBean();;
+
+ @Override
+ public ParameterInjectionPoint<?> get(int index)
+ {
+ return ParameterInjectionPoint.of(declaringBean, delegate().get(index));
+ }
+
+ @Override
+ public int size()
+ {
+ return delegate().size();
+ }
+
+ }
+
+ private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
+
+ private final Bean<?> declaringBean;
+ private final AnnotatedConstructor<T> constructor;
+
+ public static <T> ConstructorInjectionPoint<T> of(Bean<?> declaringBean, AnnotatedConstructor<T> constructor)
+ {
+ return new ConstructorInjectionPoint<T>(declaringBean, constructor);
+ }
+
+ protected ConstructorInjectionPoint(Bean<?> declaringBean, AnnotatedConstructor<T> constructor)
+ {
+ this.declaringBean = declaringBean;
+ this.constructor = constructor;
+ }
+
+ @Override
+ protected AnnotatedConstructor<T> delegate()
+ {
+ return constructor;
+ }
+
+ public Annotation[] getAnnotations()
+ {
+ return delegate().getAnnotationStore().getAnnotations().toArray(EMPTY_ANNOTATION_ARRAY);
+ }
+
+ public Bean<?> getBean()
+ {
+ return declaringBean;
+ }
+
+ public Set<Annotation> getBindings()
+ {
+ return delegate().getBindingTypes();
+ }
+
+ public T newInstance(ManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ return delegate().newInstance(getParameterValues(getParameters(), null, null, manager, creationalContext));
+ }
+
+ @Override
+ public List<ParameterInjectionPoint<?>> getParameters()
+ {
+ final List<? extends AnnotatedParameter<?>> delegate = super.getParameters();
+ return new ForwardingParameterInjectionPointList()
+ {
+
+ @Override
+ protected Bean<?> declaringBean()
+ {
+ return declaringBean;
+ }
+
+ @Override
+ protected List<? extends AnnotatedParameter<?>> delegate()
+ {
+ return delegate;
+ }
+
+ };
+ }
+
+ public void inject(Object declaringInstance, Object value)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Helper method for getting the current parameter values from a list of
+ * annotated parameters.
+ *
+ * @param parameters The list of annotated parameter to look up
+ * @param manager The Web Beans manager
+ * @return The object array of looked up values
+ */
+ protected Object[] getParameterValues(List<ParameterInjectionPoint<?>> parameters, Object specialVal, Class<? extends Annotation> specialParam, ManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ Object[] parameterValues = new Object[parameters.size()];
+ boolean producerMethod = this.isAnnotationPresent(Produces.class);
+ InjectionPointProvider injectionPointProvider = manager.getInjectionPointProvider();
+ Iterator<ParameterInjectionPoint<?>> iterator = parameters.iterator();
+ for (int i = 0; i < parameterValues.length; i++)
+ {
+ ParameterInjectionPoint<?> param = iterator.next();
+ if (specialParam != null && param.isAnnotationPresent(specialParam))
+ {
+ parameterValues[i] = specialVal;
+ }
+ else
+ {
+ if (!producerMethod)
+ {
+ injectionPointProvider.pushInjectionPoint(param);
+ }
+ try
+ {
+ parameterValues[i] = param.getValueToInject(manager, creationalContext);
+ }
+ finally
+ {
+ if (!producerMethod)
+ {
+ injectionPointProvider.popInjectionPoint();
+ }
+ }
+ }
+ }
+ return parameterValues;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -4,8 +4,10 @@
import java.lang.reflect.Field;
import java.util.Set;
+import javax.context.CreationalContext;
import javax.inject.manager.Bean;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.ForwardingAnnotatedField;
@@ -47,6 +49,11 @@
public Set<Annotation> getBindings()
{
return delegate().getAnnotationStore().getBindingTypes();
- }
-
+ }
+
+ public void inject(Object declaringInstance, ManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ delegate().inject(declaringInstance, manager.getInstanceToInject(this, creationalContext));
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -19,11 +19,8 @@
import java.util.Stack;
-import javax.inject.manager.Bean;
import javax.inject.manager.InjectionPoint;
-import org.jboss.webbeans.introspector.AnnotatedParameter;
-
/**
* Provides injection point metadata
*
@@ -32,35 +29,10 @@
*/
public class InjectionPointProvider
{
- // The stack of beans
- private final Stack<Bean<?>> beans = new Stack<Bean<?>>();
// The stack of injection points
private final Stack<InjectionPoint> injectionPoints = new Stack<InjectionPoint>();
-
/**
- * Pushes a bean to the stack
- *
- * @param currentBean The bean to push
- */
- public void pushBean(Bean<?> currentBean)
- {
- beans.push(currentBean);
- }
-
- /**
- * Pops a bean from the stack
- */
- public void popBean()
- {
- if (beans.isEmpty())
- {
- return;
- }
- beans.pop();
- }
-
- /**
* Pushes an injection point to the stack
*
* @param injectionPoint The injection point to push
@@ -68,26 +40,7 @@
public void pushInjectionPoint(AnnotatedInjectionPoint<?, ?> injectionPoint)
{
injectionPoints.push(injectionPoint);
- if (beans.size() != injectionPoints.size())
- {
- throw new IllegalStateException("Number of beans on stack is inconsistent with number of injection points: " + this);
- }
}
-
- /**
- * Pushes an injection point to the stack
- *
- * @param injectionPoint The injection point to push
- */
- // TODO Not sure if this is right, we should be able to push the current bean in somehow
- public void pushInjectionPoint(AnnotatedParameter<?> parameter)
- {
- injectionPoints.push(ParameterInjectionPoint.of(getCurrentBean(), parameter));
- if (beans.size() != injectionPoints.size())
- {
- throw new IllegalStateException("Number of beans on stack is inconsistent with number of injection points: " + this);
- }
- }
/**
* Pops an injection point
@@ -121,30 +74,10 @@
return injectionPoints.size() < 2 ? null : injectionPoints.elementAt(injectionPoints.size() - 2);
}
- /**
- * Gets the current bean
- *
- * @return The current bean or null if there is none on the stack
- */
- protected Bean<?> getCurrentBean()
- {
- return beans.isEmpty() ? null : beans.peek();
- }
-
- /**
- * Gets the previous bean
- *
- * @return The previous bean or null if there is none on the stack
- */
- protected Bean<?> getPreviousBean()
- {
- return beans.size() < 2 ? null : beans.elementAt(beans.size() - 2);
- }
-
@Override
public String toString()
{
- return "InjectionPointProvider: Bean stack = " + beans.toString() + " InjectionPoint stack = " + injectionPoints.toString();
+ return "InjectionPoint stack = " + injectionPoints.toString();
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -2,17 +2,44 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.AbstractList;
+import java.util.Iterator;
+import java.util.List;
import java.util.Set;
+import javax.context.CreationalContext;
+import javax.inject.Produces;
import javax.inject.manager.Bean;
-import javax.inject.manager.Manager;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.ForwardingAnnotatedMethod;
public class MethodInjectionPoint<T> extends ForwardingAnnotatedMethod<T> implements AnnotatedInjectionPoint<T, Method>
{
+ private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?>>
+ {
+
+ protected abstract List<? extends AnnotatedParameter<?>> delegate();
+
+ protected abstract Bean<?> declaringBean();;
+
+ @Override
+ public ParameterInjectionPoint<?> get(int index)
+ {
+ return ParameterInjectionPoint.of(declaringBean, delegate().get(index));
+ }
+
+ @Override
+ public int size()
+ {
+ return delegate().size();
+ }
+
+ }
+
private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
private final Bean<?> declaringBean;
@@ -50,14 +77,84 @@
return delegate().getBindingTypes();
}
- public void inject(Object declaringInstance, Manager manager)
+ public T invoke(Object declaringInstance, ManagerImpl manager, CreationalContext<?> creationalContext)
{
- delegate().invoke(declaringInstance, manager);
+ return delegate().invoke(declaringInstance, getParameterValues(getParameters(), null, null, manager, creationalContext));
}
+ public T invokeWithSpecialValue(Object declaringInstance, Class<? extends Annotation> annotatedParameter, Object parameter, ManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ return delegate().invoke(declaringInstance, getParameterValues(getParameters(), annotatedParameter, parameter, manager, creationalContext));
+ }
+
+ @Override
+ public List<ParameterInjectionPoint<?>> getParameters()
+ {
+ final List<? extends AnnotatedParameter<?>> delegate = super.getParameters();
+ return new ForwardingParameterInjectionPointList()
+ {
+
+ @Override
+ protected Bean<?> declaringBean()
+ {
+ return declaringBean;
+ }
+
+ @Override
+ protected List<? extends AnnotatedParameter<?>> delegate()
+ {
+ return delegate;
+ }
+
+ };
+ }
+
public void inject(Object declaringInstance, Object value)
{
delegate().invoke(declaringInstance, value);
}
+
+ /**
+ * Helper method for getting the current parameter values from a list of
+ * annotated parameters.
+ *
+ * @param parameters The list of annotated parameter to look up
+ * @param manager The Web Beans manager
+ * @return The object array of looked up values
+ */
+ protected Object[] getParameterValues(List<ParameterInjectionPoint<?>> parameters, Class<? extends Annotation> specialParam, Object specialVal, ManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ Object[] parameterValues = new Object[parameters.size()];
+ boolean producerMethod = this.isAnnotationPresent(Produces.class);
+ InjectionPointProvider injectionPointProvider = manager.getInjectionPointProvider();
+ Iterator<ParameterInjectionPoint<?>> iterator = parameters.iterator();
+ for (int i = 0; i < parameterValues.length; i++)
+ {
+ ParameterInjectionPoint<?> param = iterator.next();
+ if (specialParam != null && param.isAnnotationPresent(specialParam))
+ {
+ parameterValues[i] = specialVal;
+ }
+ else
+ {
+ if (!producerMethod)
+ {
+ injectionPointProvider.pushInjectionPoint(param);
+ }
+ try
+ {
+ parameterValues[i] = param.getValueToInject(manager, creationalContext);
+ }
+ finally
+ {
+ if (!producerMethod)
+ {
+ injectionPointProvider.popInjectionPoint();
+ }
+ }
+ }
+ }
+ return parameterValues;
+ }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -4,9 +4,10 @@
import java.lang.reflect.Member;
import java.util.Set;
+import javax.context.CreationalContext;
import javax.inject.manager.Bean;
-import javax.inject.manager.Manager;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.ForwardingAnnotatedParameter;
@@ -55,14 +56,14 @@
return delegate().getDeclaringMember().getMember();
}
- public void inject(Object declaringInstance, Manager manager)
+ public void inject(Object declaringInstance, Object value)
{
throw new UnsupportedOperationException();
}
- public void inject(Object declaringInstance, Object value)
+ public T getValueToInject(ManagerImpl manager, CreationalContext<?> creationalContext)
{
- throw new UnsupportedOperationException();
+ return manager.<T>getInstanceToInject(this, creationalContext);
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -21,8 +21,6 @@
import java.lang.reflect.Constructor;
import java.util.List;
-import org.jboss.webbeans.ManagerImpl;
-
/**
* Represents a Class Constructor
*
@@ -38,7 +36,7 @@
* @return A set of abstracted parameters. Returns an empty set if there are
* no parameters
*/
- public List<AnnotatedParameter<?>> getParameters();
+ public List<? extends AnnotatedParameter<?>> getParameters();
/**
* Gets all parameters to the constructor which are annotated with
@@ -53,10 +51,9 @@
/**
* Creates a new instance of the class, using this constructor
*
- * @param manager The Web Beans manager
* @return The created instance
*/
- public T newInstance(ManagerImpl manager);
+ public T newInstance(Object... parameters);
/**
* Gets the declaring class of the annotation
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -39,14 +39,6 @@
public Field getAnnotatedField();
/**
- * Injects into the field using the value provided by the manager.
- *
- * @param declaringInstance The instance to inject into
- * @param manager The Web Beans manager
- */
- public void inject(Object declaringInstance, Manager manager);
-
- /**
* Injects an instance
*
*
@@ -67,18 +59,6 @@
*/
public void injectIntoInstance(Object declaringInstance, Object value);
- /**
- * Injects an instance
- *
- * Unlike {@link #inject(Object, Manager)} the field injected into is
- * discovered from the declaring instance. This is slower, but safe to use
- * with proxies.
- *
- * @param declaringInstance The instance to inject
- * @param manager The Web Beans manager
- */
- public void injectIntoInstance(Object declaringInstance, Manager manager);
-
public T get(Object instance);
/**
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -33,8 +33,6 @@
import javax.event.Observes;
import javax.inject.Disposes;
-import org.jboss.webbeans.ManagerImpl;
-
/**
* AnnotatedType provides a uniform access to the annotations on an annotated
* class defined either in Java or XML
@@ -53,7 +51,7 @@
* @return A list of parameters. Returns an empty list if no parameters are
* present.
*/
- public List<AnnotatedParameter<?>> getParameters();
+ public List<? extends AnnotatedParameter<?>> getParameters();
/**
* Gets the list of annotated parameters for a given annotation
@@ -73,10 +71,10 @@
* Invokes the method
*
* @param instance The instance to invoke
- * @param manager The Web Beans manager
+ * @param parameters The method parameters
* @return A reference to the instance
*/
- public T invoke(Object instance, ManagerImpl manager);
+ public T invoke(Object instance, Object... parameters);
/**
* Invokes the method on the class of the passed instance, not the declaring
@@ -86,28 +84,9 @@
* @param manager The Web Beans manager
* @return A reference to the instance
*/
- public T invokeOnInstance(Object instance, ManagerImpl manager);
+ public T invokeOnInstance(Object instance, Object... parameters);
/**
- * Invokes the observer method
- *
- * @param instance The instance to invoke
- * @param event the event object
- * @param manager The Web Beans manager
- * @return A reference to the instance
- */
- public T invokeWithSpecialValue(Object instance, Class<? extends Annotation> specialParam, Object specialVal, ManagerImpl manager);
-
- /**
- * Invokes the method
- *
- * @param instance The instance to invoke
- * @param parameters The method parameters
- * @return A reference to the instance
- */
- public T invoke(Object instance, Object... parameters);
-
- /**
* Gets the declaring class
*
* @return An abstraction of the declaring class
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedConstructor.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedConstructor.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -21,8 +21,6 @@
import java.util.List;
import java.util.Set;
-import org.jboss.webbeans.ManagerImpl;
-
public abstract class ForwardingAnnotatedConstructor<T> extends ForwardingAnnotatedMember<T, Constructor<T>> implements AnnotatedConstructor<T>
{
@@ -39,14 +37,14 @@
return delegate().getDeclaringClass();
}
- public List<AnnotatedParameter<?>> getParameters()
+ public List<? extends AnnotatedParameter<?>> getParameters()
{
return delegate().getParameters();
}
- public T newInstance(ManagerImpl manager)
+ public T newInstance(Object... parameters)
{
- return delegate().newInstance(manager);
+ return delegate().newInstance(parameters);
}
public AnnotatedConstructor<T> wrap(Set<Annotation> annotations)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedField.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedField.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedField.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -20,8 +20,6 @@
import java.lang.reflect.Field;
import java.util.Set;
-import javax.inject.manager.Manager;
-
public abstract class ForwardingAnnotatedField<T> extends ForwardingAnnotatedMember<T, Field> implements AnnotatedField<T>
{
@@ -48,11 +46,6 @@
return delegate().getPropertyName();
}
- public void inject(Object declaringInstance, Manager manager)
- {
- delegate().inject(declaringInstance, manager);
- }
-
public void inject(Object declaringInstance, Object value)
{
delegate().inject(declaringInstance, value);
@@ -63,11 +56,6 @@
delegate().injectIntoInstance(declaringInstance, value);
}
- public void injectIntoInstance(Object declaringInstance, Manager manager)
- {
- delegate().injectIntoInstance(declaringInstance, manager);
- }
-
public boolean isTransient()
{
return delegate().isTransient();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -45,7 +45,7 @@
*/
public <A extends Annotation> A getAnnotation(Class<A> annotationType)
{
- return getAnnotationStore().getAnnotation(annotationType);
+ return delegate().getAnnotation(annotationType);
}
/**
@@ -53,7 +53,7 @@
*/
public Set<Annotation> getAnnotationsAsSet()
{
- return getAnnotationStore().getAnnotations();
+ return delegate().getAnnotationsAsSet();
}
/**
@@ -61,7 +61,7 @@
*/
public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
- return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ return delegate().getMetaAnnotations(metaAnnotationType);
}
/**
@@ -69,7 +69,7 @@
*/
public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
{
- return getAnnotationStore().getMetaAnnotationsAsArray(metaAnnotationType);
+ return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
}
/**
@@ -78,7 +78,7 @@
@Deprecated
public Set<Annotation> getBindingTypes()
{
- return getAnnotationStore().getBindingTypes();
+ return delegate().getBindingTypes();
}
/**
@@ -87,31 +87,36 @@
@Deprecated
public Annotation[] getBindingTypesAsArray()
{
- return getAnnotationStore().getBindingTypesAsArray();
+ return delegate().getBindingTypesAsArray();
}
-
+
/**
* @see org.jboss.webbeans.introspector.AnnotatedItem
*/
- public String getName()
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
{
- return delegate().getName();
+ return delegate().isAnnotationPresent(annotationType);
}
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
/**
* @see org.jboss.webbeans.introspector.AnnotatedItem
*/
- public Class<T> getType()
+ public String getName()
{
- return delegate().getType();
+ return delegate().getName();
}
/**
* @see org.jboss.webbeans.introspector.AnnotatedItem
*/
- public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ public Class<T> getType()
{
- return getAnnotationStore().isAnnotationPresent(annotationType);
+ return delegate().getType();
}
/**
@@ -191,11 +196,6 @@
{
return delegate().toString();
}
-
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
- {
- return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
- }
/**
* Gets the annotated item
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedMethod.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedMethod.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -49,7 +49,7 @@
return delegate().getParameterTypesAsArray();
}
- public List<AnnotatedParameter<?>> getParameters()
+ public List<? extends AnnotatedParameter<?>> getParameters()
{
return delegate().getParameters();
}
@@ -69,16 +69,11 @@
return delegate().invoke(instance, parameters);
}
- public T invokeOnInstance(Object instance, ManagerImpl manager)
+ public T invokeOnInstance(Object instance, Object... parameters)
{
- return delegate().invokeOnInstance(instance, manager);
+ return delegate().invokeOnInstance(instance, parameters);
}
- public T invokeWithSpecialValue(Object instance, Class<? extends Annotation> specialParam, Object specialVal, ManagerImpl manager)
- {
- return delegate().invokeWithSpecialValue(instance, specialParam, specialVal, manager);
- }
-
public boolean isEquivalent(Method method)
{
return delegate().isEquivalent(method);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedClass.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedClass.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedClass.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -43,4 +43,67 @@
return annotationStore;
}
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+ {
+ return getAnnotationStore().getAnnotation(annotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getAnnotationsAsSet()
+ {
+ return getAnnotationStore().getAnnotations();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotationsAsArray(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Set<Annotation> getBindingTypes()
+ {
+ return getAnnotationStore().getBindingTypes();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Annotation[] getBindingTypesAsArray()
+ {
+ return getAnnotationStore().getBindingTypesAsArray();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return getAnnotationStore().isAnnotationPresent(annotationType);
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedField.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedField.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedField.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -42,4 +42,67 @@
return annotationStore;
}
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+ {
+ return getAnnotationStore().getAnnotation(annotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getAnnotationsAsSet()
+ {
+ return getAnnotationStore().getAnnotations();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotationsAsArray(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Set<Annotation> getBindingTypes()
+ {
+ return getAnnotationStore().getBindingTypes();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Annotation[] getBindingTypesAsArray()
+ {
+ return getAnnotationStore().getBindingTypesAsArray();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return getAnnotationStore().isAnnotationPresent(annotationType);
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedMethod.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedMethod.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -43,4 +43,67 @@
return annotationStore;
}
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+ {
+ return getAnnotationStore().getAnnotation(annotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getAnnotationsAsSet()
+ {
+ return getAnnotationStore().getAnnotations();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotationsAsArray(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Set<Annotation> getBindingTypes()
+ {
+ return getAnnotationStore().getBindingTypes();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Annotation[] getBindingTypesAsArray()
+ {
+ return getAnnotationStore().getBindingTypesAsArray();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return getAnnotationStore().isAnnotationPresent(annotationType);
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedParameter.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedParameter.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/WrappedAnnotatedParameter.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -48,4 +48,67 @@
return annotationStore;
}
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+ {
+ return getAnnotationStore().getAnnotation(annotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getAnnotationsAsSet()
+ {
+ return getAnnotationStore().getAnnotations();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotationsAsArray(metaAnnotationType);
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Set<Annotation> getBindingTypes()
+ {
+ return getAnnotationStore().getBindingTypes();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ @Deprecated
+ public Annotation[] getBindingTypesAsArray()
+ {
+ return getAnnotationStore().getBindingTypesAsArray();
+ }
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return getAnnotationStore().isAnnotationPresent(annotationType);
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -22,16 +22,12 @@
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.inject.BindingType;
-import javax.inject.Produces;
import javax.inject.manager.Manager;
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.injection.InjectionPointProvider;
import org.jboss.webbeans.introspector.AnnotatedMember;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.AnnotationStore;
@@ -200,60 +196,4 @@
return getDelegate();
}
- /**
- * Helper method for getting the current parameter values from a list of
- * annotated parameters.
- *
- * @param parameters The list of annotated parameter to look up
- * @param manager The Web Beans manager
- * @return The object array of looked up values
- */
- protected Object[] getParameterValues(List<AnnotatedParameter<?>> parameters, ManagerImpl manager)
- {
- return getParameterValues(parameters, null, null, manager);
- }
-
- /**
- * Helper method for getting the current parameter values from a list of
- * annotated parameters.
- *
- * @param parameters The list of annotated parameter to look up
- * @param manager The Web Beans manager
- * @return The object array of looked up values
- */
- protected Object[] getParameterValues(List<AnnotatedParameter<?>> parameters, Object specialVal, Class<? extends Annotation> specialParam, ManagerImpl manager)
- {
- Object[] parameterValues = new Object[parameters.size()];
- boolean producerMethod = this.isAnnotationPresent(Produces.class);
- InjectionPointProvider injectionPointProvider = manager.getInjectionPointProvider();
- Iterator<AnnotatedParameter<?>> iterator = parameters.iterator();
- for (int i = 0; i < parameterValues.length; i++)
- {
- AnnotatedParameter<?> param = iterator.next();
- if (specialParam != null && param.isAnnotationPresent(specialParam))
- {
- parameterValues[i] = specialVal;
- }
- else
- {
- if (!producerMethod)
- {
- injectionPointProvider.pushInjectionPoint(param);
- }
- try
- {
- parameterValues[i] = param.getValue(manager);
- }
- finally
- {
- if (!producerMethod)
- {
- injectionPointProvider.popInjectionPoint();
- }
- }
- }
- }
- return parameterValues;
- }
-
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -623,7 +623,7 @@
{
return toString;
}
- toString = "Annotated class " + Names.class2String(getDelegate());
+ toString = "Annotated class " + Names.classToString(getDelegate());
return toString;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -192,11 +192,11 @@
*
* @see org.jboss.webbeans.introspector.AnnotatedConstructor#newInstance(ManagerImpl)
*/
- public T newInstance(ManagerImpl manager)
+ public T newInstance(Object... parameters)
{
try
{
- return getDelegate().newInstance(getParameterValues(parameters, manager));
+ return getDelegate().newInstance(parameters);
}
catch (IllegalArgumentException e)
{
@@ -269,7 +269,7 @@
{
return toString;
}
- toString = "Annotated method " + Names.constructor2String(constructor);
+ toString = "Annotated method " + Names.constructorToString(constructor);
return toString;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedFieldImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedFieldImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedFieldImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -21,8 +21,6 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
-import javax.inject.manager.Manager;
-
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.AnnotationStore;
@@ -114,25 +112,7 @@
{
return actualTypeArguments;
}
-
- /**
- * Gets the current value and injects this instance into an instance
- *
- * @param instance The instance to inject into
- * @param manager The Web Beans manager
- * @see org.jboss.webbeans.introspector.AnnotatedField#inject(Object,
- * Manager)
- */
- public void inject(Object instance, Manager manager)
- {
- Reflections.setAndWrap(getDelegate(), instance, getValue(manager));
- }
- public void injectIntoInstance(Object instance, Manager manager)
- {
- Reflections.setAndWrap(getName(), instance, getValue(manager));
- }
-
public void inject(Object instance, Object value)
{
Reflections.setAndWrap(getDelegate(), instance, value);
@@ -185,7 +165,7 @@
{
return toString;
}
- toString = "Annotated field " + Names.field2String(field);
+ toString = "Annotated field " + Names.fieldToString(field);
return toString;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -26,7 +26,6 @@
import java.util.Collections;
import java.util.List;
-import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.AnnotatedType;
@@ -231,56 +230,19 @@
return this.getDeclaringClass().isEquivalent(method.getDeclaringClass()) && this.getName().equals(method.getName()) && Arrays.equals(this.getParameterTypesAsArray(), method.getParameterTypes());
}
- /**
- * Gets the hash code (of the delegate)
- *
- * @return The hash code
- */
@Override
public int hashCode()
{
return getDelegate().hashCode();
}
-
- /**
- * Invokes the method on an instance with current parameters from manager
- *
- * @param instance The instance to invoke on
- * @param manager The Web Beans manager
- * @return The return value of the invocation
- * @see org.jboss.webbeans.introspector.AnnotatedMethod#invoke(ManagerImpl,
- * Object)
- */
- public T invoke(Object instance, ManagerImpl manager)
- {
- @SuppressWarnings("unchecked")
- T result = (T) Reflections.invokeAndWrap(getDelegate(), instance, getParameterValues(parameters, manager));
- return result;
- }
- public T invokeOnInstance(Object instance, ManagerImpl manager)
+ public T invokeOnInstance(Object instance, Object...parameters)
{
@SuppressWarnings("unchecked")
- T result = (T) Reflections.invokeAndWrap(getName(), getParameterTypesAsArray(), instance, getParameterValues(parameters, manager));
+ T result = (T) Reflections.invokeAndWrap(getName(), getParameterTypesAsArray(), instance, parameters);
return result;
}
- public T invokeWithSpecialValue(Object instance, Class<? extends Annotation> specialParam, Object specialVal, ManagerImpl manager)
- {
- @SuppressWarnings("unchecked")
- T result = (T) Reflections.invokeAndWrap(getDelegate(), instance, getParameterValues(parameters, specialVal, specialParam, manager));
- return result;
- }
-
- /**
- * Invokes the method on an instance with given parameters
- *
- * @param instance The instance to invoke on
- * @param parameters The parameters
- *
- * @see org.jboss.webbeans.introspector.AnnotatedMethod#invoke(Object,
- * Object...)
- */
public T invoke(Object instance, Object... parameters)
{
@SuppressWarnings("unchecked")
@@ -324,7 +286,7 @@
{
return toString;
}
- toString = "Annotated method " + Names.method2String(method);
+ toString = "Annotated method " + Names.methodToString(method);
return toString;
}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/Resolver.java (from rev 1246, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/Resolver.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/Resolver.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -0,0 +1,390 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.webbeans.lookup;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.Callable;
+
+import javax.inject.TypeLiteral;
+import javax.inject.manager.Bean;
+import javax.inject.manager.Decorator;
+import javax.inject.manager.InjectionPoint;
+import javax.inject.manager.InterceptionType;
+import javax.inject.manager.Interceptor;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.MetaDataCache;
+import org.jboss.webbeans.bean.InjectionPointBean;
+import org.jboss.webbeans.introspector.AnnotatedItem;
+import org.jboss.webbeans.introspector.ForwardingAnnotatedItem;
+import org.jboss.webbeans.model.BindingTypeModel;
+import org.jboss.webbeans.util.ConcurrentCache;
+import org.jboss.webbeans.util.ListComparator;
+
+/**
+ * Implementation of Web Beans type safe and name based bean resolution
+ *
+ * @author Pete Muir
+ */
+public class Resolver
+{
+ private static final long serialVersionUID = 1L;
+
+ private static final Class<AnnotatedItem<Object, Object>> ANNOTATED_ITEM_GENERIFIED_WITH_OBJECT_OBJECT = new TypeLiteral<AnnotatedItem<Object, Object>>(){}.getRawType();
+ private static final Class<Set<Bean<Object>>> BEAN_SET_GENERIFIED_WITH_OBJECT = new TypeLiteral<Set<Bean<Object>>>(){}.getRawType();
+ private static final Class<Set<Bean<?>>> BEAN_SET_GENERIFIED_WITH_WILDCARD = new TypeLiteral<Set<Bean<?>>>(){}.getRawType();
+
+ /**
+ * Extension of an element which bases equality not only on type, but also on
+ * binding type
+ */
+ private abstract class ResolvableAnnotatedItem<T, S> extends ForwardingAnnotatedItem<T, S>
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof AnnotatedItem)
+ {
+ AnnotatedItem<?, ?> that = (AnnotatedItem<?, ?>) other;
+ return delegate().isAssignableFrom(that) && that.getBindingTypes().equals(this.getBindingTypes());
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Resolvable annotated item for " + delegate();
+ }
+
+ }
+
+ // The resolved injection points
+ private ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>> resolvedInjectionPoints;
+ // The registerd injection points
+ private Set<AnnotatedItem<?, ?>> injectionPoints;
+ // The resolved names
+ private ConcurrentCache<String, Set<Bean<?>>> resolvedNames;
+ // The Web Beans manager
+ private ManagerImpl manager;
+
+ /**
+ * Constructor
+ *
+ * @param manager The Web Beans manager
+ */
+ public Resolver(ManagerImpl manager)
+ {
+ this.injectionPoints = new HashSet<AnnotatedItem<?, ?>>();
+ this.resolvedInjectionPoints = new ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>>();
+ this.resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
+ this.manager = manager;
+ }
+
+ /**
+ * Add multiple injection points for later resolving using
+ * {@link #registerInjectionPoint(AnnotatedItem)}. Useful during bootstrap.
+ *
+ * @param elements The injection points to add
+ */
+ public void addInjectionPoints(Collection<? extends AnnotatedItem<?, ?>> elements)
+ {
+ injectionPoints.addAll(elements);
+ }
+
+ /**
+ * Registers an injection point
+ *
+ * @param <T>
+ * @param <S>
+ * @param element The injection point to add
+ * @return A set of matching beans for the injection point
+ */
+ private <T, S> Set<Bean<T>> registerInjectionPoint(final ResolvableAnnotatedItem<T, S> element)
+ {
+ Callable<Set<Bean<T>>> callable = new Callable<Set<Bean<T>>>()
+ {
+
+ public Set<Bean<T>> call() throws Exception
+ {
+ return retainHighestPrecedenceBeans(getMatchingBeans(element, manager.getBeans()), manager.getEnabledDeploymentTypes());
+ }
+
+ };
+ return resolvedInjectionPoints.putIfAbsent(element, callable);
+ }
+
+ /**
+ * Reset all cached injection points. You must reset all cached injection
+ * points when you add a bean to the manager
+ */
+ public void clear()
+ {
+ this.resolvedInjectionPoints = new ConcurrentCache<ResolvableAnnotatedItem<?, ?>, Set<Bean<?>>>();
+ resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
+ }
+
+ /**
+ * Resolve all injection points added using
+ * {@link #addInjectionPoints(Collection)}
+ */
+ public void resolveInjectionPoints()
+ {
+ for (final AnnotatedItem<? extends Object, ? extends Object> injectable : injectionPoints)
+ {
+
+ registerInjectionPoint(new ResolvableAnnotatedItem<Object, Object>()
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public AnnotatedItem<Object, Object> delegate()
+ {
+ return ANNOTATED_ITEM_GENERIFIED_WITH_OBJECT_OBJECT.cast(injectable);
+ }
+ });
+ }
+ }
+
+ /**
+ * Get the possible beans for the given element
+ *
+ * @param key The resolving criteria
+ * @return An unmodifiable set of matching beans
+ */
+ public <T, S> Set<Bean<T>> get(final AnnotatedItem<T, S> key)
+ {
+ Set<Bean<T>> beans = new HashSet<Bean<T>>();
+
+ final ResolvableAnnotatedItem<T, S> element = new ResolvableAnnotatedItem<T, S>()
+ {
+
+ @Override
+ public AnnotatedItem<T, S> delegate()
+ {
+ return key;
+ }
+
+ };
+
+ if (InjectionPoint.class.isAssignableFrom(element.getType()))
+ {
+ beans.add(InjectionPointBean.of(key, manager));
+ }
+ else
+ {
+ beans = registerInjectionPoint(element);
+ }
+ return Collections.unmodifiableSet(beans);
+ }
+
+ /**
+ * Get the possible beans for the given name
+ *
+ * @param name The name to match
+ * @return The set of matching beans
+ */
+ public Set<Bean<? extends Object>> get(final String name)
+ {
+ return resolvedNames.putIfAbsent(name, new Callable<Set<Bean<?>>>()
+ {
+
+ public Set<Bean<? extends Object>> call() throws Exception
+ {
+
+ Set<Bean<?>> beans = new HashSet<Bean<?>>();
+ for (Bean<?> bean : manager.getBeans())
+ {
+ if ((bean.getName() == null && name == null) || (bean.getName() != null && bean.getName().equals(name)))
+ {
+ beans.add(bean);
+ }
+ }
+ return retainHighestPrecedenceBeans(beans, manager.getEnabledDeploymentTypes());
+ }
+
+ // Helper method to deal with dynamic casts being needed
+ private Set<Bean<?>> retainHighestPrecedenceBeans(Set<Bean<?>> beans, List<Class<? extends Annotation>> enabledDeploymentTypes)
+ {
+ return BEAN_SET_GENERIFIED_WITH_WILDCARD.cast(Resolver.retainHighestPrecedenceBeans(BEAN_SET_GENERIFIED_WITH_OBJECT.cast(beans), enabledDeploymentTypes));
+ }
+
+ });
+ }
+
+
+
+ /**
+ * Filters out the beans with the highest enabled deployment type
+ *
+ * @param <T>
+ * @param beans The beans to filter
+ * @param enabledDeploymentTypes The enabled deployment types
+ * @return The filtered beans
+ */
+ private static <T> Set<Bean<T>> retainHighestPrecedenceBeans(Set<Bean<T>> beans, List<Class<? extends Annotation>> enabledDeploymentTypes)
+ {
+ if (beans.size() > 0)
+ {
+ SortedSet<Class<? extends Annotation>> possibleDeploymentTypes = new TreeSet<Class<? extends Annotation>>(new ListComparator<Class<? extends Annotation>>(enabledDeploymentTypes));
+ for (Bean<?> bean : beans)
+ {
+ possibleDeploymentTypes.add(bean.getDeploymentType());
+ }
+ possibleDeploymentTypes.retainAll(enabledDeploymentTypes);
+ Set<Bean<T>> trimmed = new HashSet<Bean<T>>();
+ if (possibleDeploymentTypes.size() > 0)
+ {
+ Class<? extends Annotation> highestPrecedencePossibleDeploymentType = possibleDeploymentTypes.last();
+
+ for (Bean<T> bean : beans)
+ {
+ if (bean.getDeploymentType().equals(highestPrecedencePossibleDeploymentType))
+ {
+ trimmed.add(bean);
+ }
+ }
+ }
+ return trimmed;
+ }
+ else
+ {
+ return beans;
+ }
+ }
+
+ /**
+ * Gets the matching beans for binding criteria from a list of beans
+ *
+ * @param <T> The type of the beans
+ * @param element The binding criteria
+ * @param beans The beans to filter
+ * @return A set of filtered beans
+ */
+ private <T> Set<Bean<T>> getMatchingBeans(AnnotatedItem<T, ?> element, List<Bean<?>> beans)
+ {
+ Set<Bean<T>> resolvedBeans = new HashSet<Bean<T>>();
+ for (Bean<?> bean : beans)
+ {
+ if (element.isAssignableFrom(bean.getTypes()) && containsAllBindingBindingTypes(element, bean.getBindings()))
+ {
+ @SuppressWarnings("unchecked")
+ Bean<T> b = (Bean<T>) bean;
+ resolvedBeans.add(b);
+ }
+ }
+ return resolvedBeans;
+ }
+
+ /**
+ * Checks if binding criteria fulfill all binding types
+ *
+ * @param element The binding criteria to check
+ * @param bindingTypes The binding types to check
+ * @return True if all matches, false otherwise
+ */
+ private boolean containsAllBindingBindingTypes(AnnotatedItem<?, ?> element, Set<Annotation> bindingTypes)
+ {
+ for (Annotation bindingType : element.getBindingTypes())
+ {
+ BindingTypeModel<?> bindingTypeModel = MetaDataCache.instance().getBindingTypeModel(bindingType.annotationType());
+ if (bindingTypeModel.getNonBindingTypes().size() > 0)
+ {
+ boolean matchFound = false;
+ for (Annotation otherBindingType : bindingTypes)
+ {
+ if (bindingTypeModel.isEqual(bindingType, otherBindingType))
+ {
+ matchFound = true;
+ }
+ }
+ if (!matchFound)
+ {
+ return false;
+ }
+ }
+ else if (!bindingTypes.contains(bindingType))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Resolves decorators according to binding criteria
+ *
+ * @param types The set of API types to match
+ * @param bindingTypes The binding types to match
+ * @return The set of matching decorators
+ */
+ public List<Decorator> resolveDecorators(Set<Type> types, Annotation[] bindingTypes)
+ {
+ // TODO Implement decorators
+ return Collections.emptyList();
+ }
+
+ /**
+ * Resolves interceptors according to binding criteria
+ *
+ * @param types The set of API types to match
+ * @param bindingTypes The binding types to match
+ * @return The set of matching interceptors
+ */
+ public List<Interceptor> resolveInterceptors(InterceptionType type, Annotation[] interceptorBindings)
+ {
+ // TODO Implement interceptors
+ return null;
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append("Resolver\n");
+ buffer.append("Injection points: " + injectionPoints.size() + "\n");
+ buffer.append("Resolved injection points: " + resolvedInjectionPoints.size() + "\n");
+ buffer.append("Resolved names points: " + resolvedNames.size() + "\n");
+ return buffer.toString();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/lookup/Resolver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Names.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Names.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Names.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -22,9 +22,11 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -50,9 +52,16 @@
String scopeName = scopeType.getSimpleName();
Matcher matcher = CAPITAL_LETTERS.matcher(scopeName);
StringBuilder result = new StringBuilder();
+ int i = 0;
while (matcher.find())
{
- result.append(matcher.group().toLowerCase() + " ");
+ String name = matcher.group();
+ if (i > 0)
+ {
+ name = name.toLowerCase();
+ }
+ result.append(name).append(" ");
+ i++;
}
return result.toString();
}
@@ -80,7 +89,7 @@
* @param delimiter The delimeter
* @return The string representation
*/
- private static String list2String(List<String> list, String delimiter)
+ private static String listToString(List<String> list, String delimiter)
{
StringBuilder buffer = new StringBuilder();
for (String item : list)
@@ -157,7 +166,7 @@
* @param annotations The annotations
* @return The string representation
*/
- public static String annotations2String(Annotation[] annotations)
+ private static String annotationsToString(Annotation[] annotations)
{
StringBuilder buffer = new StringBuilder();
for (Annotation annotation : annotations)
@@ -174,13 +183,13 @@
* @param field The field
* @return The string representation
*/
- public static String field2String(Field field)
+ public static String fieldToString(Field field)
{
if (!field.isAccessible())
{
field.setAccessible(true);
}
- return " Field " + annotations2String(field.getAnnotations()) + list2String(parseModifiers(field.getModifiers()), " ") + field.getName() + ";\n";
+ return " Field " + annotationsToString(field.getAnnotations()) + listToString(parseModifiers(field.getModifiers()), " ") + field.getName();
}
/**
@@ -189,13 +198,13 @@
* @param method The method
* @return The string representation
*/
- public static String method2String(Method method)
+ public static String methodToString(Method method)
{
if (!method.isAccessible())
{
method.setAccessible(true);
}
- return " Method " + method.getReturnType().getSimpleName() + " " + annotations2String(method.getAnnotations()) + list2String(parseModifiers(method.getModifiers()), " ") + method.getName() + "(" + parameters2String(method.getParameterTypes(), method.getParameterAnnotations(), false) + ");\n";
+ return " Method " + method.getReturnType().getSimpleName() + " " + annotationsToString(method.getAnnotations()) + listToString(parseModifiers(method.getModifiers()), " ") + method.getName() + "(" + parametersToString(method.getParameterTypes(), method.getParameterAnnotations(), false) + ");\n";
}
/**
@@ -204,9 +213,9 @@
* @param annotation The annotation
* @return The string representation
*/
- public static String annotation2String(Annotation annotation)
+ public static String annotationToString(Annotation annotation)
{
- return "Annotation " + annotations2String(annotation.annotationType().getAnnotations()) + annotation.annotationType().getSimpleName();
+ return "Annotation " + annotationsToString(annotation.annotationType().getAnnotations()) + annotation.annotationType().getSimpleName();
}
/**
@@ -215,9 +224,9 @@
* @param constructor The method
* @return The string representation
*/
- public static String constructor2String(Constructor<?> constructor)
+ public static String constructorToString(Constructor<?> constructor)
{
- return " Constructor " + annotations2String(constructor.getAnnotations()) + list2String(parseModifiers(constructor.getModifiers()), " ") + constructor.getDeclaringClass().getSimpleName() + "(" + parameters2String(constructor.getParameterTypes(), constructor.getParameterAnnotations(), true) + ");\n";
+ return " Constructor " + annotationsToString(constructor.getAnnotations()) + listToString(parseModifiers(constructor.getModifiers()), " ") + constructor.getDeclaringClass().getSimpleName() + "(" + parametersToString(constructor.getParameterTypes(), constructor.getParameterAnnotations(), true) + ");\n";
}
/**
@@ -228,7 +237,7 @@
* @param annotations The annotation map
* @return The string representation
*/
- private static String parameters2String(Class<?>[] parameterTypes, Annotation[][] annotations, boolean constructor)
+ private static String parametersToString(Class<?>[] parameterTypes, Annotation[][] annotations, boolean constructor)
{
StringBuilder buffer = new StringBuilder();
int start = constructor ? 1 : 0;
@@ -238,7 +247,7 @@
{
buffer.append(", ");
}
- buffer.append(annotations2String(annotations[i]) + type2String(parameterTypes[i]));
+ buffer.append(annotationsToString(annotations[i]) + typeToString(parameterTypes[i]));
}
return buffer.toString();
}
@@ -249,9 +258,9 @@
* @param clazz The type
* @return The string representation
*/
- public static String type2String(Class<?> clazz)
+ private static String typeToString(Class<?> clazz)
{
- return annotations2String(clazz.getAnnotations()) + clazz.getName();
+ return annotationsToString(clazz.getAnnotations()) + clazz.getSimpleName();
}
/**
@@ -260,23 +269,66 @@
* @param clazz The class
* @return The string representation
*/
- public static String class2String(Class<?> clazz)
+ public static String classToString(Class<?> clazz)
{
StringBuilder buffer = new StringBuilder();
- buffer.append("Class " + type2String(clazz) + "\n");
+ buffer.append("Class " + typeToString(clazz) + "\n");
for (Field field : clazz.getFields())
{
- buffer.append(field2String(field));
+ buffer.append(fieldToString(field));
}
for (Constructor<?> constructor : clazz.getConstructors())
{
- buffer.append(constructor2String(constructor));
+ buffer.append(constructorToString(constructor));
}
for (Method method : clazz.getMethods())
{
- buffer.append(method2String(method));
+ buffer.append(methodToString(method));
}
return buffer.toString();
}
+
+ public static String typesToString(Set<Type> types)
+ {
+ StringBuilder buffer = new StringBuilder();
+ int i = 0;
+ buffer.append("[");
+ for (Type type : types)
+ {
+ if (i > 0)
+ {
+ buffer.append(", ");
+ }
+ if (type instanceof Class<?>)
+ {
+ buffer.append(((Class<?>) type).getSimpleName());
+ }
+ else
+ {
+ buffer.append(type.toString());
+ }
+ i++;
+ }
+ buffer.append("]");
+ return buffer.toString();
+ }
+
+ public static String annotationsToString(Set<Annotation> annotations)
+ {
+ StringBuilder buffer = new StringBuilder();
+ int i = 0;
+ buffer.append("[");
+ for (Annotation annotation : annotations)
+ {
+ if (i > 0)
+ {
+ buffer.append(", ");
+ }
+ buffer.append("@").append(annotation.annotationType().getSimpleName());
+ i++;
+ }
+ buffer.append("]");
+ return buffer.toString();
+ }
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -6,8 +6,14 @@
@ApplicationScoped
class Air
{
+
+ public Air()
+ {
+
+ }
+
@Initializer
- public Air(Fish fish)
+ public Air(Bird bird)
{
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -7,12 +7,17 @@
class Bird
{
- private Water water;
+ private Air air;
+ public Bird()
+ {
+
+ }
+
@Initializer
- public Bird(Water water)
+ public Bird(Air air)
{
- this.water = water;
+ this.air = air;
}
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -7,7 +7,7 @@
{
- @Test(groups="broken")
+ @Test(groups="broken", timeOut=1000)
public void testCircularInjectionOnTwoNormalBeans() throws Exception
{
deployBeans(Pig.class, Food.class);
@@ -16,17 +16,46 @@
assert Food.success;
}
- @Test(groups="broken")
+ @Test
public void testCircularInjectionOnOneNormalAndOneDependentBean() throws Exception
{
deployBeans(Car.class, Petrol.class);
- manager.getInstanceByType(Petrol.class).getName();
- assert Petrol.success;
- assert Car.success;
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Car.class).getName();
+ assert Petrol.success;
+ assert Car.success;
+ }
+
+ }.run();
+
}
+ @Test
+ public void testCircularInjectionOnOneDependentAndOneNormalBean() throws Exception
+ {
+ deployBeans(Car.class, Petrol.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Petrol.class).getName();
+ assert Petrol.success;
+ assert Car.success;
+ }
+
+ }.run();
+
+ }
- @Test(groups="broken")
+
+ @Test(timeOut=1000)
public void testCircularInjectionOnTwoSimpleDependentBeans() throws Exception
{
deployBeans(Foo.class, Bar.class);
@@ -44,7 +73,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(groups="broken", timeOut=1000)
public void testDependentProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean() throws Exception
{
deployBeans(DependentSelfConsumingDependentProducer.class);
@@ -124,7 +153,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(groups="broken", timeOut=1000)
public void testDependentSelfConsumingProducer() throws Exception
{
deployBeans(DependentLoopingProducer.class);
@@ -140,7 +169,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(groups="broken", timeOut=1000)
public void testDependentCircularConstructors() throws Exception
{
deployBeans(Water.class, Fish.class);
@@ -156,7 +185,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(timeOut=1000)
public void testNormalCircularConstructors() throws Exception
{
deployBeans(Bird.class, Air.class);
@@ -172,7 +201,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(timeOut=1000)
public void testNormalAndDependentCircularConstructors() throws Exception
{
deployBeans(Space.class, Planet.class);
@@ -188,7 +217,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(groups="broken", timeOut=1000)
public void testSelfConsumingConstructorsOnDependentBean() throws Exception
{
deployBeans(Farm.class);
@@ -204,7 +233,7 @@
}.run();
}
- @Test(groups="broken")
+ @Test(timeOut=1000)
public void testSelfConsumingConstructorsOnNormalBean() throws Exception
{
deployBeans(House.class);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -7,9 +7,20 @@
class House
{
+ public House()
+ {
+ // TODO Auto-generated constructor stub
+ }
+
@Initializer
- public House(House farm)
+ public House(House house)
{
+ house.ping();
}
+ private void ping()
+ {
+
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -5,12 +5,12 @@
class Planet
{
- private Water water;
+ private Space space;
@Initializer
- public Planet(Water water)
+ public Planet(Space space)
{
- this.water = water;
+ this.space = space;
}
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -6,8 +6,14 @@
@ApplicationScoped
class Space
{
+
+ public Space()
+ {
+ // TODO Auto-generated constructor stub
+ }
+
@Initializer
- public Space(Fish fish)
+ public Space(Planet planet)
{
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java 2009-01-28 14:08:40 UTC (rev 1261)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java 2009-01-28 14:14:12 UTC (rev 1262)
@@ -1,6 +1,8 @@
package org.jboss.webbeans.test.unit.lookup.circular;
-class Violation
+import java.io.Serializable;
+
+class Violation implements Serializable
{
public void ping()
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1261 - ri/trunk/webbeans-api/src/main/java/javax/context.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-28 09:08:40 -0500 (Wed, 28 Jan 2009)
New Revision: 1261
Modified:
ri/trunk/webbeans-api/src/main/java/javax/context/Contextual.java
Log:
ws
Modified: ri/trunk/webbeans-api/src/main/java/javax/context/Contextual.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/context/Contextual.java 2009-01-28 12:32:45 UTC (rev 1260)
+++ ri/trunk/webbeans-api/src/main/java/javax/context/Contextual.java 2009-01-28 14:08:40 UTC (rev 1261)
@@ -20,8 +20,8 @@
import javax.inject.CreationException;
/**
- * The contract between a context and a contextual type
- * This interface should not be implemented directly by the application.
+ * The contract between a context and a contextual type This interface should
+ * not be implemented directly by the application.
*
* @author Nicklas Karlsson
* @author Pete Muir
@@ -31,17 +31,20 @@
/**
* Create a new instance of the contextual type
*
- * @param creationalContext the creational context in which incompletely
- * initialized contexts may be placed
+ * @param creationalContext
+ * the creational context in which incompletely initialized
+ * contexts may be placed
* @return the contextual instance
- * @throws CreationException if a checked exception occurs whilst creating
- * the instance
+ * @throws CreationException
+ * if a checked exception occurs whilst creating the instance
*/
public T create(CreationalContext<T> creationalContext);
-
+
/**
* Destroys an instance of the contexual type
- * @param instance the insance to destroy
+ *
+ * @param instance
+ * the insance to destroy
*/
public void destroy(T instance);
}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1260 - doc/trunk/reference.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-28 07:32:45 -0500 (Wed, 28 Jan 2009)
New Revision: 1260
Modified:
doc/trunk/reference/pom.xml
Log:
webdav
Modified: doc/trunk/reference/pom.xml
===================================================================
--- doc/trunk/reference/pom.xml 2009-01-28 09:00:59 UTC (rev 1259)
+++ doc/trunk/reference/pom.xml 2009-01-28 12:32:45 UTC (rev 1260)
@@ -145,6 +145,13 @@
</plugin>
</plugins>
</pluginManagement>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
</build>
<profiles>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1259 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit: inheritance/specialization/enterprise and 8 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-28 04:00:59 -0500 (Wed, 28 Jan 2009)
New Revision: 1259
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/ResolutionByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injectionpoint/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/manager/ManagerTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/InstantiationByTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/ResolutionByTypeTest.java
Log:
updated inheritance and lookup tests to latest spec
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/realization/RealizationTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -13,6 +13,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class RealizationTest extends AbstractTest
{
@@ -28,7 +33,7 @@
return deploymentTypes;
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerMethodHasSameScope()
{
deployBeans(Cow.class);
@@ -36,7 +41,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerMethodHasDeploymentTypeOfRealizingClass()
{
deployBeans(Cow.class);
@@ -44,7 +49,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerMethodHasSameBindings()
{
deployBeans(Cow.class);
@@ -53,7 +58,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
}
- @Test@SpecAssertion(section="4.1")
+ @Test@SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerMethodHasBindingsOfMethodAndRealizingType()
{
deployBeans(TameCow.class);
@@ -62,7 +67,7 @@
assert annotationSetMatches(manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings(), Smelly.class, Tame.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerMethodHasSameStereotypes()
{
deployBeans(LabradorKennel.class);
@@ -76,7 +81,7 @@
assert false;
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasSameScope()
{
deployBeans(Horse.class);
@@ -84,7 +89,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasDeploymentTypeOfRealizingClass()
{
deployBeans(Horse.class);
@@ -92,7 +97,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasSameBindings()
{
deployBeans(Horse.class);
@@ -101,7 +106,7 @@
assert manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Smelly.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasBindingsOfMethodAndRealizingType()
{
deployBeans(TameHorse.class);
@@ -110,7 +115,7 @@
assert annotationSetMatches(manager.resolveByType(Dung.class, SMELLY_LITERAL).iterator().next().getBindings(), Smelly.class, Tame.class);
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasSameStereotypes()
{
deployBeans(Stable.class);
@@ -118,25 +123,25 @@
assert manager.resolveByType(Horse.class).iterator().next().getScopeType().equals(RequestScoped.class);
}
- @Test(groups="stub") @SpecAssertion(section="4.1")
+ @Test(groups="stub") @SpecAssertion(section="4.4")
public void testRealizedBeanWithProducerFieldHasSameInterceptorBindings()
{
assert false;
}
- @Test(groups="stub") @SpecAssertion(section="4.1")
+ @Test(groups="stub") @SpecAssertion(section="4.4")
public void testDisposalMethodInherited()
{
assert false;
}
- @Test(groups="stub") @SpecAssertion(section="4.1")
+ @Test(groups="stub") @SpecAssertion(section="4.4")
public void testRealizedDisposalMethodHasBindingsOfMethodAndRealizingType()
{
assert false;
}
- @Test @SpecAssertion(section="4.1")
+ @Test @SpecAssertion(section="4.4")
public void testObserverMethodInheritedAndHasSameBindings()
{
deployBeans(FarmHouse.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -15,8 +15,8 @@
import org.testng.annotations.Test;
/**
- * @see Section 3.2.7, 3.3.7, 3.4.5, 6.7, 6.8, 8.5.8
*
+ * Spec version: PRD2
*/
public class EnterpriseBeanSpecializationTest extends AbstractTest
{
@@ -32,7 +32,8 @@
private static Annotation LANDOWNER_LITERAL = new AnnotationLiteral<Landowner>() {};
- @Test @SpecAssertion(section = {"4.3.1", "3.2.7"})
+ @Test
+ @SpecAssertion(section = {"4.3.1", "3.2.7"})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
deployBeans(Farmer.class, LazyFarmer.class);
@@ -51,13 +52,15 @@
assert manager.resolveByType(Farmer.class, LANDOWNER_LITERAL).iterator().next().getName().equals("farmer");
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section = "4.3.1")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section = "4.3.1")
public void testSpecializingAndSpecializedBeanHasName()
{
deployBeans(FarmYard_Broken.class);
}
- @Test(groups="broken") @SpecAssertion(section={"4.3.1", "3.2.7"})
+ @Test(groups="broken")
+ @SpecAssertion(section={"4.3.1", "3.2.7"})
public void testSpecializedBeanNotInstantiated() throws Exception
{
deployBeans(LazyFarmer.class, Farmer.class);
@@ -74,13 +77,15 @@
}.run();
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(Farmer.class, OrganicFarmer_Broken.class);
}
- @Test(groups="broken") @SpecAssertion(section="4.3.1")
+ @Test(groups="broken")
+ @SpecAssertion(section="4.3.1")
public void testProducerMethodOnSpecializedBeanCalledOnSpecializingBean() throws Exception
{
deployBeans(Office.class, Building.class);
@@ -97,37 +102,43 @@
}.run();
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(Farmer.class, SheepFarmer_Broken.class, FishFarmer_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.2.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassDirectlyExtendsSimpleBean()
{
deployBeans(Tractor_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.2.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassDirectlyExtendsNothing()
{
deployBeans(Cow_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.2.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassImplementsInterfaceAndExtendsNothing()
{
deployBeans(Donkey_Broken.class);
}
- @Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.3.7")
+ @Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.3.7")
public void testSpecializingBeanDoesNotSupportAllLocalInterfacesOnSpecializedBean()
{
assert false;
}
- @Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.3.7")
+ @Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.3.7")
public void testSpecializingBeanDoesNotSupportLocalInterfaceView()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -15,7 +15,7 @@
import org.testng.annotations.Test;
/**
- * @see Section 3.2.7, 3.3.7, 3.4.5, 6.7, 6.8, 8.5.8
+ * Spec version: PRD2
*
*/
public class ProducerMethodSpecializationTest extends AbstractTest
@@ -72,31 +72,36 @@
}.run();
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(ClothesShop_Broken.class);
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(PictureShop_Broken.class, Bookshop_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4.5")
public void testSpecializedStaticMethod()
{
deployBeans(FurnitureShop_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4.5")
public void testSpecializedMethodDoesNotOverrideAnotherProducerMethod()
{
deployBeans(FurnitureShop_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4.5")
public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod()
{
deployBeans(ShoeShop_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -15,7 +15,7 @@
import org.testng.annotations.Test;
/**
- * @see Section 3.2.7, 3.3.7, 3.4.5, 6.7, 6.8, 8.5.8
+ * Spec version: PRD2
*
*/
public class SimpleBeanSpecializationTest extends AbstractTest
@@ -32,7 +32,7 @@
private static Annotation LANDOWNER_LITERAL = new AnnotationLiteral<Landowner>() {};
- @Test @SpecAssertion(section = {"4.3.1", "3.3.7"})
+ @Test @SpecAssertion(section = {"4.3.1", "3.2.7"})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
deployBeans(LazyFarmer.class);
@@ -42,7 +42,7 @@
assert annotationSetMatches( manager.resolveByType(Farmer.class, LANDOWNER_LITERAL).iterator().next().getBindings(), Landowner.class, Lazy.class);
}
- @Test @SpecAssertion(section = {"4.3.1", "3.3.7"})
+ @Test @SpecAssertion(section = {"4.3.1", "3.2.7"})
public void testSpecializingBeanHasNameOfSpecializedBean()
{
deployBeans(LazyFarmer.class);
@@ -57,7 +57,7 @@
deployBeans(FarmYard_Broken.class);
}
- @Test @SpecAssertion(section={"4.3.1", "3.3.7"})
+ @Test @SpecAssertion(section={"4.3.1", "3.2.7"})
public void testSpecializedBeanNotInstantiated() throws Exception
{
deployBeans(LazyFarmer.class, Farmer.class);
@@ -74,7 +74,8 @@
}.run();
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(OrganicFarmer_Broken.class);
@@ -97,25 +98,29 @@
}.run();
}
- @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class)
+ @SpecAssertion(section="4.3.1")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(SheepFarmer_Broken.class, FishFarmer_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.3.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassDirectlyExtendsEnterpriseBean()
{
deployBeans(FarmEquipment.class, Tractor_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.3.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassDirectlyExtendsNothing()
{
deployBeans(Cow_Broken.class);
}
- @Test(groups={"specialization"},expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.3.7")
+ @Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.7")
public void testSpecializingClassImplementsInterfaceAndExtendsNothing()
{
deployBeans(Donkey_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -5,14 +5,17 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class InstantiationByNameTest extends AbstractTest
{
- @Test(groups="resolution") @SpecAssertion(section="4.10")
+ @Test(groups="resolution") @SpecAssertion(section="5.10")
public void testNoWebBeansFound() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -23,7 +26,8 @@
assert manager.getInstanceByName("foo") == null;
}
- @Test(expectedExceptions=AmbiguousDependencyException.class) @SpecAssertion(section="4.10.1")
+ @Test(expectedExceptions=AmbiguousDependencyException.class)
+ @SpecAssertion(section="5.7.1")
public void testAmbiguousDependencies() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -36,7 +40,7 @@
manager.getInstanceByName("whitefish");
}
- @Test(groups={"resolution", "beanLifecycle"}) @SpecAssertion(section="4.10.1")
+ @Test(groups={"resolution", "beanLifecycle"}) @SpecAssertion(section="5.7.1")
public void testGetInstanceByName()
{
Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
@@ -66,7 +70,7 @@
}
}
- @Test(groups={"stub", "resolution", "el"}) @SpecAssertion(section="4.10")
+ @Test(groups={"stub", "resolution", "el"}) @SpecAssertion(section="5.10")
public void testGetInstanceByNameCalledOncePerDistinctNameInElExpression()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/ResolutionByNameTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/ResolutionByNameTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -8,10 +8,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ResolutionByNameTest extends AbstractTest
{
@@ -32,7 +35,8 @@
* Web Bean by calling Manager.getInstance(), passing the Bean instance representing
* the Web Bean
*/
- @Test(groups={"stub", "el"}) @SpecAssertion(section="5.11")
+ @Test(groups={"stub", "el"})
+ @SpecAssertion(section="5.11")
public void testELResolver()
{
assert manager.getInstanceByName("nonexistant") == null;
@@ -54,7 +58,8 @@
* � Otherwise, if resolveByName() returned more than one Web Bean, throw an
* AmbiguousDependencyException.
*/
- @Test(expectedExceptions=AmbiguousDependencyException.class) @SpecAssertion(section="5.11")
+ @Test(expectedExceptions=AmbiguousDependencyException.class)
+ @SpecAssertion(section="5.11")
public void testDuplicateNamedBeans()
{
try
@@ -75,7 +80,7 @@
}
}
- @Test @SpecAssertion(section="5.11.1")
+ @Test @SpecAssertion(section="5.11")
public void testNamedBasedResolution()
{
@@ -107,7 +112,7 @@
assert manager.resolveByName("whitefish").contains(plaiceBean);
}
- @Test(groups="resolution") @SpecAssertion(section="5.11.1")
+ @Test(groups="resolution") @SpecAssertion(section="5.11")
public void testNoWebBeansFound() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -128,7 +133,7 @@
* highest precedence deployment type that occurs in the set. If there are no matching Web Beans,
* an empty set is returned.
*/
- @Test(groups="stub") @SpecAssertion(section="5.11.1")
+ @Test(groups="stub") @SpecAssertion(section="5.11")
public void testOnlyHighestPrecedenceResolved()
{
// Both Cod and Plaice are named "whitefish" - Plaice has the highest deployment type (AnotherDeploymentType)
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -12,10 +12,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ClientProxyTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -12,11 +12,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class InjectionTest extends AbstractTest
{
@@ -110,44 +113,38 @@
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.7.2")
+ @SpecAssertion(section = "3.8.2")
public void testInjectFieldsDeclaredInXml()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.7.2")
+ @SpecAssertion(section = "3.8.2")
public void testInjectedFieldDeclaredInXmlIgnoresJavaAnnotations()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.7.2")
+ @SpecAssertion(section = "3.8.2")
public void testInjectedFieldDeclaredInXmlAssumesCurrent()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.7.2")
+ @SpecAssertion(section = "3.8.2")
public void testNonexistentFieldDefinedInXml()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.7.2")
+ @SpecAssertion(section = "3.8.2")
public void testInjectFieldsDeclaredInXmlAndJava()
{
assert false;
}
- /*
- *
- * @Test(groups="injection") @SpecAssertion(section="4.2") public void test {
- * assert false; }
- */
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -41,13 +41,13 @@
*
* @author David Allen
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081222")
public class InjectionPointTest extends AbstractTest
{
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetBean()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -71,7 +71,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetType()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -92,7 +92,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetBindingTypes()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -115,7 +115,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetMemberField()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -136,7 +136,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetMemberMethod()
{
deployBeans(MethodInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -162,7 +162,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetMemberConstructor()
{
deployBeans(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -188,7 +188,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetAnnotation()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -209,7 +209,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testGetAnnotations()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -233,7 +233,7 @@
}
@Test(groups = { "injectionPoint", "broken" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testStandardDeployment()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -254,7 +254,7 @@
}
@Test(groups = { "injectionPoint", "broken" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testDependentScope()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -275,7 +275,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testApiTypeInjectionPoint()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -296,7 +296,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
+ @SpecAssertion(section = "5.6")
public void testCurrentBinding()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/manager/ManagerTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/manager/ManagerTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -4,9 +4,15 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ManagerTest extends AbstractTest
{
- @Test(groups={"manager", "injection", "deployment"}) @SpecAssertion(section="5.8")
+ @Test(groups={"manager", "injection", "deployment"})
+ @SpecAssertion(section="5.7")
public void testInjectingManager() throws Exception
{
deployBeans(FishFarmOffice.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/InstantiationByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/InstantiationByTypeTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/InstantiationByTypeTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -13,11 +13,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class InstantiationByTypeTest extends AbstractTest
{
@@ -29,7 +32,8 @@
return deploymentTypes;
}
- @Test(groups={"resolution", "beanLifecycle"}) @SpecAssertion(section="5.9")
+ @Test(groups={"resolution", "beanLifecycle"})
+ @SpecAssertion(section="5.8")
public void testCurrentBindingTypeAssumed()
{
Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
@@ -37,32 +41,37 @@
assert manager.getInstanceByType(Tuna.class) != null;
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.8")
public void testParameterizedTypeWithWildcardParameter()
{
manager.getInstanceByType(new TypeLiteral<ParameterizedBean_Broken<?>>(){});
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.8")
public <T> void testParameterizedTypeWithTypeParameter()
{
manager.getInstanceByType(new TypeLiteral<ParameterizedBean_Broken<T>>(){});
}
- @Test(groups="resolution", expectedExceptions=DuplicateBindingTypeException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=DuplicateBindingTypeException.class)
+ @SpecAssertion(section="5.8")
public void testDuplicateBindingTypesUsed()
{
manager.getInstanceByType(Tuna.class, new CurrentBinding(), new CurrentBinding());
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.8")
public void testNonBindingTypeUsed()
{
manager.getInstanceByType(Tuna.class, new AnotherDeploymentTypeLiteral());
}
- @Test(expectedExceptions=AmbiguousDependencyException.class) @SpecAssertion(section="5.9")
+ @Test(expectedExceptions=AmbiguousDependencyException.class)
+ @SpecAssertion(section="5.8")
public void testAmbiguousDependencies() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -74,7 +83,8 @@
manager.getInstanceByType(ScottishFish.class, new AnnotationLiteral<Whitefish>(){});
}
- @Test(expectedExceptions=UnsatisfiedDependencyException.class) @SpecAssertion(section="5.9")
+ @Test(expectedExceptions=UnsatisfiedDependencyException.class)
+ @SpecAssertion(section="5.8")
public void testUnsatisfiedDependencies() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -86,7 +96,8 @@
manager.getInstanceByType(Tuna.class, new CurrentBinding());
}
- @Test(expectedExceptions=UnproxyableDependencyException.class) @SpecAssertion(section="5.9")
+ @Test(expectedExceptions=UnproxyableDependencyException.class)
+ @SpecAssertion(section="5.8")
public void testUnproxyableDependencies() throws Exception
{
deployBeans(FinalTuna_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/ResolutionByTypeTest.java 2009-01-28 08:29:38 UTC (rev 1258)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/typesafe/ResolutionByTypeTest.java 2009-01-28 09:00:59 UTC (rev 1259)
@@ -13,11 +13,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ResolutionByTypeTest extends AbstractTest
{
@@ -29,7 +32,8 @@
return deploymentTypes;
}
- @Test(groups="resolution") @SpecAssertion(section="5.9.2")
+ @Test(groups="resolution")
+ @SpecAssertion(section="5.9")
public void testDefaultBindingTypeAssumed() throws Exception
{
Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
@@ -39,31 +43,36 @@
assert possibleTargets.contains(tunaBean);
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.9")
public void testParameterizedTypeWithWildcardParameter()
{
manager.resolveByType(new TypeLiteral<ParameterizedBean_Broken<?>>(){});
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.9")
public <T> void testParameterizedTypeWithTypeParameter()
{
manager.resolveByType(new TypeLiteral<ParameterizedBean_Broken<T>>(){});
}
- @Test(groups="resolution", expectedExceptions=DuplicateBindingTypeException.class) @SpecAssertion(section="5.9.2")
+ @Test(groups="resolution", expectedExceptions=DuplicateBindingTypeException.class)
+ @SpecAssertion(section="5.9")
public void testDuplicateBindingTypesUsed()
{
manager.resolveByType(Tuna.class, new CurrentBinding(), new CurrentBinding());
}
- @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class) @SpecAssertion(section="5.9.2")
+ @Test(groups="resolution", expectedExceptions=IllegalArgumentException.class)
+ @SpecAssertion(section="5.9")
public void testNonBindingTypeUsed()
{
manager.resolveByType(Tuna.class, new AnotherDeploymentTypeLiteral());
}
- @Test(groups="resolution") @SpecAssertion(section={"5.9.2"})
+ @Test(groups="resolution")
+ @SpecAssertion(section={"5.9"})
public void testResolveByType() throws Exception
{
Bean<Tuna> tunaBean = createSimpleBean(Tuna.class);
@@ -88,7 +97,8 @@
assert manager.resolveByType(Animal.class, new CurrentBinding()).contains(haddockBean);
}
- @Test(groups="injection") @SpecAssertion(section={"2.3.5","5.9.2.2"})
+ @Test(groups="injection")
+ @SpecAssertion(section={"2.3.5","5.9.2"})
public void testAllBindingTypesSpecifiedForResolutionMustAppearOnWebBean()
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -121,7 +131,8 @@
assert manager.resolveByType(ScottishFish.class, new AnnotationLiteral<Whitefish>() {}).contains(soleBean);
}
- @Test(groups="resolution") @SpecAssertion(section="5.9.2")
+ @Test(groups="resolution")
+ @SpecAssertion(section="5.9")
public void testResolveByTypeWithTypeParameter() throws Exception
{
Bean<ScottishFishFarmer> scottishFishFarmerBean = createSimpleBean(ScottishFishFarmer.class);
@@ -134,7 +145,8 @@
assert manager.resolveByType(new TypeLiteral<Farmer<ScottishFish>>(){}).contains(scottishFishFarmerBean);
}
- @Test(groups={"resolution", "producerMethod"}) @SpecAssertion(section="5.9.2")
+ @Test(groups={"resolution", "producerMethod"})
+ @SpecAssertion(section="5.9")
public void testResolveByTypeWithArray() throws Exception
{
Bean<SpiderProducer> spiderProducerBean = createSimpleBean(SpiderProducer.class);
@@ -149,7 +161,7 @@
assert manager.resolveByType(Spider[].class).size() == 1;
}
- @Test @SpecAssertion(section="5.9.2")
+ @Test @SpecAssertion(section="5.9")
public void testOnlyHighestEnabledPrecedenceWebBeansResolved() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
@@ -167,7 +179,7 @@
}
- @Test(groups="resolution") @SpecAssertion(section="5.9.2")
+ @Test(groups="resolution") @SpecAssertion(section="5.9")
public void testNoWebBeansFound() throws Exception
{
Bean<Salmon> salmonBean = createSimpleBean(Salmon.class);
@@ -180,7 +192,7 @@
assert manager.resolveByType(Tuna.class, new CurrentBinding()).size() == 0;
}
- @Test(groups="resolution") @SpecAssertion(section="5.9.2.1")
+ @Test(groups="resolution") @SpecAssertion(section="5.9.1")
public void testResolveByTypeWithNonBindingMembers() throws Exception
{
Bean<Halibut> halibutBean = createSimpleBean(Halibut.class);
@@ -209,7 +221,8 @@
assert beans.contains(roundWhiteFishBean);
}
- @Test(groups="resolution", expectedExceptions=DefinitionException.class) @SpecAssertion(section="5.9.2.1")
+ @Test(groups="resolution", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="5.9.1")
public void testArrayValuedAnnotationMemberWithoutNonBinding()
{
manager.resolveByType(Animal.class, new BindingTypeWithBindingArrayTypeMemberLiteral_Broken() {
@@ -222,7 +235,8 @@
});
}
- @Test(groups="resolution", expectedExceptions=DefinitionException.class) @SpecAssertion(section="5.9.2.1")
+ @Test(groups="resolution", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="5.9.1")
public void testAnnotationValuedAnnotationMemberWithoutNonBinding()
{
manager.resolveByType(Animal.class, new BindingTypeWithBindingAnnotationMemberLiteral_Broken()
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1258 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit: implementation/commonAnnotations and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-28 03:29:38 -0500 (Wed, 28 Jan 2009)
New Revision: 1258
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/decorator/DecoratorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/deployment/BeanDeploymentTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/initializer/InitializerMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/jms/JmsDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/NewSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
Log:
updated event and implementation tests to latest spec
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -17,7 +17,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -26,8 +25,8 @@
* @author Nicklas Karlsson
* @author David Allen
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class EventTest extends AbstractTest
{
@@ -81,14 +80,14 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.1")
+ @SpecAssertion(section = "7.1")
public void testEventTypeIncludesAllSuperclassesAndInterfacesOfEventObject()
{
assert false;
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.2")
+ @SpecAssertion(section = "7.2")
public void testManagerFireEvent()
{
// First a simple event with no bindings is fired
@@ -104,7 +103,7 @@
* variables or wildcards, an IllegalArgumentException is thrown
*/
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = { "8.1", "8.2" })
+ @SpecAssertion(section = { "7.1", "7.2" })
public void testManagerFireEventWithEventTypeParametersFails()
{
ATemplatedEventType<String> anEvent = new ATemplatedEventType<String>();
@@ -116,7 +115,7 @@
* variables or wildcards, an IllegalArgumentException is thrown
*/
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = { "8.1", "8.2" })
+ @SpecAssertion(section = { "7.1", "7.2" })
public void testManagerFireEventWithEventTypeWildcardsFails()
{
// Although the above test is really the same as with a wildcard, we will
@@ -127,7 +126,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = { "8.1", "8.2" })
+ @SpecAssertion(section = { "7.1", "7.2" })
public void testManagerFireEventWithNonBindingAnnotationsFails()
{
// The specs are not exactly clear on what is supposed to happen here,
@@ -139,7 +138,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testManagerAddObserver()
{
Observer<AnEventType> observer = new AnObserver();
@@ -187,7 +186,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testManagerRemoveObserver()
{
Observer<AnEventType> observer = new AnObserver();
@@ -221,7 +220,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testMultipleInstancesOfSameBindingTypeWhenAddingObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
@@ -229,7 +228,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testNonBindingTypePassedToAddObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
@@ -237,7 +236,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testMultipleInstancesOfSameBindingTypeWhenRemovingObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
@@ -246,7 +245,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "8.3")
+ @SpecAssertion(section = "7.3")
public void testNonBindingTypePassedToRemoveObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
@@ -255,7 +254,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = { "8.1", "8.4" })
+ @SpecAssertion(section = { "7.1", "7.4" })
public void testConsumerNotifiedWhenEventTypeAndAllBindingsMatch()
{
AnObserver observer1 = new AnObserver();
@@ -272,7 +271,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.4")
+ @SpecAssertion(section = "7.4")
public void testObserverThrowsExceptionAbortsNotifications()
{
AnObserverWithException observer = new AnObserverWithException();
@@ -299,7 +298,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5")
+ @SpecAssertion(section = "7.5")
public void testMultipleObserverMethodsOK()
{
// This bean has a couple observer methods
@@ -316,7 +315,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = { "8.5.1", "8.5.2" })
+ @SpecAssertion(section = { "7.5.1", "7.5.2" })
public void testObserverMethodMustHaveOnlyOneEventParameter()
{
deployBeans(YorkshireTerrier_Broken.class);
@@ -326,7 +325,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.5.1")
+ @SpecAssertion(section = "7.5.1")
public void testObserverMethodCannotObserveParameterizedEvents()
{
deployBeans(BostonTerrier.class);
@@ -335,7 +334,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5.1")
+ @SpecAssertion(section = "7.5.1")
public void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()
{
// This observer has no binding types specified
@@ -349,7 +348,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.5.2")
+ @SpecAssertion(section = "7.5.2")
public void testObserverMethodAnnotatedProducesFails()
{
deployBeans(BorderTerrier.class);
@@ -358,7 +357,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.5.2")
+ @SpecAssertion(section = "7.5.2")
public void testObserverMethodAnnotatedInitializerFails()
{
deployBeans(AustralianTerrier.class);
@@ -367,7 +366,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.5.2")
+ @SpecAssertion(section = "7.5.2")
public void testObserverMethodWithDisposesParamFails()
{
deployBeans(FoxTerrier.class);
@@ -376,7 +375,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5.2")
+ @SpecAssertion(section = "7.5.2")
public void testObserverMethodMayHaveMultipleBindingTypes()
{
deployBeans(BullTerrier.class);
@@ -390,21 +389,21 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.3")
+ @SpecAssertion(section = "7.5.3")
public void testXMLDefinedObserverMethodIgnoresBindingAnnotations()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.3")
+ @SpecAssertion(section = "7.5.3")
public void testXMLDefinedObserverNotFindingImplementationMethodFails()
{
assert false;
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5.4")
+ @SpecAssertion(section = "7.5.4")
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
{
deployBeans(BananaSpider.class);
@@ -417,7 +416,7 @@
* is created by some other separate action.
*/
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5.5")
+ @SpecAssertion(section = "7.5.5")
public void testConditionalObserver()
{
RecluseSpider.notified = false;
@@ -444,49 +443,49 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.1")
+ @SpecAssertion(section = "7.1")
public void testTransactionalObserverCanOnlyObserveSinglePhase()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.6")
+ @SpecAssertion(section = "7.5.6")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.6")
+ @SpecAssertion(section = "7.5.6")
public void testAfterTransactionCompletionObserver()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.6")
+ @SpecAssertion(section = "7.5.6")
public void testAfterTransactionSuccessObserver()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.6")
+ @SpecAssertion(section = "7.5.6")
public void testAfterTransactionFailureObserver()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.5.6")
+ @SpecAssertion(section = "7.5.6")
public void testBeforeTransactionCompletionObserver()
{
assert false;
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.5.7")
+ @SpecAssertion(section = "7.5.8")
public void testObserverMethodRegistration()
{
// This bean has two observer methods, one static and one non-static
@@ -500,7 +499,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { TeaCupPomeranian.OversizedException.class })
- @SpecAssertion(section = "8.5.7")
+ @SpecAssertion(section = "7.5.8")
public void testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown()
{
deployBeans(TeaCupPomeranian.class);
@@ -510,7 +509,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { ObserverException.class })
- @SpecAssertion(section = "8.5.7")
+ @SpecAssertion(section = "7.5.8")
public void testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown()
{
deployBeans(TeaCupPomeranian.class);
@@ -520,7 +519,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testDuplicateBindingsToFireFails()
{
deployBeans(SweeWaxbill_Broken.class);
@@ -537,7 +536,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testDuplicateBindingsToObservesFails()
{
deployBeans(SweeWaxbill_Broken.class);
@@ -554,7 +553,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testNonBindingTypePassedToFireFails()
{
deployBeans(OwlFinch_Broken.class);
@@ -571,7 +570,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testNonBindingTypePassedToObservesFails()
{
deployBeans(OwlFinch_Broken.class);
@@ -588,7 +587,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFiresAnnotationOnEventTypes()
{
deployBeans(BlueFacedParrotFinch.class);
@@ -651,7 +650,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFiresAnnotationOnNonEventTypeInjectionPointFails()
{
deployBeans(CommonWaxbill_Broken.class);
@@ -668,7 +667,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFiresAnnotationOnInjectionPointWithoutTypeParameterFails()
{
deployBeans(BlackRumpedWaxbill_Broken.class);
@@ -685,7 +684,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFiresAnnotationOnInjectionPointWithWildcardedTypeParameterFails()
{
deployBeans(GoldbreastWaxbill_Broken.class);
@@ -702,7 +701,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFiresAnnotationOnInjectionPointWithTypeVariabledTypeParameterFails()
{
deployBeans(JavaSparrow_Broken.class);
@@ -719,7 +718,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testImplicitEventBeanMatchesAPITypeOfInectionPoint()
{
deployBeans(BlueFacedParrotFinch.class);
@@ -740,7 +739,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint()
{
deployBeans(OrangeCheekedWaxbill.class);
@@ -761,7 +760,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testImplicitEventBeanHasStandardDeploymentType()
{
deployBeans(BlueFacedParrotFinch.class);
@@ -784,7 +783,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testImplicitEventBeanHasDependentScope()
{
deployBeans(BlueFacedParrotFinch.class);
@@ -807,70 +806,70 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFireMethodCallsManagerFireWithEventObject()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFireMethodCallsManagerFireWithBindingAnnotationsExceptObservable()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testFireMethodCallsManagerFireWithAllBindingAnnotationInstances()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testObserveMethodCallsManagerAddObserverWithObserverObject()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationsExceptObservable()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.6")
+ @SpecAssertion(section = "7.6")
public void testObserveMethodCallsManagerAddObserverWithAllBindingAnnotationInstance()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testEventObjectContainsTypeVariablesWhenResolvingFails()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testEventObjectContainsWildcardsWhenResolvingFails()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testDuplicateBindingTypesWhenResolvingFails()
{
assert false;
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testNonBindingTypeAnnotationWhenResolvingFails()
{
AnObserver observer = new AnObserver();
@@ -882,7 +881,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testResolvingChecksEventType()
{
Observer<AnEventType> observer = new AnObserver();
@@ -894,7 +893,7 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testResolvingChecksTypeParameters()
{
AListObserver observer = new AListObserver();
@@ -906,21 +905,21 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testResolvingChecksBindingTypes()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "8.7")
+ @SpecAssertion(section = "7.7")
public void testResolvingChecksBindingTypeMembers()
{
assert false;
}
@Test
- @SpecAssertion(section = "4.2")
+ @SpecAssertion(section = "???")
public void testNonStaticObserverMethodNotInherited()
{
deployBeans(LazyFarmer.class);
@@ -928,7 +927,7 @@
}
@Test
- @SpecAssertion(section = "8.5.8")
+ @SpecAssertion(section = "7.5.8")
public void testObserverCalledOnMostSpecializedInstance()
{
Shop.deliveryObservedBy = null;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -4,6 +4,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ResourceInjectionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/decorator/DecoratorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/decorator/DecoratorDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/decorator/DecoratorDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -6,13 +6,13 @@
public class DecoratorDefinitionTest
{
- @Test(groups="stub") @SpecAssertion(section="4.2")
+ @Test(groups="stub") @SpecAssertion(section="A.5")
public void testDecoratorBindingInherited()
{
assert false;
}
- @Test(groups="stub") @SpecAssertion(section="4.2")
+ @Test(groups="stub") @SpecAssertion(section="A.5")
public void testDecoratorBindingBlockedByIntermediateClass()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/deployment/BeanDeploymentTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/deployment/BeanDeploymentTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/deployment/BeanDeploymentTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -1,104 +1,107 @@
package org.jboss.webbeans.tck.unit.implementation.deployment;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081222")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class BeanDeploymentTest
{
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7")
public void testOnlySpecializedSimpleBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7")
public void testSpecializedSimpleBeanExtends()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7")
public void testSpecializedSimpleBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7")
public void testSpecializedSimpleBeanHasSameName()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testOnlySpecializedEnterpriseBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testSpecializedEnterpriseBeanExtends()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testSpecializedEnterpriseBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testSpecializedEnterpriseBeanHasSameName()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testSpecializedEnterpriseBeanAllLocalInterfaces()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7")
public void testSpecializedEnterpriseBeanSupportsBeanClassLocalView()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4")
public void testOnlySpecializedProducerMethodBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4")
public void testSpecializedProducerMethodBeanDirectlyOverrides()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4")
public void testSpecializedProducerMethodBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4")
public void testSpecializedProducerMethodBeanHasSameName()
{
// TODO Placeholder
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -4,7 +4,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -15,8 +14,9 @@
* using annotations 3.3.4. Declaring an enterprise Web Bean using XML
*
* @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class EnterpriseBeanDeclarationTest extends AbstractTest
{
@@ -206,7 +206,7 @@
* thus no special declaration is required.
*/
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.1")
+ @SpecAssertion(section = "3.3.2")
public void testAnnotatedEnterpriseBean()
{
// TODO: dupe?
@@ -218,7 +218,7 @@
* by specifying the bean class in web-beans.xml.
*/
@Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
+ @SpecAssertion(section = "3.3.2")
public void testAnnotatedEnterpriseBeanComplementedWithXML()
{
// TODO dupe?
@@ -230,7 +230,7 @@
* ejb-jar.xml are also Web Beans.
*/
@Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3.1")
+ @SpecAssertion(section = "3.3.2")
public void testEJBJARDefinedEnterpriseBean()
{
// TODO dupe?
@@ -242,7 +242,7 @@
* by specifying the bean class and EJB name in web-beans.xml
*/
@Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
+ @SpecAssertion(section = "3.3.2")
public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
{
// TODO dupe?
@@ -255,7 +255,7 @@
* variables and their superinterfaces
*/
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
+ @SpecAssertion(section = "3.3.3")
public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
{
assert false;
@@ -267,7 +267,7 @@
* superclasses
*/
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
+ @SpecAssertion(section = "3.3.3")
public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
{
assert false;
@@ -277,7 +277,7 @@
* In addition, java.lang.Object is an API type of every enterprise Web Bean.
*/
@Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.2")
+ @SpecAssertion(section = "3.3.3")
public void testObjectIsInAPITypes()
{
assert createEnterpriseBean(Laika.class).getTypes().contains(Object.class);
@@ -287,7 +287,7 @@
* Remote interfaces are not included in the set of API types.
*/
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
+ @SpecAssertion(section = "3.3.3")
public void testRemoteInterfacesAreNotInAPITypes()
{
assert false;
@@ -324,7 +324,7 @@
* to lower case.
*/
@Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.7")
+ @SpecAssertion(section = "3.3.8")
public void testDefaultName()
{
assert createEnterpriseBean(Pitbull.class).getName().equals("pitbull");
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -6,22 +6,21 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
* Sections
*
- * 6.4. Lifecycle of stateful session enterprise Web beans
- * 6.5. Lifecycle of stateless session and singleton enterprise Web Beans
- * 6.9. Lifecycle of EJB beans
+ * 6.5. Lifecycle of stateful session beans
+ * 6.6. Lifecycle of stateless session and singleton beans
+ * 6.11. Lifecycle of EJBs
*
* Mostly overlapping with other tests...
*
- * @author Nicklas Karlsson
+ * @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
*/
-
-@SpecVersion("20081206")
public class EnterpriseBeanLifecycleTest extends AbstractTest
{
@@ -30,7 +29,7 @@
* returns an enterprise bean proxy
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.4")
+ @SpecAssertion(section = "6.5")
public void testProxyCreated()
{
assert false;
@@ -41,7 +40,7 @@
* Bean remove method upon the proxy
*/
@Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
- @SpecAssertion(section = "6.4")
+ @SpecAssertion(section = "6.5")
public void testRemoveMethodCalled() throws Exception
{
GoodDoggie.destructorCalled = false;
@@ -67,7 +66,7 @@
* returned by Manager.getInstanceByType()
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
+ @SpecAssertion(section = "6.5")
public void testFieldInjections()
{
assert false;
@@ -79,7 +78,7 @@
* instance, and is not required to call any remove method
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
+ @SpecAssertion(section = "6.5")
public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
{
assert false;
@@ -90,7 +89,7 @@
* the proxy and all EJB local object references.
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.5")
+ @SpecAssertion(section = "6.6")
public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
{
assert false;
@@ -102,7 +101,7 @@
* returned by Manager.getInstanceByType().
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testFieldInjectionsOnRemoveMethods()
{
assert false;
@@ -114,7 +113,7 @@
* in XML,
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
{
assert false;
@@ -126,7 +125,7 @@
* returned by Manager.getInstanceByType().
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testInitializerMethodsCalledWithCurrentParameterValues()
{
assert false;
@@ -137,7 +136,7 @@
* for the instance
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testInterceptorStackIsBuilt()
{
assert false;
@@ -148,7 +147,7 @@
* for the instance
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testDecoratorStackIsBuilt()
{
assert false;
@@ -160,7 +159,7 @@
* objects, after the callback returns from the bean instance
*/
@Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
+ @SpecAssertion(section = "6.11")
public void testDependentObjectsDestroyed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -2,7 +2,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -13,8 +12,9 @@
* 3.3.5.3. Remove method parameters
*
* @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
*/
-@SpecVersion("20090116")
public class EnterpriseBeanRemoveMethodTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -13,12 +13,15 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.NewLiteral;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-@SpecVersion("20081222")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class NewEnterpriseBeanTest extends AbstractTest
{
private Bean<WrappedEnterpriseBean> newEnterpriseBean;
@@ -42,7 +45,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanIsDependentScoped()
{
assert Dependent.class.equals(newEnterpriseBean.getScopeType());
@@ -57,7 +60,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanIsOfStandardDeploymentType()
{
assert Standard.class.equals(newEnterpriseBean.getDeploymentType());
@@ -72,7 +75,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanIsHasOnlyNewBinding()
{
assert newEnterpriseBean.getBindings().size() == 1;
@@ -88,7 +91,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoWebBeanName()
{
assert newEnterpriseBean.getName() == null;
@@ -103,7 +106,7 @@
* declared type of the injection point.
*/
@Test(groups = { "stub", "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoStereotypes()
{
assert false;
@@ -118,7 +121,7 @@
* is an enterprise Web Bean.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
{
assert false;
@@ -136,7 +139,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
{
assert false;
@@ -154,7 +157,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
{
assert false;
@@ -172,7 +175,7 @@
* � has no decorators.
*/
@Test(groups = {"new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoObservers()
{
assert false;
@@ -190,7 +193,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoProducerFields()
{
assert false;
@@ -208,7 +211,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoProducerMethods()
{
assert false;
@@ -226,7 +229,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoDisposalMethods()
{
assert false;
@@ -244,7 +247,7 @@
* � has no decorators.
*/
@Test(groups = { "stub", "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasSameInterceptorMethodsAsWrappedBean()
{
assert false;
@@ -262,7 +265,7 @@
* � has no decorators.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewBeanHasNoDecorators()
{
Annotation[] bindingTypes = newEnterpriseBean.getBindings().toArray(new Annotation[0]);
@@ -278,7 +281,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationMayBeAppliedToField()
{
deployBeans(AnnotatedField.class, WrappedEnterpriseBean.class);
@@ -294,7 +297,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
{
deployBeans(AnnotatedProducerParameter.class, WrappedEnterpriseBean.class);
@@ -310,7 +313,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
{
deployBeans(AnnotatedInitializerParameter.class, WrappedEnterpriseBean.class);
@@ -326,7 +329,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
{
deployBeans(AnnotatedConstructorParameter.class, WrappedEnterpriseBean.class);
@@ -341,7 +344,7 @@
* by the container at deployment time.
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
@@ -355,7 +358,7 @@
* by the container at deployment time.
*/
@Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass()
{
assert false;
@@ -366,13 +369,13 @@
* as a binding type
*/
@Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.3.6")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
assert false;
}
- @Test @SpecAssertion(section="3.2.5")
+ @Test @SpecAssertion(section="3.2.6")
public void testForEachEnterpriseBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -5,57 +5,67 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ */
public class InitializerMethodTest extends AbstractTest
{
- @Test(expectedExceptions=DefinitionException.class, groups="initializerMethod") @SpecAssertion(section="3.8")
+ @Test(expectedExceptions=DefinitionException.class, groups="initializerMethod")
+ @SpecAssertion(section="3.8")
public void testStaticInitializerMethodNotAllowed()
{
createSimpleBean(Dottrel.class);
}
- @Test(groups={"stub", "initializerMethod", "servlet"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "servlet"})
+ @SpecAssertion(section="3.9")
public void testInitializerMethodCalledOnServlet()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "ejb3"})
+ @SpecAssertion(section="3.9")
public void testInitializerMethodCalledOnEJBSessionBean()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "ejb3"})
+ @SpecAssertion(section="3.9")
public void testInitializerMethodCalledOnEJBMDB()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "ejb3", "singletons"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "ejb3", "singletons"})
+ @SpecAssertion(section="3.9")
public void testInitializerMethodCalledOnEJBSingleton()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "ejb3"})
+ @SpecAssertion(section="3.9")
public void testInitializerMethodNotABusinessMethod()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "interceptors"}) @SpecAssertion(section="3.8")
+ @Test(groups={"stub", "initializerMethod", "interceptors"})
+ @SpecAssertion(section="3.9")
public void testMethodInterceptorNotCalledOnInitializerMethod()
{
assert false;
}
- @Test(groups={"initializerMethod"}) @SpecAssertion(section={"3.8", "5.3", "3.8.2", "3.8.3"})
+ @Test(groups={"initializerMethod"})
+ @SpecAssertion(section={"3.9", "5.3", "3.9.2", "3.9.3"})
public void testMultipleInitializerMethodsAreCalled()
{
manager.addBean(createSimpleBean(Fox.class));
@@ -67,43 +77,50 @@
assert chickenHutch.chicken != null;
}
- @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section={"3.8.1", "3.4.2"})
+ @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section={"3.9.1", "3.4.2"})
public void testInitializerMethodAnnotatedProduces()
{
createSimpleBean(Pheasant.class);
}
- @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.1")
+ @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.9.1")
public void testInitializerMethodHasParameterAnnotatedDisposes()
{
createSimpleBean(Capercaillie.class);
}
- @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.1")
+ @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.9.1")
public void testInitializerMethodHasParameterAnnotatedObserves()
{
createSimpleBean(Grouse.class);
}
- @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
+ @Test(groups={"stub", "initializerMethod", "webbeansxml"})
+ @SpecAssertion(section="3.9.2")
public void testInitializerMethodDeclaredInXml()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
+ @Test(groups={"stub", "initializerMethod", "webbeansxml"})
+ @SpecAssertion(section="3.9.2")
public void testInitializerMethodDeclaredInXmlIgnoresBindingAnnotationsInJava()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "webbeansxml"}, expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.2")
+ @Test(groups={"stub", "initializerMethod", "webbeansxml"}, expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.9.2")
public void testInitializerMethodDeclaredInXmlDoesNotExist()
{
assert false;
}
- @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
+ @Test(groups={"stub", "initializerMethod", "webbeansxml"})
+ @SpecAssertion(section="3.9.2")
public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -3,6 +3,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class InterceptorDefinitionTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/jms/JmsDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/jms/JmsDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/jms/JmsDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -6,6 +6,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class JmsDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -14,11 +14,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
import org.testng.annotations.Test;
-@SpecVersion("PRD2")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ProducerFieldDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -11,10 +11,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("PRD2")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ProducerFieldLifecycleTest extends AbstractTest
{
/*
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/DisposalMethodDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -3,6 +3,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class DisposalMethodDefinitionTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -10,14 +10,18 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ProducerMethodDefinitionTest extends AbstractTest
{
- @Test(groups="producerMethod") @SpecAssertion(section="2.5.3")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="2.5.3")
public void testProducerMethodInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -27,7 +31,8 @@
tarantulaModel.getDeploymentType().equals(AnotherDeploymentType.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4")
public void testStaticMethod() throws Exception
{
Bean<BeanWithStaticProducerMethod> bean = createSimpleBean(BeanWithStaticProducerMethod.class);
@@ -36,13 +41,15 @@
createProducerMethodBean(method, bean);
}
- @Test(groups={"stub", "producerMethod", "enterpriseBeans", "stub"}, expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4")
+ @Test(groups={"stub", "producerMethod", "enterpriseBeans", "stub"}, expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4")
public void testProducerMethodIsNotBusinessMethod() throws Exception
{
assert false;
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4")
public void testParameterizedReturnType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -51,7 +58,8 @@
createProducerMethodBean(method, bean);
}
- @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4")
public void testParameterizedReturnTypeWithWildcard() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -60,7 +68,8 @@
createProducerMethodBean(method, bean);
}
- @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4")
public void testParameterizedReturnTypeWithTypeParameter() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -69,7 +78,8 @@
createProducerMethodBean(method, bean);
}
- @Test(groups="producerMethod") @SpecAssertion(section={"3.4", "2.3.1"})
+ @Test(groups="producerMethod")
+ @SpecAssertion(section={"3.4", "2.3.1"})
public void testDefaultBindingType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -80,7 +90,8 @@
assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Current.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.1")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.1")
public void testApiTypeForClassReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -96,7 +107,8 @@
assert tarantulaModel.getTypes().contains(Object.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.1")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.1")
public void testApiTypeForInterfaceReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -108,7 +120,8 @@
assert animalModel.getTypes().contains(Object.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.1")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.1")
public void testApiTypeForPrimitiveReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -120,7 +133,8 @@
assert intModel.getTypes().contains(Object.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section={"3.4.1", "2.2"})
+ @Test(groups="producerMethod")
+ @SpecAssertion(section={"3.4.1", "2.2"})
public void testApiTypeForArrayTypeReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -132,7 +146,8 @@
assert spidersModel.getTypes().contains(Object.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.2")
public void testBindingType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -143,7 +158,8 @@
assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.2")
public void testScopeType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -155,7 +171,8 @@
// TODO Inherit scope from returned web bean?
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.2")
public void testDeploymentType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -165,7 +182,8 @@
assert ladybirdSpiderModel.getDeploymentType().equals(Production.class);
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.2")
public void testNamedMethod() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -175,7 +193,8 @@
assert blackWidowSpiderModel.getName().equals("blackWidow");
}
- @Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
+ @Test(groups="producerMethod")
+ @SpecAssertion(section="3.4.2")
public void testDefaultNamedMethod() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -185,7 +204,8 @@
assert daddyLongLegsSpiderModel.getName().equals("produceDaddyLongLegs");
}
- @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4")
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -194,7 +214,8 @@
createProducerMethodBean(method, bean);
}
- @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4")
+ @Test(groups="producerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.4")
public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -203,42 +224,48 @@
createProducerMethodBean(method, bean);
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.3.5")
public void testDisposalMethodNonStatic()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.3.5")
public void testDisposalMethodMethodDeclaredOnWebBeanImplementationClass()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.3.5")
public void testDisposalMethodBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.3.5")
public void testDisposalMethodDefaultBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.3.5")
public void testDisposalMethodDoesNotResolveToProducerMethod()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.5")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.4.6")
public void testDisposalMethodDeclaredOnEnabledBean()
{
// TODO Placeholder
@@ -247,7 +274,8 @@
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.5")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.4.6")
public void testBeanCanDeclareMultipleDisposalMethods()
{
// TODO move this
@@ -255,7 +283,8 @@
assert false;
}
- @Test(groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.3.5")
+ @Test(groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.4.6")
public void testProducerMethodHasNoMoreThanOneDisposalMethod()
{
// TODO move this
@@ -263,7 +292,8 @@
assert false;
}
- @Test(groups="producerMethod") @SpecAssertion(section={"2.7.2", "3.4.2", "2.2"})
+ @Test(groups="producerMethod")
+ @SpecAssertion(section={"2.7.2", "3.4.2", "2.2"})
public void testStereotypeSpecifiesScope() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -275,7 +305,8 @@
assert wolfSpider.getScopeType().equals(RequestScoped.class);
}
- @Test(groups="producerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section={"2.7.2", "3.4.2", "2.2"})
+ @Test(groups="producerMethod", expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section={"2.7.2", "3.4.2", "2.2"})
public void testStereotypeEnforcesTypes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -284,7 +315,8 @@
createProducerMethodBean(method, bean);
}
- @Test @SpecAssertion(section="4.2")
+ @Test
+ @SpecAssertion(section="4.2")
public void testNonStaticProducerMethodNotInherited()
{
deployBeans(InfertileChicken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -7,15 +7,18 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ProducerMethodLifecycleTest extends AbstractTest
{
- @Test(groups={"producerMethod", "broken"}) @SpecAssertion(section="5.6")
+ @Test(groups={"producerMethod", "broken"}) @SpecAssertion(section="B.1")
public void testProducerMethodBeanCreate() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -26,21 +29,21 @@
assert tarantula != null;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4")
public void testSpecializedBeanAlwaysUsed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod", "beanLifecycle"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod", "beanLifecycle"}) @SpecAssertion(section="3.3.5")
public void testDisposalMethodCalled()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "disposalMethod", "beanLifecycle"}) @SpecAssertion(section="3.3.4")
+ @Test(groups={"stub", "disposalMethod", "beanLifecycle"}) @SpecAssertion(section="3.3.5")
public void testDisposalMethodHasParametersInjected()
{
// TODO Placeholder
@@ -48,7 +51,8 @@
}
- @Test(groups={"producerMethod", "broken"}) @SpecAssertion(section={"3.4", "5.6", "8.3"})
+ @Test(groups={"producerMethod", "broken"})
+ @SpecAssertion(section={"3.4", "B.1", "7.3"})
public void testProducerMethodReturnsNullIsDependent() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -59,7 +63,8 @@
assert spider == null;
}
- @Test(groups="producerMethod", expectedExceptions=IllegalProductException.class) @SpecAssertion(section={"3.4", "5.6"})
+ @Test(groups="producerMethod", expectedExceptions=IllegalProductException.class)
+ @SpecAssertion(section={"3.4", "B.1"})
public void testProducerMethodReturnsNullIsNotDependent() throws Exception
{
Bean<SpiderProducer_Broken> spiderProducer = createSimpleBean(SpiderProducer_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -13,12 +13,15 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.NewLiteral;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-@SpecVersion("20081222")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class NewSimpleBeanTest extends AbstractTest
{
@@ -44,7 +47,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanIsDependentScoped()
{
assert Dependent.class.equals(newSimpleBean.getScopeType());
@@ -59,7 +62,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanIsOfStandardDeploymentType()
{
assert Standard.class.equals(newSimpleBean.getDeploymentType());
@@ -74,7 +77,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanIsHasOnlyNewBinding()
{
assert newSimpleBean.getBindings().size() == 1;
@@ -90,7 +93,7 @@
* declared type of the injection point.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoWebBeanName()
{
assert newSimpleBean.getName() == null;
@@ -105,7 +108,7 @@
* declared type of the injection point.
*/
@Test(groups = { "stub", "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoStereotypes()
{
assert false;
@@ -123,7 +126,7 @@
* � has no decorators.
*/
@Test(groups = {"new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoObservers()
{
assert false;
@@ -141,7 +144,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoProducerFields()
{
assert false;
@@ -159,7 +162,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoProducerMethods()
{
assert false;
@@ -177,7 +180,7 @@
* � has no decorators.
*/
@Test(groups = { "new" , "stub"})
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoDisposalMethods()
{
//Class<?> type = TypeInfo.ofTypes(newSimpleBean.getTypes()).getSuperClass();
@@ -197,7 +200,7 @@
* � has no decorators.
*/
@Test(groups = { "stub", "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasSameInterceptorMethodsAsWrappedBean()
{
assert false;
@@ -215,7 +218,7 @@
* � has no decorators.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewBeanHasNoDecorators()
{
Annotation[] bindingTypes = newSimpleBean.getBindings().toArray(new Annotation[0]);
@@ -231,7 +234,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationMayBeAppliedToField()
{
deployBeans(AnnotatedField.class, WrappedSimpleBean.class);
@@ -247,7 +250,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
{
deployBeans(AnnotatedProducerParameter.class, WrappedSimpleBean.class);
@@ -263,7 +266,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
{
deployBeans(AnnotatedInitializerParameter.class, WrappedSimpleBean.class);
@@ -279,7 +282,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
{
deployBeans(AnnotatedConstructorParameter.class, WrappedSimpleBean.class);
@@ -294,7 +297,7 @@
* by the container at deployment time.
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
@@ -308,7 +311,7 @@
* by the container at deployment time.
*/
@Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass()
{
assert false;
@@ -319,13 +322,14 @@
* as a binding type
*/
@Test(groups = { "stub", "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.9")
+ @SpecAssertion(section = "3.2.5")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
assert false;
}
- @Test @SpecAssertion(section="3.2.5")
+ @Test
+ @SpecAssertion(section="3.2.5")
public void testForEachSimpleBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -8,13 +8,16 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.jboss.webbeans.tck.unit.implementation.simple.OuterBean_Broken.InnerBean_Broken;
import org.jboss.webbeans.tck.unit.implementation.simple.OuterBean_Broken.StaticInnerBean_Broken;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class SimpleBeanDefinitionTest extends AbstractTest
{
@@ -34,13 +37,15 @@
createSimpleBean(Cow_Broken.class);
}
- @Test(groups="innerClass") @SpecAssertion(section="3.2")
+ @Test(groups="innerClass")
+ @SpecAssertion(section="3.2")
public void testStaticInnerClassDeclaredInJavaAllowed()
{
createSimpleBean(StaticInnerBean_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class, groups="innerClass") @SpecAssertion(section="3.2")
+ @Test(expectedExceptions=DefinitionException.class, groups="innerClass")
+ @SpecAssertion(section="3.2")
public void testNonStaticInnerClassDeclaredInJavaNotAllowed()
{
createSimpleBean(InnerBean_Broken.class);
@@ -53,7 +58,8 @@
createSimpleBean(ParameterizedBean_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors", "decorators"}) @SpecAssertion(section="3.2")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors", "decorators"})
+ @SpecAssertion(section="3.2")
public void testClassCannotBeInterceptorAndDecorator()
{
@@ -96,55 +102,64 @@
}
- @Test(groups={"stub", "producerMethod", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(groups={"stub", "producerMethod", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testBeanDeclaredInXmlIgnoresProducerMethodDeclaredInJava()
{
assert false;
}
- @Test(groups={"stub", "disposalMethod", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(groups={"stub", "disposalMethod", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testBeanDeclaredInXmlIgnoresDisposalMethodDeclaredInJava()
{
assert false;
}
- @Test(groups={"stub", "observerMethod", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(groups={"stub", "observerMethod", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testBeanDeclaredInXmlIgnoresObserverMethodDeclaredInJava()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testAbstractClassDeclaredInXmlIsNotAllowed()
{
}
- @Test(groups={"stub", "innerClass", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(groups={"stub", "innerClass", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testStaticInnerClassDeclaredInXmlAllowed()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "innerClass", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "innerClass", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testNonStaticInnerClassDeclaredInXmlNotAllowed()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.4")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.4")
public void testParameterizedClassDeclaredInXmlIsNotAllowed()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"}) @SpecAssertion(section="3.2.4")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"})
+ @SpecAssertion(section="3.2.4")
public void testClassHasInterceptorInJavaMustHaveInterceptorInXml()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"}) @SpecAssertion(section="3.2.4")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "interceptors"})
+ @SpecAssertion(section="3.2.4")
public void testClassHasDecoratorInJavaMustHaveDecoratorInXml()
{
assert false;
@@ -167,21 +182,24 @@
}
- @Test @SpecAssertion(section="3.2.5.1")
+ @Test
+ @SpecAssertion(section="3.2.5.1")
public void testImplicitConstructorUsed()
{
Bean<Order> order = createSimpleBean(Order.class);
// TODO Test this properly!
}
- @Test @SpecAssertion(section="3.2.5.1")
+ @Test
+ @SpecAssertion(section="3.2.6.1")
public void testEmptyConstructorUsed()
{
createSimpleBean(Donkey.class).create(new MockCreationalContext<Donkey>());
assert Donkey.constructedCorrectly;
}
- @Test @SpecAssertion(section="3.2.5.1")
+ @Test
+ @SpecAssertion(section="3.2.6.1")
public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
{
deployBeans(Turkey.class);
@@ -196,49 +214,57 @@
}.run();
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.2.5.1")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2.6.1")
public void testTooManyInitializerAnnotatedConstructor()
{
createSimpleBean(Goose_Broken.class);
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "disposalMethod"}) @SpecAssertion(section="3.2.5.1")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "disposalMethod"})
+ @SpecAssertion(section="3.2.6.1")
public void testConstructorHasDisposesParameter()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "observerMethod"}) @SpecAssertion(section="3.2.5.1")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "observerMethod"})
+ @SpecAssertion(section="3.2.6.1")
public void testConstructorHasObservesParameter()
{
assert false;
}
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.5.2")
+ @Test(groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.6.2")
public void testImplicitConstructorDeclaredInXmlUsed()
{
assert false;
}
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.5.2")
+ @Test(groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.6.2")
public void testEmptyConstructorDeclaredInXmlUsed()
{
assert false;
}
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.5.2")
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.6.2")
public void testConstructorDeclaredInXmlDoesNotExist()
{
assert false;
}
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="3.2.5.2")
+ @Test(groups={"stub", "webbeansxml"})
+ @SpecAssertion(section="3.2.6.2")
public void testConstructorDeclaredInXmlIgnoresBindingTypesDeclaredInJava()
{
assert false;
}
- @Test @SpecAssertion(section="3.2.5.3")
+ @Test
+ @SpecAssertion(section="3.2.6.3")
public void testBindingTypeAnnotatedConstructor() throws Exception
{
deployBeans(Duck.class);
@@ -253,7 +279,8 @@
}.run();
}
- @Test @SpecAssertion(section="3.2")
+ @Test
+ @SpecAssertion(section="3.2")
public void testDependentScopedBeanCanHavePublicField() throws Exception
{
deployBeans(Tiger.class);
@@ -270,7 +297,8 @@
}
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.2")
+ @Test(expectedExceptions=DefinitionException.class)
+ @SpecAssertion(section="3.2")
public void testNonDependentScopedBeanCanNotHavePublicField()
{
deployBeans(Leopard_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-01-28 01:05:25 UTC (rev 1257)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-01-28 08:29:38 UTC (rev 1258)
@@ -7,11 +7,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class SimpleBeanLifecycleTest extends AbstractTest
{
@@ -23,7 +26,8 @@
return deploymentTypes;
}
- @Test(groups="beanConstruction") @SpecAssertion(section="3.1.3")
+ @Test(groups="beanConstruction")
+ @SpecAssertion(section="3.2.5.3")
public void testInjectionOfParametersIntoBeanConstructor()
{
Bean<FishPond> goldfishPondBean = createSimpleBean(FishPond.class);
@@ -34,7 +38,7 @@
assert fishPond.goldfish != null;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.1.4")
+ @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
public void testSpecializedBeanAlwaysUsed()
{
// TODO Placeholder
@@ -48,37 +52,43 @@
assert bean.create(new MockCreationalContext<RedSnapper>()) instanceof RedSnapper;
}
- @Test(groups={"stub", "beanLifecycle", "interceptors"}) @SpecAssertion(section="5.3")
+ @Test(groups={"stub", "beanLifecycle", "interceptors"})
+ @SpecAssertion(section="6.3")
public void testCreateBindsInterceptorStack()
{
assert false;
}
- @Test(groups={"stub", "beanLifecycle", "decorators"}) @SpecAssertion(section="5.3")
+ @Test(groups={"stub", "beanLifecycle", "decorators"})
+ @SpecAssertion(section="6.3")
public void testCreateBindsDecoratorStack()
{
assert false;
}
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"}) @SpecAssertion(section="5.3")
+ @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
+ @SpecAssertion(section="6.3")
public void testCreateInjectsEjb()
{
assert false;
}
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"}) @SpecAssertion(section="5.3")
+ @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
+ @SpecAssertion(section="6.3")
public void testCreateInjectsPersistenceContext()
{
assert false;
}
- @Test(groups={"stub", "beanLifecycle", "commonAnnotations"}) @SpecAssertion(section="5.3")
+ @Test(groups={"stub", "beanLifecycle", "commonAnnotations"})
+ @SpecAssertion(section="6.3")
public void testCreateInjectsResource()
{
assert false;
}
- @Test(groups={"beanLifecycle", "lifecycleCallbacks"}) @SpecAssertion(section="5.3")
+ @Test(groups={"beanLifecycle", "lifecycleCallbacks"})
+ @SpecAssertion(section="6.3")
public void testPostConstructPreDestroy() throws Exception
{
Bean<FarmOffice> farmOfficeBean = createSimpleBean(FarmOffice.class);
@@ -161,7 +171,7 @@
}
- @Test(groups="injection") @SpecAssertion(section="5.3")
+ @Test(groups="injection") @SpecAssertion(section="6.3")
public void testCreateInjectsFieldsDeclaredInJava()
{
Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1257 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit: context/dependent and 8 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-27 20:05:25 -0500 (Tue, 27 Jan 2009)
New Revision: 1257
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/NormalContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/bean/BeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/binding/BindingDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/BrokenDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/name/NameDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/scope/ScopeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/type/ApiTypeDefinitionTest.java
Log:
Updated context and definition tests to latest spec version
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -14,6 +14,10 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ */
public class ContextTest extends AbstractTest
{
@@ -51,14 +55,14 @@
}
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="8.5")
public void testGetContextWithNoActiveContextsFails()
{
configuration().getContexts().setInactive(configuration().getContexts().getRequestContext());
manager.getContext(RequestScoped.class);
}
- @Test(expectedExceptions={IllegalArgumentException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={IllegalArgumentException.class}, groups={"manager"}) @SpecAssertion(section="8.5")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext() {};
@@ -68,13 +72,13 @@
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="8.5")
public void testGetContextWithNoRegisteredContextsFails()
{
manager.getContext(Unregistered.class);
}
- @Test(groups={"manager"}) @SpecAssertion(section="9.6")
+ @Test(groups={"manager"}) @SpecAssertion(section="8.5")
public void testGetContextReturnsActiveContext()
{
manager.getContext(RequestScoped.class);
@@ -85,7 +89,7 @@
* method call, including invocation of EJB local business methods.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
+ @SpecAssertion(section = "8.5")
public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
{
assert false;
@@ -97,7 +101,7 @@
* service timeouts
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
+ @SpecAssertion(section = "8.5")
public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
{
assert false;
@@ -109,7 +113,7 @@
* service timeouts
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
+ @SpecAssertion(section = "8.5")
public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/NormalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/NormalContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/NormalContextTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -11,7 +11,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -23,8 +22,8 @@
* This class tests a basic context against section 8 of the
* specification
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class NormalContextTest extends AbstractTest
{
@@ -69,7 +68,7 @@
* return an existing instance of the given contextual type, or
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testGetReturnsExistingInstace()
{
assert false;
@@ -79,7 +78,7 @@
* if the value of the create parameter is false, return a null value, or
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testGetWithCreateFalseReturnsNull()
{
assert false;
@@ -91,7 +90,7 @@
* instance.
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testGetWithCreateTrueReturnsNewInstance()
{
assert false;
@@ -102,7 +101,7 @@
* is false or Contextual.create() returns a null value
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testGetMayNotReturnNullUnlessCreateIsFalseOrContextualCreateReturnsNull()
{
assert false;
@@ -113,7 +112,7 @@
* type unless the create parameter is true
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testGetMayNotCreateNewInstanceUnlessCreateIsTrue()
{
assert false;
@@ -134,7 +133,7 @@
* method.
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testDestroyedInstanceMustNotBeReturnedByGet()
{
assert false;
@@ -146,7 +145,7 @@
* ContextNotActiveException.
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.2")
+ @SpecAssertion(section = "8.1")
public void testInvokingGetOnInactiveContextFails()
{
assert false;
@@ -157,7 +156,7 @@
* thread
*/
@Test(groups = { "contexts", "stub" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.1")
public void testOnlyMappedInstancePerContextualTypePerThread()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -13,11 +13,12 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.testng.annotations.Test;
-@SpecVersion("20090116")
+/**
+ * Spec version: PRD2
+ */
public class DependentContextTest extends AbstractTest
{
/**
@@ -25,7 +26,7 @@
* injection points.
*/
@Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceNotSharedBetweenInjectionPoints()
{
deployBeans(Fox.class, FoxRun.class);
@@ -45,7 +46,7 @@
* expression exists to service that evaluation only.
*/
@Test(groups = { "contexts", "el"})
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceUsedForElEvaluationNotShared() throws Exception
{
deployBeans(Fox.class);
@@ -72,7 +73,7 @@
* that invocation only
*/
@Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceUsedForProducerMethodNotShared() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -92,7 +93,7 @@
* that invocation only
*/
@Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceUsedForProducerFieldNotShared() throws Exception
{
Bean<OtherSpiderProducer> spiderProducer = createSimpleBean(OtherSpiderProducer.class);
@@ -112,7 +113,7 @@
* that invocation only
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceUsedForDisposalMethodNotShared()
{
assert false;
@@ -124,7 +125,7 @@
* that invocation only
*/
@Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testInstanceUsedForObserverMethodNotShared()
{
assert false;
@@ -136,7 +137,7 @@
* of the given Web Bean
*/
@Test(groups = "contexts")
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
{
deployBeans(Fox.class);
@@ -162,7 +163,7 @@
* scope with the value false for the create parameter returns a null value
*/
@Test(groups = "contexts")
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextGetWithCreateFalseReturnsNull() throws Exception
{
deployBeans(Fox.class);
@@ -186,7 +187,7 @@
* The @Dependent scope is inactive except:
*/
@Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsInactive()
{
assert !manager.getContext(Dependent.class).isActive();
@@ -198,7 +199,7 @@
* or observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveWhenInvokingProducerMethod()
{
assert false;
@@ -210,7 +211,7 @@
* or observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveWhenInvokingProducerField()
{
assert false;
@@ -223,7 +224,7 @@
* or observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveWhenInvokingDisposalMethod()
{
assert false;
@@ -235,7 +236,7 @@
* or observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveWhenInvokingObserverMethod()
{
assert false;
@@ -245,7 +246,7 @@
* while a Unified EL expression is evaluated, or
*/
@Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveWhenEvaluatingElExpression()
{
assert false;
@@ -256,7 +257,7 @@
* injecting its dependencies, or
*/
@Test(groups = { "contexts", "beanLifecycle" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringBeanCreation()
{
// Slightly roundabout, but I can't see a better way to test atm
@@ -272,7 +273,7 @@
* injecting its dependencies, or
*/
@Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringBeanDestruction()
{
assert false;
@@ -283,7 +284,7 @@
* injecting its dependencies, or
*/
@Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "9.4")
+ @SpecAssertion(section = "8.4")
public void testContextIsActiveDuringInjection()
{
Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
@@ -299,7 +300,7 @@
* invoked by the EJB container
*/
@Test(groups = { "contexts", "injection", "stub", "ejb3" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringEJBDependencyInjection()
{
assert false;
@@ -311,7 +312,7 @@
* invoked by the EJB container
*/
@Test(groups = { "contexts", "injection", "stub", "servlet" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringServletDependencyInjection()
{
assert false;
@@ -323,7 +324,7 @@
* invoked by the EJB container
*/
@Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringEJBPostConstruct()
{
assert false;
@@ -335,7 +336,7 @@
* invoked by the EJB container
*/
@Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testContextIsActiveDuringEJBPreDestroy()
{
assert false;
@@ -349,7 +350,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "constructor" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromConstructor()
{
assert false;
@@ -363,7 +364,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "removeMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromRemoveMethod()
{
assert false;
@@ -377,7 +378,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "initalizerMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromInitializerMethod()
{
assert false;
@@ -391,7 +392,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromProducerMethod()
{
assert false;
@@ -405,7 +406,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromDisposalMethod()
{
assert false;
@@ -419,7 +420,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "preDestroy" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromPreDestroy()
{
assert false;
@@ -433,7 +434,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "postConstruct" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromPostConstruct()
{
assert false;
@@ -447,7 +448,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "interceptor" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
{
assert false;
@@ -461,7 +462,7 @@
* from Web Beans interceptors or decorators for any of these methods
*/
@Test(groups = { "stub", "contexts", "decorator" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
{
assert false;
@@ -474,7 +475,7 @@
* methods.
*/
@Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testEjbBeanMayCreateInstanceFromInitializer()
{
assert false;
@@ -487,7 +488,7 @@
* methods.
*/
@Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testEjbBeanMayCreateInstanceFromPostConstruct()
{
assert false;
@@ -500,7 +501,7 @@
* methods.
*/
@Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testEjbBeanMayCreateInstanceFromPreDestroy()
{
assert false;
@@ -513,7 +514,7 @@
* methods.
*/
@Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
{
assert false;
@@ -524,7 +525,7 @@
* by calling Manager.getInstance() from initializer methods
*/
@Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
- @SpecAssertion(section = "9.3.1")
+ @SpecAssertion(section = "8.3.1")
public void testServletBeanMayCreateInstanceFromInitializer()
{
assert false;
@@ -535,7 +536,7 @@
* destroyed,
*/
@Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDestroyingParentDestroysDependents()
{
assert false;
@@ -546,7 +547,7 @@
* or Servlet is destroyed,
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDestroyingEjbDestroysDependents()
{
assert false;
@@ -557,7 +558,7 @@
* or Servlet is destroyed,
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDestroyingServletDestroysDependents()
{
assert false;
@@ -568,7 +569,7 @@
* expression evaluation when the evaluation completes, and
*/
@Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDependentsDestroyedWhenElEvaluationCompletes()
{
assert false;
@@ -580,7 +581,7 @@
* invocation when the invocation completes
*/
@Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDependentsDestroyedWhenProducerMethodCompletes()
{
assert false;
@@ -592,7 +593,7 @@
* invocation when the invocation completes
*/
@Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDependentsDestroyedWhenProducerFieldCompletes()
{
assert false;
@@ -604,7 +605,7 @@
* invocation when the invocation completes
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "9.3.2")
+ @SpecAssertion(section = "8.3.2")
public void testDependentsDestroyedWhenDisposalMethodCompletes()
{
assert false;
@@ -616,7 +617,7 @@
* invocation when the invocation completes
*/
@Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "9.3")
+ @SpecAssertion(section = "8.3")
public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -10,7 +10,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -18,8 +17,8 @@
* @author Nicklas Karlsson
* @author David Allen
*
+ * Spec version: PRD2
*/
-@SpecVersion("PRD2")
public class PassivatingContextTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/bean/BeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/bean/BeanDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/bean/BeanDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -8,7 +8,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -16,8 +15,8 @@
*
* @author Pete Muir
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class BeanDefinitionTest extends AbstractTest
{
@@ -73,7 +72,7 @@
@Test
@SpecAssertion(section = { "3.2.2", "2.2" })
- public void testApiTypes()
+ public void testBeanTypes()
{
Bean<Tarantula> bean = createSimpleBean(Tarantula.class);
assert bean.getTypes().size() == 6;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/binding/BindingDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/binding/BindingDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -12,13 +12,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
import org.jboss.webbeans.tck.impl.util.Reflections;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ * Spec version: PRD2
+ */
public class BindingDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/BrokenDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/BrokenDeploymentTypeTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/BrokenDeploymentTypeTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -10,6 +10,10 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ */
public class BrokenDeploymentTypeTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -12,6 +12,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class CustomDeploymentTypeTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -9,7 +9,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
-
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class DefaultDeploymentTypeTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -12,10 +12,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class DeploymentTypeDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/name/NameDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/name/NameDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/name/NameDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -8,10 +8,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class NameDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -8,10 +8,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ScopeDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/stereotype/StereotypeDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/stereotype/StereotypeDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -12,10 +12,13 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class StereotypeDefinitionTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/type/ApiTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/type/ApiTypeDefinitionTest.java 2009-01-27 23:34:18 UTC (rev 1256)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/type/ApiTypeDefinitionTest.java 2009-01-28 01:05:25 UTC (rev 1257)
@@ -6,6 +6,11 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
public class ApiTypeDefinitionTest extends AbstractTest
{
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1256 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration: context/passivating and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-27 18:34:18 -0500 (Tue, 27 Jan 2009)
New Revision: 1256
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/conversation/ConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/request/RequestContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/session/SessionContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/event/EventTest.java
Log:
updated integration test sections
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/conversation/ConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/conversation/ConversationContextTest.java 2009-01-27 23:15:43 UTC (rev 1255)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/conversation/ConversationContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
@@ -2,15 +2,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
*
* @author Nicklas Karlsson
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class ConversationContextTest extends AbstractTest
{
/**
@@ -18,7 +17,7 @@
* apply request values phase, until the response is complete.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testContextActiveFromBeginningOfApplyRequestValuesPhasetoResponseCompleteForJsfRequest()
{
assert false;
@@ -29,7 +28,7 @@
* response phase
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testContextActiveDuringRenderResponsePhaseForNonFacesJsfRequest()
{
assert false;
@@ -39,7 +38,7 @@
* Any JSF request has exactly one associated conversation
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testJsfRequestHasExactlyOneAssociatedConversation()
{
assert false;
@@ -50,7 +49,7 @@
* the restore view phase and does not change during the request
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testAssociatedConversationOfJsfRequestIsDeterminedAtEndOfRestoreViewPhase()
{
assert false;
@@ -61,7 +60,7 @@
* the restore view phase and does not change during the request
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testAssociatedConversationOfJsfRequestDoesNotChangeDuringRequest()
{
assert false;
@@ -71,7 +70,7 @@
* By default, a conversation is transient
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testDefaultConversationIsTransient()
{
assert false;
@@ -81,7 +80,7 @@
* All long-running conversations have a string-valued unique identifier
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testConversationsHaveUniqueStringIdentifiers()
{
assert false;
@@ -93,7 +92,7 @@
* conversation context is also destroyed.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testTransientConversationIsDestroyedAtEndOfJsfRequest()
{
assert false;
@@ -105,7 +104,7 @@
* conversation context is also destroyed.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testTransientConversationContextIsDestroyedAtEndOfJsfRequest()
{
assert false;
@@ -116,7 +115,7 @@
* long-running state at the end of a JSF request, it is not destroyed
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testLongRunningConversationNotDestroyedAtEndOfJsfRequest()
{
assert false;
@@ -128,7 +127,7 @@
* form submission) that originates from that rendered page.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testLongRunningConversationOfJsfRenderingRequestIsPropagatedToRequestFromRenderedPage()
{
assert false;
@@ -142,7 +141,7 @@
* parameter named cid containing the unique identifier of the conversation.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testLongRunningConversationOfJsfRedirectIsPropagatedToNonFacesRequest()
{
assert false;
@@ -155,7 +154,7 @@
* application must manage this request parameter
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testLongRunningConversationManuallyPropagatedToNonFacesRequest()
{
assert false;
@@ -166,7 +165,7 @@
* associated with a new transient conversation.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testNewTransientRequestIsCreatedWhenNoConversationIsPropagated()
{
assert false;
@@ -177,7 +176,7 @@
* session and may not cross session boundaries
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testLongRunningConversationsMayNotCrossHttpSessions()
{
assert false;
@@ -188,7 +187,7 @@
* conversation contexts created during the current session are destroyed
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testAllLongRunningConversationContextsOfInvalidatedHttpSessionAreDestroyed()
{
assert false;
@@ -200,7 +199,7 @@
* conserve resources
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testManagerCanDestroyOrphanedLongRunningConversations()
{
assert false;
@@ -211,7 +210,7 @@
* associated with a new transient conversation
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testNewTransientConversationIsCreatedWhenConversationCannotBeRestored()
{
assert false;
@@ -223,7 +222,7 @@
* concurrent requests.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
+ @SpecAssertion(section = "8.5.4")
public void testConcurrentRequestsToLongRunningConversationsAreHandled()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-01-27 23:15:43 UTC (rev 1255)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
@@ -2,15 +2,14 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
*
* @author Nicklas Karlsson
*
+ * Spec version: PRD2
*/
-@SpecVersion("20081206")
public class PassivatingContextTest extends AbstractTest
{
@@ -19,7 +18,7 @@
* declare any passivating scope.
*/
@Test(groups = { "contexts", "passivation", "enterpriseBean", "integration" })
- @SpecAssertion(section = "9.5")
+ @SpecAssertion(section = "8.4")
public void testEJBWebBeanCanDeclarePassivatingScope()
{
deployBeans(Turku.class);
@@ -31,7 +30,7 @@
* serializable.
*/
@Test(groups = { "stub", "contexts", "passivation", "jms" })
- @SpecAssertion(section = "9.5")
+ @SpecAssertion(section = "8.4")
public void testJMSEndpointProxyIsSerializable()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/request/RequestContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/request/RequestContextTest.java 2009-01-27 23:15:43 UTC (rev 1255)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/request/RequestContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
@@ -2,10 +2,12 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ */
public class RequestContextTest extends AbstractTest
{
@@ -14,7 +16,7 @@
* the web application.
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeActiveDuringServiceMethod()
{
assert false;
@@ -25,7 +27,7 @@
* the Servlet service() method returns.
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeIsDestroyedAfterServiceMethod()
{
assert false;
@@ -35,7 +37,7 @@
* The request scope is active during any Java EE web service invocation.
*/
@Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeActiveDuringWebSericeInvocation()
{
assert false;
@@ -46,7 +48,7 @@
* completes
*/
@Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeIsDestroyedAfterWebServiceInvocation()
{
assert false;
@@ -58,7 +60,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeActiveDuringRemoteMethodInvocationOfEjb()
{
assert false;
@@ -70,7 +72,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeActiveDuringCallToEjbTimeoutMethod()
{
assert false;
@@ -82,7 +84,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeActiveDuringEjbMessageDelivery()
{
assert false;
@@ -93,7 +95,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeDestroyedAfterRemoteMethodInvocationOfEjb()
{
assert false;
@@ -104,7 +106,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeDestroyedAfterCallToEjbTimeoutMethod()
{
assert false;
@@ -115,7 +117,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
+ @SpecAssertion(section = "8.5.1")
public void testRequestScopeDestroyedAfterEjbMessageDelivery()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/session/SessionContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/session/SessionContextTest.java 2009-01-27 23:15:43 UTC (rev 1255)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/session/SessionContextTest.java 2009-01-27 23:34:18 UTC (rev 1256)
@@ -2,10 +2,12 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("2001206")
+/**
+ *
+ * Spec version: PRD2
+ */
public class SessionContextTest extends AbstractTest
{
@@ -14,7 +16,7 @@
* the web application
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.2")
+ @SpecAssertion(section = "8.5.2")
public void testSessionScopeActiveDuringServiceMethod()
{
assert false;
@@ -25,7 +27,7 @@
* the same HTTP servlet session
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.2")
+ @SpecAssertion(section = "8.5.2")
public void testSessionContextSharedBetweenServletRequestsInSameHttpSession()
{
assert false;
@@ -36,7 +38,7 @@
* times out.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.2")
+ @SpecAssertion(section = "8.5.2")
public void testSessionContextDestroyedWhenHttpSessionInvalidatedOrTimesOut()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/event/EventTest.java 2009-01-27 23:15:43 UTC (rev 1255)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/event/EventTest.java 2009-01-27 23:34:18 UTC (rev 1256)
@@ -32,25 +32,27 @@
*
* @author David Allen
*
+ * Spec version: PRD2
+ *
*/
public class EventTest extends AbstractTest
{
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "8.4")
+ @SpecAssertion(section = "7.4")
public void testObserverCalledBeforeTransactionCompleteMaySetRollbackOnly()
{
assert false;
}
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "8.4")
+ @SpecAssertion(section = "7.4")
public void testObserverManipulatingJTATransactionsDirectlyFails()
{
assert false;
}
@Test(groups = { "events", "integration" })
- @SpecAssertion(section = "8.5")
+ @SpecAssertion(section = "7.5")
public void testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic()
{
deployBeans(Pomeranian.class);
@@ -61,7 +63,7 @@
}
@Test(groups = { "events", "integration" }, expectedExceptions=DefinitionException.class)
- @SpecAssertion(section = "8.5")
+ @SpecAssertion(section = "7.5")
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
deployBeans(TibetanTerrier.class);
@@ -74,7 +76,7 @@
*
*/
@Test(groups = { "events", "integration" , "broken"})
- @SpecAssertion(section = "8.5.7")
+ @SpecAssertion(section = "7.5.8")
public void testEnterpriseBeanObserverMethodCalledWithCallerContext()
{
deployBeans(Pomeranian.class);
@@ -89,7 +91,7 @@
}
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "8.5.7")
+ @SpecAssertion(section = "7.5.8")
public void testTransactionalObserverThrownExceptionIsCaughtAndLogged()
{
assert false;
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1255 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: integration/context/application and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-27 18:15:43 -0500 (Tue, 27 Jan 2009)
New Revision: 1255
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecAssertion.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/application/ApplicationContextTest.java
Log:
updated to reflect latest spec
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecAssertion.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecAssertion.java 2009-01-27 22:55:53 UTC (rev 1254)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecAssertion.java 2009-01-27 23:15:43 UTC (rev 1255)
@@ -11,6 +11,8 @@
public String[] section();
+ public String id() default "";
+
public String note() default "";
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/application/ApplicationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/application/ApplicationContextTest.java 2009-01-27 22:55:53 UTC (rev 1254)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/application/ApplicationContextTest.java 2009-01-27 23:15:43 UTC (rev 1255)
@@ -2,10 +2,12 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
+/**
+ *
+ * Spec version: PRD2
+ */
public class ApplicationContextTest extends AbstractTest
{
@@ -14,7 +16,7 @@
* in the web application.
*/
@Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeActiveDuringServiceMethod()
{
assert false;
@@ -24,7 +26,7 @@
* The application scope is active during any Java EE web service invocation.
*/
@Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeActiveDuringWebSericeInvocation()
{
assert false;
@@ -36,7 +38,7 @@
* message delivery to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeActiveDuringRemoteMethodInvocationOfEjb()
{
assert false;
@@ -48,7 +50,7 @@
* message delivery to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod()
{
assert false;
@@ -60,7 +62,7 @@
* message delivery to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeActiveDuringEjbMessageDelivery()
{
assert false;
@@ -73,7 +75,7 @@
* application
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationContextSharedBetweenInvokationsInApplication()
{
assert false;
@@ -83,7 +85,7 @@
* The application context is destroyed when the application is undeployed.
*/
@Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.3")
+ @SpecAssertion(section = "8.5.3")
public void testApplicationScopeDestroyedWhenApplicationIsUndeployed()
{
assert false;
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1254 - tck/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-27 17:55:53 -0500 (Tue, 27 Jan 2009)
New Revision: 1254
Modified:
tck/trunk/impl/tck-audit.xml
tck/trunk/impl/tck-audit.xsd
Log:
renamed code attribute to id
Modified: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml 2009-01-27 22:05:24 UTC (rev 1253)
+++ tck/trunk/impl/tck-audit.xml 2009-01-27 22:55:53 UTC (rev 1254)
@@ -3,223 +3,223 @@
version="Revised Public Review Draft">
<section id="3" title="Bean implementation">
- <assertion code="a">
+ <assertion id="a">
<text>The container provides built-in support for simple beans (Java classes)</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The container provides built-in support for session beans</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>The container provides built-in support for producer methods and fields</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>The container provides built-in support for Resources (Java EE resources, persistence contexts, persistence units, remote EJBs and web services)</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>The container provides built-in support for JMS resources (topics and queues)</text>
</assertion>
</section>
<section id="3.1" title="Restriction upon bean instantiation">
- <assertion code="a">
+ <assertion id="a">
<text>The bean class is a concrete class and is not required to implement any special interface or extend any special superclass</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If the application calls a producer method directly, instead of letting the container call it, the returned object is not a contextual instance and the capabilities listed in Section 2.1, "Functionality provided by the container to the bean" will not be available to the returned object.</text>
</assertion>
</section>
<section id="3.2" title="Simple beans">
- <assertion code="a">
+ <assertion id="a">
<text>The bean class of a simple bean may not be a non-static inner class or a parameterized type</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The bean class of a simple bean may not be an abstract class, unless the simple bean is a decorator</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a simple bean is annotated with both the @Interceptor and @Decorator stereotypes, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>Multiple simple beans may share the same bean class. This occurs when beans are defined using XML. Only one simple bean per bean class may be defined using annotations.</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>If a simple bean has a public field, it must have scope @Dependent. If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
</section>
<section id="3.2.1" title="Which Java classes are beans?">
- <assertion code="a">
+ <assertion id="a">
<text>A top-level Java class is not a simple bean if it is a parameterized type</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A top-level Java class is only a simple bean if it is a concrete class, or annotated @Decorator.</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>A top-level Java class is not a simple bean if it implements the javax.servlet.Servlet interface</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>A top-level Java class is not a simple bean if it implements the javax.servlet.Filter interface</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletContextListener interface</text>
</assertion>
- <assertion code="i">
+ <assertion id="i">
<text>A top-level Java class is not a simple bean if it implements the javax.servlet.http.HttpSessionListener interface</text>
</assertion>
- <assertion code="j">
+ <assertion id="j">
<text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletRequestListener interface</text>
</assertion>
- <assertion code="k">
+ <assertion id="k">
<text>A top-level Java class is not a simple bean if it implements the javax.ejb.EnterpriseBean interface</text>
</assertion>
- <assertion code="l">
+ <assertion id="l">
<text>A top-level Java class is not a simple bean if it extends javax.faces.component.UIComponent</text>
</assertion>
- <assertion code="m">
+ <assertion id="m">
<text>A top-level Java class is not a simple bean if it is declared as an EJB bean class in ejb-jar.xml</text>
</assertion>
- <assertion code="n">
+ <assertion id="n">
<text>A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml</text>
</assertion>
- <assertion code="o">
+ <assertion id="o">
<text>A top-level Java class is only a simple bean if it has an appropriate constructor - either a constructor with no parameters, or declares a constructor annotated @Initializer</text>
</assertion>
- <assertion code="p">
+ <assertion id="p">
<text>Additional simple beans with the same bean class may be defined using XML, by specifying the class in beans.xml.</text>
</assertion>
</section>
<section id="3.2.2" title="Bean types of a simple bean">
- <assertion code="a">
+ <assertion id="a">
<text>The set of bean types for a simple bean contains the bean class, every superclass and all interfaces it implements directly or indirectly.</text>
</assertion>
</section>
<section id="3.2.3" title="Declaring a simple bean using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>A simple bean with a constructor that takes no parameters does not require any special annotations</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A simple bean may extend another simple bean</text>
</assertion>
</section>
<section id="3.2.4" title="Declaring a simple bean using XML">
- <assertion code="a">
+ <assertion id="a">
<text>Simple beans may be declared in beans.xml using the bean class name</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A simple bean may even be declared at any injection point declared in XML, as defined in Section 9.9, "Inline bean declarations", in which case no bindings are specified.</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a simple bean defined in XML is a parameterized type or a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If the bean class of a simple bean defined in XML is an abstract class, and the simple bean is not a decorator, a DefinitionException
is thrown by the container at deployment time</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
thrown by the container at deployment time.</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
thrown by the container at deployment time.</text>
</assertion>
</section>
<section id="3.2.5" title="Simple beans with the @New binding">
- <assertion code="a">
+ <assertion id="a">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has the same bean class</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor, initializer methods and injected fields defined by annotations</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has the same interceptor bindings defined by annotations</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has scope @Dependent</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has deployment type @Standard</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has @javax.inject.New as the only binding</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has no bean name</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has no stereotypes</text>
</assertion>
- <assertion code="i">
+ <assertion id="i">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has no observer methods, producer methods or fields or disposal methods</text>
</assertion>
</section>
<section id="3.2.6" title="Bean constructors">
- <assertion code="a">
+ <assertion id="a">
<text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
</assertion>
</section>
<section id="3.2.6.1" title="Declaring a bean constructor using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>The bean constructor may be identified by annotating the constructor @Initializer</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If a simple bean defined using annotations does not explicitly declare a constructor using @Initializer, the constructor that accepts no parameters is the bean constructor</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If a simple bean defined using annotations has more than one constructor annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a bean constructor has a parameter annotated @Disposes, or @Observes, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
@@ -227,206 +227,206 @@
<section id="3.2.6.2" title="Declaring a bean constructor using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For a simple bean defined using XML, the bean constructor may be specified by listing the parameter types of the constructer, in order, as direct children of the element that declares the bean</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If a simple bean defined using XML does not explicitly declare constructor parameters in XML, the constructor that accepts no parameters is the bean constructor</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If a simple bean declared in XML does not have a constructor with the parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>When a bean constructor is declared in XML, the container ignores binding annotations applied to Java constructor parameters</text>
</assertion>
</section>
<section id="3.2.6.3" title="Bean constructor parameters">
- <assertion code="a">
+ <assertion id="a">
<text>If the bean constructor has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the constructor with those parameter values.</text>
</assertion>
</section>
<section id="3.2.7" title="Specializing a simple bean">
- <assertion code="a">
+ <assertion id="a">
<text>If a bean class of a simple bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled.</text>
<note>This assertion relates to specialized beans declared using annotations</note>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a simple bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
<note>This assertion relates to specialized beans declared in XML</note>
</assertion>
</section>
<section id="3.2.8" title="Default name for a simple bean">
- <assertion code="a">
+ <assertion id="a">
<text>The default name for a simple bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
</assertion>
</section>
<section id="3.3" title="Session beans">
- <assertion code="a">
+ <assertion id="a">
<text>A session bean is a bean that is implemented by an EJB 3-style session bean</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A stateless session bean must belong to the @Dependent pseudo-scope</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a session bean specifies an illegal scope, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>Note that multiple session beans may share the same bean class. This occurs when beans are defined using XML</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>If the bean class of a session bean is annotated @Interceptor or @Decorator, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.3.1" title="EJB remove methods of session beans">
- <assertion code="a">
+ <assertion id="a">
<text>If a session bean is a stateful session bean, and the scope is @Dependent, the application may call any EJB remove method of an instance of the session bean.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If a session bean is a stateful session bean, and the scope is not @Dependent, the application may not directly call any EJB remove method of any instance of the session bean</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container. Furthermore, the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
</assertion>
</section>
<section id="3.3.2" title="Which EJBs are beans?">
- <assertion code="a">
+ <assertion id="a">
<text>All session beans exposing an EJB 3.x client view and declared via an EJB component defining annotation on the EJB bean class are beans, and thus no special declaration is required. Additional beans for these EJBs may be defined using XML, by specifying the bean class in beans.xml</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>All session beans exposing an EJB 3.x client view and declared in ejb-jar.xml are also beans. Additional beans for these EJBs may be defined using XML, by specifying the bean class and EJB name in beans.xml</text>
</assertion>
</section>
<section id="3.3.3" title="Bean types of a session bean">
- <assertion code="a">
+ <assertion id="a">
<text>The set of bean types for a session bean contains all local interfaces of the bean that do not have wildcard type parameters or type variables and their superinterfaces.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If the EJB has a bean class local view and the bean class is not a parameterized
type, the set of bean types contains the bean class and all superclasses.</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>java.lang.Object is a bean type of every session bean</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>Remote interfaces are not included in the set of bean types</text>
</assertion>
</section>
<section id="3.3.4" title="Declaring a session bean using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>A session bean does not require any special annotations</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A session bean class may extend another bean class</text>
</assertion>
</section>
<section id="3.3.5" title="Declaring a session bean using XML">
- <assertion code="a">
+ <assertion id="a">
<text>Session beans may be declared in beans.xml using the bean class name (for EJBs defined using a component-defining annotation) or bean class and EJB name (for EJBs defined in ejb-jar.xml)</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The ejbName attribute declares the EJB name of an EJB defined in ejb-jar.xml</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If an entity or message-driven bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.3.6" title="Session beans with the @New binding">
- <assertion code="a">
+ <assertion id="a">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has the same bean class</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has the same interceptor bindings defined by annotations</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has scope @Dependent,</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has deployment type @Standard</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has no bean name</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has no stereotypes</text>
</assertion>
- <assertion code="i">
+ <assertion id="i">
<text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such session bean, a second bean exists which has no observer methods, producer methods or fields or disposal methods</text>
</assertion>
@@ -434,387 +434,387 @@
<section id="3.3.7" title="Specializing a session bean">
- <assertion code="a">
+ <assertion id="a">
<text>If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and
if Y supports a bean-class local view, X must also support a bean-class local view.
Otherwise, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of X does not directly extend the bean class of another session bean, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a session bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
</assertion>
</section>
<section id="3.3.8" title="Default name for a session bean">
- <assertion code="a">
+ <assertion id="a">
<text>The default name for a session bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
</assertion>
</section>
<section id="3.3.9" title="Session bean proxies">
- <assertion code="a">
+ <assertion id="a">
<text>EJB local object references do not implement all local interfaces of the EJB. A local object reference may not be typecast to different local interface type, as required by Section 2.2, �Bean types�. Therefore, the container proxies the local object reference. A session bean proxy implements all local interfaces of the EJB.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>All session bean proxies must be serializable</text>
</assertion>
</section>
<section id="3.4" title="Producer methods">
- <assertion code="a">
+ <assertion id="a">
<text>A producer method must be a method of a simple bean class or session bean class</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A producer method may be either static or non-static</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a producer method sometimes returns a null value, then the producer method must have scope @Dependent</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>If the producer method return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>If a producer method return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
</assertion>
- <assertion code="i">
+ <assertion id="i">
<text>A bean may declare multiple producer methods</text>
</assertion>
</section>
<section id="3.4.1" title="Bean types of a producer method">
- <assertion code="a">
+ <assertion id="a">
<text>If the return type of a producer method is an interface, the set of bean types contains the return type, all interfaces it extends directly or indirectly and java.lang.Object</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If a return type of a producer method is primitive or is a Java array type, the set of bean types contains exactly two types: the method return type and java.lang.Object</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the return type of a producer method is a class, the set of bean types contains the return type, every superclass and all interfaces it implements directly or indirectly</text>
</assertion>
</section>
<section id="3.4.2" title="Declaring a producer method using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>A producer method may be declared by annotating a method with the @javax.inject.Produces annotation</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A producer method may also specify scope, name, deployment type, stereotypes and/or bindings</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If a producer method is annotated @Initializer, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.3" title="Declaring a producer method using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For a bean defined in XML, a producer method may be declared using the method name, the <Produces> element, the return type, and the parameter types of the method</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When a producer method is declared in XML, the container ignores binding annotations applied to the Java method or method parameters</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.4" title="Producer method parameters">
- <assertion code="a">
+ <assertion id="a">
<text>If the producer method has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the producer method with those parameter values</text>
</assertion>
</section>
<section id="3.4.5" title="Specializing a producer method">
- <assertion code="a">
+ <assertion id="a">
<text>If a producer method X is annotated @Specializes, then it must be non-static and directly override another producer method Y. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If the method is static or does not directly override another producer method, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.6" title="Disposal methods">
- <assertion code="a">
+ <assertion id="a">
<text>A disposal method must be a method of a simple bean class or session bean class.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A disposal method may be either static or non-static</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean is a session bean, the disposal method must be a business method of the EJB or a static method of the bean class</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>A bean may declare multiple disposal methods</text>
</assertion>
</section>
<section id="3.4.7" title="Disposed parameter of a disposal method">
- <assertion code="a">
+ <assertion id="a">
<text>Each disposal method must have exactly one disposed parameter, of the same type as the corresponding producer method return type</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When searching for disposal methods for a producer method, the container considers the type and bindings of the disposed parameter. If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the disposed parameter does not resolve to any producer method according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.8" title="Declaring a disposal method using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>A disposal method may be declared using annotations by annotating a parameter @javax.inject.Disposes. That parameter is the disposed parameter</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If a method has more than one parameter annotated @Disposes, a DefinitionException is thrown by the container</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If a disposal method is annotated @Produces, or @Initializer or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.9" title="Declaring a disposal method using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For a bean defined in XML, a disposal method may be declared using the method name, the <Disposes> element, and the parameter types of the method</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When a disposal method is declared in XML, the container ignores binding annotations applied to the Java method parameter</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.10" title="Disposal method parameters">
- <assertion code="a">
+ <assertion id="a">
<text>In addition to the disposed parameter, a disposal method may declare additional parameters, which may also specify bindings. The container calls Manager.getInstanceToInject() to determine a value for each parameter of a disposal method and calls the disposal method with those parameter values</text>
</assertion>
</section>
<section id="3.4.11" title="Disposal method resolution">
- <assertion code="a">
+ <assertion id="a">
<text>When searching for disposal methods for a producer method, the container searches for disposal methods which are declared by an enabled bean, and for which the disposed parameter must resolve to the producer method, according to the typesafe resolution algorithm</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If there are multiple disposal methods for a producer method, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.4.12" title="Default name for a producer method">
- <assertion code="a">
+ <assertion id="a">
<text>The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name</text>
</assertion>
</section>
<section id="3.5" title="Producer fields">
- <assertion code="a">
+ <assertion id="a">
<text>A producer field must be a field of a simple bean class or session bean class</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A producer field may be either static or nonstatic</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>If the producer field return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>If a producer field return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>A bean may declare multiple producer fields</text>
</assertion>
</section>
<section id="3.5.1" title="Bean types of a producer field">
- <assertion code="a">
+ <assertion id="a">
<text>The bean types of a producer field depend upon the field type. If the field type is an interface, the set of bean types contains the field type, all interfaces it extends directly or indirectly and java.lang.Object</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The bean types of a producer field depend upon the field type. If a field type is primitive or is a Java array type, the set of bean types contains exactly two types: the field type and java.lang.Object</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>The bean types of a producer field depend upon the field type. If the field type is a class, the set of bean types contains the field type, every superclass and all interfaces it implements directly or indirectly</text>
</assertion>
</section>
<section id="3.5.2" title="Declaring a producer field using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>A producer field may be declared by annotating a field with the @javax.inject.Produces annotation</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A producer field may also specify scope, name, deployment type, stereotypes and/or bindings</text>
</assertion>
</section>
<section id="3.5.3" title="Declaring a producer field using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For a bean defined in XML, a producer field may be declared using the field name, the <Produces> element, and the type</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When a producer field is declared in XML, the container ignores binding annotations applied to the Java field</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.5.4" title="Default name for a producer field">
- <assertion code="a">
+ <assertion id="a">
<text>The default name for a producer field is the field name</text>
</assertion>
</section>
<section id="3.6" title="Resources">
- <assertion code="a">
+ <assertion id="a">
<text>Resources may be declared in beans.xml, allowing direct injection of an EE resource, entity manager, entity manager factory, EJB remote object or web service reference</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @Resource, @PersistenceContext, @PersistenceUnit, @EJB or @WebServiceRef</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A resource always has scope @Dependent</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>A resource may not declare a bean name</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>Resources are always declared using XML</text>
</assertion>
</section>
<section id="3.6.1" title="Declaring a resource using XML">
- <assertion code="a">
+ <assertion id="a">
<text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a Java EE resource, the EE resource type must be specified�for example javax.sql.Datasource for a JDBC datasource. The bean type of the resource is this specified type</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence context, javax.persistence.EntityManager must be specified. The bean type of the resource is this specified type</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence unit, javax.persistence.EntityManagerFactory must be specified. The bean type of the resource is this specified type</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a remote EJB, an EJB remote interface type must be specified. The bean type of the resource is this specified type</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a web service, a web service type must be specified. The bean type of the resource is this specified type</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
<WebServiceRef> element. For a Java EE resource, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements
of the <Resource> element</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
<WebServiceRef> element. For a persistence context, a persistence unit name must be specified using the <unitName> child element of the <PersistenceContext> element</text>
</assertion>
- <assertion code="h">
+ <assertion id="h">
<text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
<WebServiceRef> element. For a persistence unit, a persistence unit name must be specified using the <unitName> child element of the <PersistenceUnit> element</text>
</assertion>
- <assertion code="i">
+ <assertion id="i">
<text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
<WebServiceRef> element. For a remote EJB, a JNDI name, mapped name or EJB link must be specified using the <name>, <mappedName> or <ejbLink> child elements of the <EJB> element</text>
</assertion>
- <assertion code="j">
+ <assertion id="j">
<text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
<WebServiceRef> element. For a web service, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <WebServiceRef> element. Optionally, a URL pointing to a WSDL document may be specified using the <wsdlLocation> child element</text>
</assertion>
@@ -830,141 +830,141 @@
</section>
<section id="3.7" title="JMS resources">
- <assertion code="a">
+ <assertion id="a">
<text>JMS resources may be declared in beans.xml</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>JMS queue resources must allow the direct injection of the Queue, QueueConnection, QueueSession, QueueReceiver and/or QueueSender</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>JMS topic resources must allow the direct injection of the Topic, TopicConnection, TopicSession, TopicSubscriber and/or TopicPublisher</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a JMS resource, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>A JMS resource always has scope @Dependent</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>A JMS resource may not declare a bean name</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>JMS resources are always declared using XML</text>
</assertion>
</section>
<section id="3.7.1" title="Bean types of a JMS resource">
- <assertion code="a">
+ <assertion id="a">
<text>For JMS resources that represent a queue, the bean types are Queue, QueueConnection, QueueSession and QueueSender</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>For JMS resources that represent a topic, the bean types are Topic, TopicConnection, TopicSession and TopicPublisher</text>
</assertion>
</section>
<section id="3.7.2" title="Declaring a JMS resource using XML">
- <assertion code="a">
+ <assertion id="a">
<text>A JMS resource may be declared using the <Topic> or <Queue> elements in beans.xml</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>Each JMS resource declaration must contain a child <Resource> element. A JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <Resource> element</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>One or more bindings may be specified. If no binding is explicitly specified, the default binding @Current is assumed</text>
</assertion>
</section>
<section id="3.8" title="Injected fields">
- <assertion code="a">
+ <assertion id="a">
<text>An injected field is a non-static, non-final field of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>Any EJB session or message driven bean may declare injected fields and have those fields injected by the container</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If a field is a producer field or a decorator delegate attribute, it is not an injected field</text>
</assertion>
</section>
<section id="3.8.1" title="Declaring an injected field using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>An injected field may be declared by annotating the field with any binding type</text>
</assertion>
</section>
<section id="3.8.2" title="Declaring an injected field using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For bean defined in XML, an injected field may be declared using the field name and a child element representing the type of the field</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When an injected field is declared in XML, the container ignores binding annotations applied to the Java field</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the type element does not declare any binding, the default binding @Current is assumed</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.9" title="Initializer methods">
- <assertion code="a">
+ <assertion id="a">
<text>An initializer method is a non-static method of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>Method interceptors are never called when the container calls an initializer method</text>
</assertion>
- <assertion code="e">
+ <assertion id="e">
<text>A bean class may declare multiple (or zero) initializer methods</text>
</assertion>
- <assertion code="f">
+ <assertion id="f">
<text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
</assertion>
- <assertion code="g">
+ <assertion id="g">
<text>Any EJB session or message driven bean may declare initializer methods and have the methods called by the container</text>
</assertion>
</section>
<section id="3.9.1" title="Declaring an initializer method using annotations">
- <assertion code="a">
+ <assertion id="a">
<text>An initializer method may be declared by annotating the method @javax.inject.Initializer</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>If an initializer method is annotated @Produces, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
@@ -972,53 +972,53 @@
<section id="3.9.2" title="Declaring an initializer method using XML">
- <assertion code="a">
+ <assertion id="a">
<text>For a bean defined in XML, an initializer method may be declared using the method name, the <Initializer> element and the parameter types of the method</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>When an initializer method is declared in XML, the container ignores binding annotations applied to the Java method parameters</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="3.9.3" title="Initializer method parameters">
- <assertion code="a">
+ <assertion id="a">
<text>An initializer method may have any number of parameters. If the initializer method has parameters, the container calls Manager.getInstanceToInject() to determine a value for each parameter and calls the initializer method with those parameter values</text>
</assertion>
</section>
<section id="3.10" title="Support for Common Annotations">
- <assertion code="a">
+ <assertion id="a">
<text>Dependency injection via @EJB, @Resource, @PersistenceUnit and @PersistenceContext is provided by the container when annotations are applied to the bean class of a simple bean</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>@PostConstruct and @PreDestroy callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>Interception, as defined in javax.interceptor is provided by the container when annotations are applied to the bean class of a simple bean</text>
</assertion>
- <assertion code="d">
+ <assertion id="d">
<text>@PersistenceContext(type=EXTENDED) is not supported for simple beans</text>
</assertion>
</section>
<section id="3.11" title="The Bean object for a bean">
- <assertion code="a">
+ <assertion id="a">
<text>Concrete subclasses of Bean must implement the operations defined by the Contextual interface defined in Section 6.1, "The Contextual interface".</text>
</assertion>
- <assertion code="b">
+ <assertion id="b">
<text>An instance of Bean exists for every enabled bean in a deployment</text>
</assertion>
- <assertion code="c">
+ <assertion id="c">
<text>An application or third party framework may add support for new kinds of beans beyond those defined by the this specification (simple beans, session beans, producer methods and fields, resources and JMS resources) by extending Bean and registering beans with the container, using the mechanism defined in Section 11.3, "Bean registration".</text>
</assertion>
</section>
Modified: tck/trunk/impl/tck-audit.xsd
===================================================================
--- tck/trunk/impl/tck-audit.xsd 2009-01-27 22:05:24 UTC (rev 1253)
+++ tck/trunk/impl/tck-audit.xsd 2009-01-27 22:55:53 UTC (rev 1254)
@@ -40,7 +40,7 @@
</xs:element>
<xs:attributeGroup name="attlist.assertion">
- <xs:attribute name="code" type="xs:string"/>
+ <xs:attribute name="id" type="xs:string"/>
</xs:attributeGroup>
<xs:element name="text">
15 years, 4 months
[webbeans-commits] Webbeans SVN: r1253 - in ri/trunk/webbeans-ri: src/test/java/org/jboss/webbeans/test/unit/lookup and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-27 17:05:24 -0500 (Tue, 27 Jan 2009)
New Revision: 1253
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Car.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Food.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Petrol.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Pig.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java
Modified:
ri/trunk/webbeans-ri/unit-tests.xml
Log:
Ciruclar dependency tests
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Initializer;
+
+@ApplicationScoped
+class Air
+{
+ @Initializer
+ public Air(Fish fish)
+ {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Air.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+
+@ApplicationScoped
+class Bar
+{
+
+ public static boolean success;
+
+ @Current Foo foo;
+
+ public Bar()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (foo.getName().equals("foo"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "bar";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Initializer;
+
+@ApplicationScoped
+class Bird
+{
+
+ private Water water;
+
+ @Initializer
+ public Bird(Water water)
+ {
+ this.water = water;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Bird.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Car.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Car.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Car.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,32 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Current;
+
+class Car
+{
+
+ public static boolean success;
+
+ @Current Petrol petrol;
+
+ public Car()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (petrol.getName().equals("petrol"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "herbie";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Car.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,223 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import org.jboss.webbeans.test.unit.AbstractTest;
+import org.testng.annotations.Test;
+
+public class CircularDependencyTest extends AbstractTest
+{
+
+
+ @Test(groups="broken")
+ public void testCircularInjectionOnTwoNormalBeans() throws Exception
+ {
+ deployBeans(Pig.class, Food.class);
+ manager.getInstanceByType(Pig.class).getName();
+ assert Pig.success;
+ assert Food.success;
+ }
+
+ @Test(groups="broken")
+ public void testCircularInjectionOnOneNormalAndOneDependentBean() throws Exception
+ {
+ deployBeans(Car.class, Petrol.class);
+ manager.getInstanceByType(Petrol.class).getName();
+ assert Petrol.success;
+ assert Car.success;
+ }
+
+
+ @Test(groups="broken")
+ public void testCircularInjectionOnTwoSimpleDependentBeans() throws Exception
+ {
+ deployBeans(Foo.class, Bar.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Foo.class).getName();
+ assert Foo.success;
+ assert Bar.success;
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testDependentProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean() throws Exception
+ {
+ deployBeans(DependentSelfConsumingDependentProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(DependentSelfConsumingDependentProducer.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testNormalProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean() throws Exception
+ {
+ deployBeans(NormalSelfConsumingNormalProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(NormalSelfConsumingNormalProducer.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testNormalProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean() throws Exception
+ {
+ deployBeans(DependentSelfConsumingNormalProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(DependentSelfConsumingNormalProducer.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testDependentProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean() throws Exception
+ {
+ deployBeans(NormalSelfConsumingDependentProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(NormalSelfConsumingDependentProducer.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testNormalSelfConsumingProducer() throws Exception
+ {
+ deployBeans(NormalLoopingProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Violation.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testDependentSelfConsumingProducer() throws Exception
+ {
+ deployBeans(DependentLoopingProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Violation.class).ping();
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testDependentCircularConstructors() throws Exception
+ {
+ deployBeans(Water.class, Fish.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Fish.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testNormalCircularConstructors() throws Exception
+ {
+ deployBeans(Bird.class, Air.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Bird.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testNormalAndDependentCircularConstructors() throws Exception
+ {
+ deployBeans(Space.class, Planet.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Planet.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testSelfConsumingConstructorsOnDependentBean() throws Exception
+ {
+ deployBeans(Farm.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(Farm.class);
+ }
+
+ }.run();
+ }
+
+ @Test(groups="broken")
+ public void testSelfConsumingConstructorsOnNormalBean() throws Exception
+ {
+ deployBeans(House.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ manager.getInstanceByType(House.class);
+ }
+
+ }.run();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Produces;
+
+class DependentLoopingProducer
+{
+
+ @Produces
+ public Violation produceViolation(Violation violation) {
+ return new Violation();
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Current;
+import javax.inject.Produces;
+
+class DependentSelfConsumingDependentProducer
+{
+ @Current Violation violation;
+
+ @Produces
+ public Violation produceViolation() {
+ return new Violation();
+ }
+
+ public void ping() {
+
+ }
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class DependentSelfConsumingNormalProducer
+{
+ @Current Violation violation;
+
+ @Produces @ApplicationScoped
+ public Violation produceViolation() {
+ return new Violation();
+ }
+
+ public void ping() {
+
+ }
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Initializer;
+
+class Farm
+{
+
+ @Initializer
+ public Farm(Farm farm)
+ {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Farm.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Initializer;
+
+class Fish
+{
+
+ private Water water;
+
+ @Initializer
+ public Fish(Water water)
+ {
+ this.water = water;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Fish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,32 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Current;
+
+class Foo
+{
+
+ public static boolean success;
+
+ @Current Bar bar;
+
+ public Foo()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (bar.getName().equals("bar"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "foo";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Foo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Food.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Food.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Food.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+
+@ApplicationScoped
+class Food
+{
+
+ public static boolean success;
+
+ @Current Pig pig;
+
+ public Food()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (pig.getName().equals("john"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "food";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Food.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Initializer;
+
+@ApplicationScoped
+class House
+{
+
+ @Initializer
+ public House(House farm)
+ {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/House.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class NormalLoopingProducer
+{
+
+ @Produces @ApplicationScoped
+ public Violation produceViolation(Violation violation) {
+ return new Violation();
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class NormalSelfConsumingDependentProducer
+{
+ @Current Violation violation;
+
+ @Produces @ApplicationScoped
+ public Violation produceViolation() {
+ return new Violation();
+ }
+
+ public void ping() {
+
+ }
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class NormalSelfConsumingNormalProducer
+{
+ @Current Violation violation;
+
+ @Produces @ApplicationScoped
+ public Violation produceViolation() {
+ return new Violation();
+ }
+
+ public void ping() {
+
+ }
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Petrol.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Petrol.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Petrol.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+
+@ApplicationScoped
+class Petrol
+{
+
+ public static boolean success;
+
+ @Current Car car;
+
+ public Petrol()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (car.getName().equals("herbie"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "petrol";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Petrol.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Pig.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Pig.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Pig.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.annotation.PostConstruct;
+import javax.context.ApplicationScoped;
+import javax.inject.Current;
+
+@ApplicationScoped
+class Pig
+{
+
+ public static boolean success;
+
+ @Current Food food;
+
+ public Pig()
+ {
+ success = false;
+ }
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ if (food.getName().equals("food"))
+ {
+ success = true;
+ }
+ }
+
+ public String getName()
+ {
+ return "john";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Pig.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Initializer;
+
+class Planet
+{
+
+ private Water water;
+
+ @Initializer
+ public Planet(Water water)
+ {
+ this.water = water;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Planet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Initializer;
+
+@ApplicationScoped
+class Space
+{
+ @Initializer
+ public Space(Fish fish)
+ {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Space.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+class Violation
+{
+
+ public void ping()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Violation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java 2009-01-27 22:05:24 UTC (rev 1253)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import javax.inject.Initializer;
+
+class Water
+{
+ @Initializer
+ public Water(Fish fish)
+ {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/Water.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/unit-tests.xml
===================================================================
--- ri/trunk/webbeans-ri/unit-tests.xml 2009-01-27 20:53:27 UTC (rev 1252)
+++ ri/trunk/webbeans-ri/unit-tests.xml 2009-01-27 22:05:24 UTC (rev 1253)
@@ -40,6 +40,7 @@
<package name="org.jboss.webbeans.test.unit.event" />
<package name="org.jboss.webbeans.test.unit.implementation" />
<package name="org.jboss.webbeans.test.unit.lookup" />
+ <package name="org.jboss.webbeans.test.unit.lookup.circular" />
</packages>
</test>
15 years, 4 months