Weld SVN: r5887 - in core/trunk/impl/src/main: java/org/jboss/weld/logging/messages and 1 other directories.
by weld-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2010-02-19 01:36:14 -0500 (Fri, 19 Feb 2010)
New Revision: 5887
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ValidatorMessage.java
core/trunk/impl/src/main/resources/org/jboss/weld/messages/validator_en.properties
Log:
WELD-419,WELD-424
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java 2010-02-18 21:41:01 UTC (rev 5886)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java 2010-02-19 06:36:14 UTC (rev 5887)
@@ -25,6 +25,12 @@
import static org.jboss.weld.logging.messages.ValidatorMessage.BEAN_SPECIALIZED_TOO_MANY_TIMES;
import static org.jboss.weld.logging.messages.ValidatorMessage.DECORATOR_CLASS_NOT_BEAN_CLASS_OF_DECORATOR;
import static org.jboss.weld.logging.messages.ValidatorMessage.DECORATOR_SPECIFIED_TWICE;
+import static org.jboss.weld.logging.messages.ValidatorMessage.DECORATORS_CANNOT_HAVE_DISPOSER_METHODS;
+import static org.jboss.weld.logging.messages.ValidatorMessage.DECORATORS_CANNOT_HAVE_PRODUCER_FIELDS;
+import static org.jboss.weld.logging.messages.ValidatorMessage.DECORATORS_CANNOT_HAVE_PRODUCER_METHODS;
+import static org.jboss.weld.logging.messages.ValidatorMessage.INTERCEPTORS_CANNOT_HAVE_DISPOSER_METHODS;
+import static org.jboss.weld.logging.messages.ValidatorMessage.INTERCEPTORS_CANNOT_HAVE_PRODUCER_FIELDS;
+import static org.jboss.weld.logging.messages.ValidatorMessage.INTERCEPTORS_CANNOT_HAVE_PRODUCER_METHODS;
import static org.jboss.weld.logging.messages.ValidatorMessage.DISPOSAL_METHODS_WITHOUT_PRODUCER;
import static org.jboss.weld.logging.messages.ValidatorMessage.INJECTION_INTO_NON_BEAN;
import static org.jboss.weld.logging.messages.ValidatorMessage.INJECTION_INTO_NON_DEPENDENT_BEAN;
@@ -61,8 +67,10 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Alternative;
+import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.New;
+import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
@@ -304,7 +312,8 @@
public void validateDeployment(BeanManagerImpl manager, BeanDeployerEnvironment environment)
{
- validateBeans(manager.getDecorators(), new ArrayList<RIBean<?>>(), manager);
+ validateDecorators(manager.getDecorators(), new ArrayList<RIBean<?>>(), manager);
+ validateInterceptors(manager.getInterceptors());
validateBeans(manager.getBeans(), new ArrayList<RIBean<?>>(), manager);
validateEnabledDecoratorClasses(manager);
validateEnabledInterceptorClasses(manager);
@@ -328,6 +337,61 @@
}
}
+ public void validateInterceptors(Collection<? extends Interceptor<?>> interceptors)
+ {
+ for (Interceptor<?> interceptor : interceptors)
+ {
+ // TODO: confirm that producer methods, fields and disposers can be only found on Weld interceptors?
+ if (interceptor instanceof InterceptorImpl)
+ {
+ if (!((InterceptorImpl<?>) interceptor).getWeldAnnotated().getWeldMethods(Produces.class).isEmpty())
+ {
+ throw new DefinitionException(INTERCEPTORS_CANNOT_HAVE_PRODUCER_METHODS, interceptor);
+ }
+ if (!((InterceptorImpl<?>) interceptor).getWeldAnnotated().getWeldFields(Produces.class).isEmpty())
+ {
+ throw new DefinitionException(INTERCEPTORS_CANNOT_HAVE_PRODUCER_FIELDS, interceptor);
+ }
+ if (!((InterceptorImpl<?>) interceptor).getWeldAnnotated().getDeclaredWeldMethodsWithAnnotatedParameters(Disposes.class).isEmpty())
+ {
+ throw new DefinitionException(INTERCEPTORS_CANNOT_HAVE_DISPOSER_METHODS, interceptor);
+ }
+ }
+ }
+ }
+
+ public void validateDecorators(Collection<? extends Decorator<?>> beans, Collection<RIBean<?>> specializedBeans, BeanManagerImpl manager)
+ {
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean<?>)
+ {
+ validateRIBean((RIBean<?>) bean, manager, specializedBeans);
+
+ if (bean instanceof WeldDecorator)
+ {
+ if (!((WeldDecorator) bean).getWeldAnnotated().getWeldMethods(Produces.class).isEmpty())
+ {
+ throw new DefinitionException(DECORATORS_CANNOT_HAVE_PRODUCER_METHODS, bean);
+ }
+ if (!((WeldDecorator) bean).getWeldAnnotated().getWeldFields(Produces.class).isEmpty())
+ {
+ throw new DefinitionException(DECORATORS_CANNOT_HAVE_PRODUCER_FIELDS, bean);
+ }
+ if (!((WeldDecorator) bean).getWeldAnnotated().getDeclaredWeldMethodsWithAnnotatedParameters(Disposes.class).isEmpty())
+ {
+ throw new DefinitionException(DECORATORS_CANNOT_HAVE_DISPOSER_METHODS, bean);
+ }
+ }
+
+ }
+ else
+ {
+ validateBean(bean, manager);
+ }
+ }
+ }
+
public void validateBeanNames(BeanManagerImpl beanManager)
{
SetMultimap<String, Bean<?>> namedAccessibleBeans = Multimaps.newSetMultimap(new HashMap<String, Collection<Bean<?>>>(), new Supplier<Set<Bean<?>>>()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ValidatorMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ValidatorMessage.java 2010-02-18 21:41:01 UTC (rev 5886)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ValidatorMessage.java 2010-02-19 06:36:14 UTC (rev 5887)
@@ -64,5 +64,12 @@
@MessageId("001424") DISPOSAL_METHODS_WITHOUT_PRODUCER,
@MessageId("001425") INJECTION_POINT_HAS_WILDCARD,
@MessageId("001426") INJECTION_POINT_MUST_HAVE_TYPE_PARAMETER,
- @MessageId("001427") NON_FIELD_INJECTION_POINT_CANNOT_USE_NAMED;
+ @MessageId("001427") NON_FIELD_INJECTION_POINT_CANNOT_USE_NAMED,
+ @MessageId("001428") DECORATORS_CANNOT_HAVE_PRODUCER_METHODS,
+ @MessageId("001429") DECORATORS_CANNOT_HAVE_PRODUCER_FIELDS,
+ @MessageId("001430")DECORATORS_CANNOT_HAVE_DISPOSER_METHODS,
+ @MessageId("001431") INTERCEPTORS_CANNOT_HAVE_PRODUCER_METHODS,
+ @MessageId("001432") INTERCEPTORS_CANNOT_HAVE_PRODUCER_FIELDS,
+ @MessageId("001433")INTERCEPTORS_CANNOT_HAVE_DISPOSER_METHODS;
+
}
Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/validator_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/validator_en.properties 2010-02-18 21:41:01 UTC (rev 5886)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/validator_en.properties 2010-02-19 06:36:14 UTC (rev 5887)
@@ -26,3 +26,9 @@
INJECTION_POINT_HAS_WILDCARD=An injection point of type {0} cannot have a wildcard type parameter: {0}
INJECTION_POINT_MUST_HAVE_TYPE_PARAMETER=An injection point of type {0} must have a type parameter: {1}
NON_FIELD_INJECTION_POINT_CANNOT_USE_NAMED=Only field injection points can use the @Named qualifier with no value. {0} is not a field injection point.
+DECORATORS_CANNOT_HAVE_PRODUCER_METHODS=A decorator cannot have producer methods, but at least one was found on {0}.
+DECORATORS_CANNOT_HAVE_PRODUCER_FIELDS=A decorator cannot have producer fields, but at least one was found on {0}.
+DECORATORS_CANNOT_HAVE_DISPOSER_METHODS=A decorator cannot have disposer methods, but at least one was found on {0}.
+INTERCEPTORS_CANNOT_HAVE_PRODUCER_METHODS=An interceptor cannot have producer methods, but at least one was found on {0}.
+INTERCEPTORS_CANNOT_HAVE_PRODUCER_FIELDS=An interceptor cannot have producer fields, but at least one was found on {0}.
+INTERCEPTORS_CANNOT_HAVE_DISPOSER_METHODS=An interceptor cannot disposer methods, but at least one was found on {0}.
14 years, 10 months
Weld SVN: r5886 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-02-18 16:41:01 -0500 (Thu, 18 Feb 2010)
New Revision: 5886
Modified:
doc/trunk/reference/en-US/example.xml
Log:
use inputSecret instead of inputText
Modified: doc/trunk/reference/en-US/example.xml
===================================================================
--- doc/trunk/reference/en-US/example.xml 2010-02-18 18:08:33 UTC (rev 5885)
+++ doc/trunk/reference/en-US/example.xml 2010-02-18 21:41:01 UTC (rev 5886)
@@ -31,7 +31,7 @@
<h:outputLabel for="username">Username:</h:outputLabel>
<h:inputText id="username" value="#{credentials.username}"/>
<h:outputLabel for="password">Password:</h:outputLabel>
- <h:inputText id="password" value="#{credentials.password}"/>
+ <h:inputSecret id="password" value="#{credentials.password}"/>
</f:validateBean>
</h:panelGrid>
<h:commandButton value="Login" action="#{login.login}" rendered="#{!login.loggedIn}"/>
14 years, 10 months
Weld SVN: r5885 - build/trunk/dist-tck/porting-package/src/main/assembly.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 13:08:33 -0500 (Thu, 18 Feb 2010)
New Revision: 5885
Modified:
build/trunk/dist-tck/porting-package/src/main/assembly/assembly.xml
Log:
don't include the tck in the libs dir
Modified: build/trunk/dist-tck/porting-package/src/main/assembly/assembly.xml
===================================================================
--- build/trunk/dist-tck/porting-package/src/main/assembly/assembly.xml 2010-02-18 15:35:00 UTC (rev 5884)
+++ build/trunk/dist-tck/porting-package/src/main/assembly/assembly.xml 2010-02-18 18:08:33 UTC (rev 5885)
@@ -19,6 +19,9 @@
<dependencySets>
<dependencySet>
+ <excludes>
+ <exclude>org.jboss.jsr299.tck:*</exclude>
+ </excludes>
<useTransitiveDependencies>true</useTransitiveDependencies>
<outputDirectory>/porting-package-lib</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
14 years, 10 months
Weld SVN: r5884 - servlet/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 10:35:00 -0500 (Thu, 18 Feb 2010)
New Revision: 5884
Modified:
servlet/trunk/
Log:
ignores
Property changes on: servlet/trunk
___________________________________________________________________
Name: svn:ignore
- .settings
local.build.properties
.project
+ .settings
local.build.properties
.project
target
14 years, 10 months
Weld SVN: r5883 - core/trunk/jboss-tck-runner/src/test/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 10:30:06 -0500 (Thu, 18 Feb 2010)
New Revision: 5883
Modified:
core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
Log:
port r5882 to trunk
Modified: core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
===================================================================
--- core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 15:17:12 UTC (rev 5882)
+++ core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 15:30:06 UTC (rev 5883)
@@ -156,7 +156,14 @@
</methods>
</class>
+ <!-- CDKTCK-112 -->
+ <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithConversationScope.SingletonWithConversationScopeTest">
+ <methods>
+ <exclude name="testSingletonWithConversationScopeFails" />
+ </methods>
+ </class>
+
<!-- Issues in Weld (the RI) -->
<!-- WELD-390 fixed, but TCK test is broken in 1.0.1-CR1 -->
14 years, 10 months
Weld SVN: r5882 - core/trunk/jboss-tck-runner/src/test/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 10:17:12 -0500 (Thu, 18 Feb 2010)
New Revision: 5882
Modified:
core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
Log:
Exclude tests
Modified: core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
===================================================================
--- core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 15:14:56 UTC (rev 5881)
+++ core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 15:17:12 UTC (rev 5882)
@@ -149,7 +149,14 @@
</methods>
</class>
+ <!-- CDKTCK-112 -->
+ <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.broken.singletonWithConversationScope.SingletonWithConversationScopeTest">
+ <methods>
+ <exclude name="testSingletonWithConversationScopeFails" />
+ </methods>
+ </class>
+
<!-- Issues in Weld (the RI) -->
<!-- WELD-390 fixed, but TCK test is broken in 1.0.1-CR1 -->
14 years, 10 months
Weld SVN: r5881 - in cdi-tck/branches/1.0/impl/src/main: resources/org/jboss/jsr299/tck/tests/implementation/enterprise and 2 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 10:14:56 -0500 (Thu, 18 Feb 2010)
New Revision: 5881
Added:
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/
cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/ejb-jar.xml
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java
Log:
use ejb 3.1 schema
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java 2010-02-18 15:14:32 UTC (rev 5880)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java 2010-02-18 15:14:56 UTC (rev 5881)
@@ -25,11 +25,13 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.ear.EjbJarXml;
import org.testng.annotations.Test;
@ExpectedDeploymentException(DeploymentFailure.class)
@Artifact
@Packaging(PackagingType.EAR)
+@EjbJarXml("ejb-jar.xml")
@SpecVersion(spec="cdi", version="20091101")
public class SingletonWithConversationScopeTest extends AbstractJSR299Test
{
Added: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/ejb-jar.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/ejb-jar.xml (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/ejb-jar.xml 2010-02-18 15:14:56 UTC (rev 5881)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
+ version="3.1">
+
+</ejb-jar>
Property changes on: cdi-tck/branches/1.0/impl/src/main/resources/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/ejb-jar.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 10 months
Weld SVN: r5880 - in examples/trunk/jsf/pastecode: ejb and 1 other directories.
by weld-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-02-18 10:14:32 -0500 (Thu, 18 Feb 2010)
New Revision: 5880
Modified:
examples/trunk/jsf/pastecode/ear/pom.xml
examples/trunk/jsf/pastecode/ejb/pom.xml
examples/trunk/jsf/pastecode/war/pom.xml
Log:
removed codehaus repository
Modified: examples/trunk/jsf/pastecode/ear/pom.xml
===================================================================
--- examples/trunk/jsf/pastecode/ear/pom.xml 2010-02-18 15:14:09 UTC (rev 5879)
+++ examples/trunk/jsf/pastecode/ear/pom.xml 2010-02-18 15:14:32 UTC (rev 5880)
@@ -13,16 +13,6 @@
<packaging>ear</packaging>
<name>Weld Examples: PasteCode (ear)</name>
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus snapshot repository</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
Modified: examples/trunk/jsf/pastecode/ejb/pom.xml
===================================================================
--- examples/trunk/jsf/pastecode/ejb/pom.xml 2010-02-18 15:14:09 UTC (rev 5879)
+++ examples/trunk/jsf/pastecode/ejb/pom.xml 2010-02-18 15:14:32 UTC (rev 5880)
@@ -13,16 +13,6 @@
<packaging>ejb</packaging>
<name>Weld Examples: PasteCode (ejb)</name>
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus snapshot repository</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
<groupId>org.testng</groupId>
Modified: examples/trunk/jsf/pastecode/war/pom.xml
===================================================================
--- examples/trunk/jsf/pastecode/war/pom.xml 2010-02-18 15:14:09 UTC (rev 5879)
+++ examples/trunk/jsf/pastecode/war/pom.xml 2010-02-18 15:14:32 UTC (rev 5880)
@@ -13,16 +13,6 @@
<packaging>war</packaging>
<name>Weld Examples: PasteCode (war)</name>
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus snapshot repository</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
14 years, 10 months
Weld SVN: r5879 - core/trunk/jboss-tck-runner/src/test/resources.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 10:14:09 -0500 (Thu, 18 Feb 2010)
New Revision: 5879
Modified:
core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
Log:
Exclude broken tests
Modified: core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml
===================================================================
--- core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 13:21:36 UTC (rev 5878)
+++ core/trunk/jboss-tck-runner/src/test/resources/tck-tests.xml 2010-02-18 15:14:09 UTC (rev 5879)
@@ -140,7 +140,16 @@
</methods>
</class>
+ <!-- CDITCK-111 -->
+ <class name="org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.NewEnterpriseBeanICTest">
+ <methods>
+ <exclude name="testNewBeanHasNoDisposalMethods" />
+ <exclude name="testNewBeanHasNoProducerMethods" />
+ <exclude name="testNewBeanHasSameInitializers" />
+ </methods>
+ </class>
+
<!-- Issues in Weld (the RI) -->
<!-- WELD-390 fixed, but TCK test is broken in 1.0.1-CR1 -->
14 years, 10 months
Weld SVN: r5878 - examples/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-02-18 08:21:36 -0500 (Thu, 18 Feb 2010)
New Revision: 5878
Modified:
examples/trunk/pom.xml
Log:
WELD-417
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2010-02-18 13:11:54 UTC (rev 5877)
+++ examples/trunk/pom.xml 2010-02-18 13:21:36 UTC (rev 5878)
@@ -86,7 +86,7 @@
</modules>
<properties>
- <jsf.version>2.0.0-RC</jsf.version>
+ <jsf.version>2.0.2-FCS</jsf.version>
<weld.api.version>1.0-SP1</weld.api.version>
<weld.wicket.version>1.0.1-CR2</weld.wicket.version>
<weld.se.version>1.0.1-CR2</weld.se.version>
14 years, 10 months