[webbeans-commits] Webbeans SVN: r2873 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap and 12 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Tue Jun 23 18:16:28 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-06-23 18:16:27 -0400 (Tue, 23 Jun 2009)
New Revision: 2873
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/BazDecorator1.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/EnabledDecoratorNotADecoratorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/Logger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/MockLogger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/TimestampLogger.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/beans.xml
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/MultipleDelegateInjectionPointsTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/NoDelegateInjectionPointsTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/NotAllDecoratedTypesImplementedTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/beans.xml
Log:
decorator ordering
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -202,7 +202,7 @@
*/
private transient final ThreadLocal<Stack<InjectionPoint>> currentInjectionPoint;
private transient final List<Bean<?>> beans;
- private transient final List<Decorator<?>> decorators;
+ private transient final List<DecoratorBean<?>> decorators;
private final transient Namespace rootNamespace;
private final transient ConcurrentSetMultiMap<Type, EventObserver<?>> registeredObservers;
private final transient Set<BeanManagerImpl> childActivities;
@@ -225,7 +225,7 @@
return new BeanManagerImpl(
serviceRegistry,
new CopyOnWriteArrayList<Bean<?>>(),
- new CopyOnWriteArrayList<Decorator<?>>(),
+ new CopyOnWriteArrayList<DecoratorBean<?>>(),
new ConcurrentSetHashMultiMap<Type, EventObserver<?>>(),
new Namespace(),
new ConcurrentHashMap<Class<?>, EnterpriseBean<?>>(),
@@ -273,7 +273,7 @@
*
* @param ejbServices the ejbResolver to use
*/
- private BeanManagerImpl(ServiceRegistry serviceRegistry, List<Bean<?>> beans, List<Decorator<?>> decorators, ConcurrentSetMultiMap<Type, EventObserver<?>> registeredObservers, Namespace rootNamespace, Map<Class<?>, EnterpriseBean<?>> newEnterpriseBeans, Map<String, RIBean<?>> riBeans, ClientProxyProvider clientProxyProvider, ConcurrentListMultiMap<Class<? extends Annotation>, Context> contexts, Set<CurrentActivity> currentActivities, Map<Bean<?>, Bean<?>> specializedBeans, List<Class<? extends Annotation>> enabledDeploymentTypes, List<Class<?>> enabledDecoratorClasses, AtomicInteger ids)
+ private BeanManagerImpl(ServiceRegistry serviceRegistry, List<Bean<?>> beans, List<DecoratorBean<?>> decorators, ConcurrentSetMultiMap<Type, EventObserver<?>> registeredObservers, Namespace rootNamespace, Map<Class<?>, EnterpriseBean<?>> newEnterpriseBeans, Map<String, RIBean<?>> riBeans, ClientProxyProvider clientProxyProvider, ConcurrentListMultiMap<Class<? extends Annotation>, Context> contexts, Set<CurrentActivity> currentActivities, Map<Bean<?>, Bean<?>> specializedBeans, List<Class<? extends Annotation>> enabledDeploymentTypes, List<Class<?>> enabledDecoratorClasses, AtomicInteger ids)
{
this.services = serviceRegistry;
this.beans = beans;
@@ -525,7 +525,7 @@
}
if (bean instanceof DecoratorBean)
{
- decorators.add((Decorator<?>) bean);
+ decorators.add((DecoratorBean<?>) bean);
}
riBeans.put(bean.getId(), bean);
registerBeanNamespace(bean);
@@ -569,7 +569,7 @@
return Collections.unmodifiableList(beans);
}
- public List<Decorator<?>> getDecorators()
+ public List<DecoratorBean<?>> getDecorators()
{
return Collections.unmodifiableList(decorators);
}
@@ -826,6 +826,7 @@
*/
public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindings)
{
+ // TODO Fix this cast and make the resolver return a list
return new ArrayList(decoratorResolver.get(ResolvableFactory.of(types, bindings)));
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -23,6 +23,7 @@
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -41,6 +42,7 @@
import javax.inject.Obtains;
import javax.inject.UnserializableDependencyException;
+import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.NewEnterpriseBean;
import org.jboss.webbeans.bean.NewSimpleBean;
import org.jboss.webbeans.bean.RIBean;
@@ -149,8 +151,27 @@
throw new UnproxyableResolutionException("Normal scoped bean " + bean + " is not proxyable");
}
}
-
+
+ validateEnabledDecoratorClasses();
+
}
+
+ private void validateEnabledDecoratorClasses()
+ {
+ // TODO Move building this list to the boot or sth
+ Set<Class<?>> decoratorBeanClasses = new HashSet<Class<?>>();
+ for (DecoratorBean<?> bean : manager.getDecorators())
+ {
+ decoratorBeanClasses.add(bean.getType());
+ }
+ for (Class<?> clazz : manager.getEnabledDecoratorClasses())
+ {
+ if (!decoratorBeanClasses.contains(clazz))
+ {
+ throw new DeploymentException("Enabled decorator " + clazz + " is not the bean class of at least one decorator (detected decorators " + decoratorBeanClasses + ")");
+ }
+ }
+ }
private boolean hasHigherPrecedence(Class<? extends Annotation> deploymentType, Class<? extends Annotation> otherDeploymentType)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -207,8 +207,8 @@
registerBeans(getServices().get(WebBeanDiscovery.class).discoverWebBeanClasses(), ejbDescriptors);
fireAfterBeanDiscoveryEvent();
log.debug("Web Beans initialized. Validating beans.");
- manager.getResolver().resolveInjectionPoints();
new BeanValidator(manager).validate();
+ // TODO I don't really think this is needed anymore, as we validate all points
manager.getResolver().resolveInjectionPoints();
fireAfterDeploymentValidationEvent();
endDeploy(requestBeanStore);
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -18,8 +18,10 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
+import java.util.Comparator;
import java.util.List;
import java.util.Set;
+import java.util.TreeSet;
import javax.enterprise.inject.spi.Bean;
@@ -61,5 +63,32 @@
{
return bean.getDelegateTypes();
}
+
+ @Override
+ protected Set<Bean<?>> sortBeans(Set<Bean<?>> matchedBeans)
+ {
+ Set<Bean<?>> sortedBeans = new TreeSet<Bean<?>>(new Comparator<Bean<?>>()
+ {
+
+ public int compare(Bean<?> o1, Bean<?> o2)
+ {
+ if (o1 instanceof DecoratorBean && o2 instanceof DecoratorBean)
+ {
+ List<Class<?>> enabledDecorators = getManager().getEnabledDecoratorClasses();
+ int p1 = enabledDecorators.indexOf(((DecoratorBean<?>) o1).getType());
+ int p2 = enabledDecorators.indexOf(((DecoratorBean<?>) o2).getType());
+ return p1 - p2;
+ }
+ else
+ {
+ throw new IllegalStateException("Unable to process non container generated decorator!");
+ }
+
+ }
+
+ });
+ sortedBeans.addAll(matchedBeans);
+ return sortedBeans;
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -86,7 +86,7 @@
private ConcurrentCache<String, Set<Bean<?>>> resolvedNames;
// The beans to search
- private final List<? extends Bean<?>> beans;
+ private final List<? extends Bean<?>> allBeans;
// The Web Beans manager
private final BeanManagerImpl manager;
@@ -98,10 +98,10 @@
* Constructor
*
*/
- public Resolver(BeanManagerImpl manager, List<? extends Bean<?>> beans)
+ public Resolver(BeanManagerImpl manager, List<? extends Bean<?>> allBeans)
{
this.manager = manager;
- this.beans = beans;
+ this.allBeans = allBeans;
this.injectionPoints = new HashSet<WBAnnotated<?, ?>>();
this.resolvedInjectionPoints = new ConcurrentCache<Resolvable, Set<Bean<?>>>();
this.resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
@@ -144,7 +144,9 @@
{
public Set<Bean<?>> call() throws Exception
{
- return retainHighestPrecedenceBeans(getMatchingBeans(wrapped), manager.getEnabledDeploymentTypes());
+ Set<Bean<?>> matchedBeans = getMatchingBeans(wrapped);
+ matchedBeans = retainHighestPrecedenceBeans(matchedBeans);
+ return sortBeans(matchedBeans);
}
};
@@ -208,19 +210,26 @@
public Set<Bean<? extends Object>> call() throws Exception
{
Set<Bean<?>> matchedBeans = new HashSet<Bean<?>>();
- for (Bean<?> bean : beans)
+ for (Bean<?> bean : allBeans)
{
if ((bean.getName() == null && name == null) || (bean.getName() != null && bean.getName().equals(name)))
{
matchedBeans.add(bean);
}
}
- return retainHighestPrecedenceBeans(matchedBeans, manager.getEnabledDeploymentTypes());
+ matchedBeans = retainHighestPrecedenceBeans(matchedBeans);
+ return sortBeans(matchedBeans);
}
});
}
+
+ protected Set<Bean<?>> sortBeans(Set<Bean<?>> matchedBeans)
+ {
+ return matchedBeans;
+ }
+
/**
* Filters out the beans with the highest enabled deployment type
*
@@ -229,16 +238,16 @@
* @param enabledDeploymentTypes The enabled deployment types
* @return The filtered beans
*/
- private static Set<Bean<?>> retainHighestPrecedenceBeans(Set<Bean<?>> beans, List<Class<? extends Annotation>> enabledDeploymentTypes)
+ protected Set<Bean<?>> retainHighestPrecedenceBeans(Set<Bean<?>> beans)
{
if (beans.size() > 0)
{
- SortedSet<Class<? extends Annotation>> possibleDeploymentTypes = new TreeSet<Class<? extends Annotation>>(new ListComparator<Class<? extends Annotation>>(enabledDeploymentTypes));
+ SortedSet<Class<? extends Annotation>> possibleDeploymentTypes = new TreeSet<Class<? extends Annotation>>(new ListComparator<Class<? extends Annotation>>(manager.getEnabledDeploymentTypes()));
for (Bean<?> bean : beans)
{
possibleDeploymentTypes.add(bean.getDeploymentType());
}
- possibleDeploymentTypes.retainAll(enabledDeploymentTypes);
+ possibleDeploymentTypes.retainAll(manager.getEnabledDeploymentTypes());
Set<Bean<?>> trimmed = new HashSet<Bean<?>>();
if (possibleDeploymentTypes.size() > 0)
{
@@ -271,7 +280,7 @@
private Set<Bean<?>> getMatchingBeans(MatchingResolvable resolvable)
{
Set<Bean<?>> resolvedBeans = new HashSet<Bean<?>>();
- for (Bean<?> bean : beans)
+ for (Bean<?> bean : allBeans)
{
if (matches(resolvable, bean))
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -173,7 +173,8 @@
}
@Test(groups = { "contexts", "passivation", "enterpriseBean", "integration" })
- @SpecAssertion(section = "8.4", id = "a")
+ //@SpecAssertion(section = "8.4", id = "a")
+ @SpecAssertion(section = "unknown", id = "unknown")
public void testEJBWebBeanCanDeclarePassivatingScope()
{
assert getBeans(TurkuLocal.class).size() == 1;
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/BazDecorator1.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/BazDecorator1.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/BazDecorator1.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,32 @@
+/*
+ * 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.jsr299.tck.tests.decorators.definition;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+/**
+ * @author pmuir
+ *
+ */
+ at Decorator
+public class BazDecorator1 implements Baz
+{
+
+ @Decorates Bazt bazt;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/BazDecorator1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -47,7 +47,8 @@
@SpecAssertion(section="8.1", id="a"),
@SpecAssertion(section="8.1", id="d"),
@SpecAssertion(section="8.1.1", id="a"),
- @SpecAssertion(section="8.1.3", id="c")
+ @SpecAssertion(section="8.1.3", id="c"),
+ @SpecAssertion(section="8.3", id="a")
})
public void testDecoratorIsManagedBean()
@@ -99,8 +100,22 @@
public void testDecoratorDoesNotImplementDelegateType()
{
List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Baz.TYPES);
- assert decorators.size() == 2;
+ assert decorators.size() == 3;
}
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section="8.2", id="b"),
+ @SpecAssertion(section="8.3", id="a")
+ })
+ public void testDecoratorOrdering()
+ {
+ List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Baz.TYPES);
+ assert decorators.get(0).getTypes().contains(BazDecorator.class);
+ assert decorators.get(1).getTypes().contains(BazDecorator1.class);
+ assert decorators.get(2).getTypes().contains(FooDecorator.class);
+ assert decorators.size() == 3;
+ }
@Test
@SpecAssertion(section="8.2", id="a")
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/EnabledDecoratorNotADecoratorTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/EnabledDecoratorNotADecoratorTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/EnabledDecoratorNotADecoratorTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,44 @@
+/*
+ * 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.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+ at Artifact
+ at ExpectedDeploymentException(DeploymentError.class)
+ at BeansXml("beans.xml")
+public class EnabledDecoratorNotADecoratorTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertion(section="8.2", id="c")
+ public void testEnabledDecoratorNotADecoratorTest()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/EnabledDecoratorNotADecoratorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/Logger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/Logger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/Logger.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,35 @@
+/*
+ * 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.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator;
+
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface Logger
+{
+
+ public static final Set<Type> TYPES = new HashSet<Type>(Arrays.asList(Logger.class));
+
+ public void log(String string);
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/Logger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/MockLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/MockLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/MockLogger.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,41 @@
+/*
+ * 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.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockLogger implements Logger
+{
+
+ private static String log = "";
+
+ public void log(String string)
+ {
+ log += string;
+ }
+
+ /**
+ * @return the log
+ */
+ public static String getLog()
+ {
+ return log;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/MockLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/TimestampLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/TimestampLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/TimestampLogger.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,28 @@
+/*
+ * 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.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator;
+
+
+/**
+ * @author pmuir
+ *
+ */
+public abstract class TimestampLogger implements Logger
+{
+
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/TimestampLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -21,6 +21,7 @@
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
@@ -29,6 +30,7 @@
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
+ at BeansXml("beans.xml")
public class FinalBeanClassTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/MultipleDelegateInjectionPointsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/MultipleDelegateInjectionPointsTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/multipleDelegateInjectionPoints/MultipleDelegateInjectionPointsTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -21,6 +21,7 @@
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
@@ -29,6 +30,7 @@
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
+ at BeansXml("beans.xml")
public class MultipleDelegateInjectionPointsTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/NoDelegateInjectionPointsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/NoDelegateInjectionPointsTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/noDelegateInjectionPoints/NoDelegateInjectionPointsTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -21,6 +21,7 @@
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
@@ -29,6 +30,7 @@
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
+ at BeansXml("beans.xml")
public class NoDelegateInjectionPointsTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/NotAllDecoratedTypesImplementedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/NotAllDecoratedTypesImplementedTest.java 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/notAllDecoratedTypesImplemented/NotAllDecoratedTypesImplementedTest.java 2009-06-23 22:16:27 UTC (rev 2873)
@@ -21,6 +21,7 @@
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
@@ -29,6 +30,7 @@
*/
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
+ at BeansXml("beans.xml")
public class NotAllDecoratedTypesImplementedTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/beans.xml 2009-06-23 21:09:52 UTC (rev 2872)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/beans.xml 2009-06-23 22:16:27 UTC (rev 2873)
@@ -1,6 +1,7 @@
<beans>
<decorators>
<class>org.jboss.jsr299.tck.tests.decorators.definition.BazDecorator</class>
+ <class>org.jboss.jsr299.tck.tests.decorators.definition.BazDecorator1</class>
<class>org.jboss.jsr299.tck.tests.decorators.definition.FooDecorator</class>
<class>org.jboss.jsr299.tck.tests.decorators.definition.TimestampLogger</class>
</decorators>
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/beans.xml 2009-06-23 22:16:27 UTC (rev 2873)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.jsr299.tck.tests.decorators.definition.broken.enabledDecoratorIsNotDecorator.TimestampLogger</class>
+ </decorators>
+</beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/enabledDecoratorIsNotDecorator/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list