Weld SVN: r5119 - build/tags.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 13:38:54 -0500 (Mon, 23 Nov 2009)
New Revision: 5119
Added:
build/tags/weld-parent-7/
Log:
[maven-scm] copy for tag weld-parent-7
Copied: build/tags/weld-parent-7 (from rev 5118, build/trunk/parent)
14 years, 5 months
Weld SVN: r5117 - build/trunk/parent.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 13:33:26 -0500 (Mon, 23 Nov 2009)
New Revision: 5117
Modified:
build/trunk/parent/pom.xml
Log:
add archetype plugin
Modified: build/trunk/parent/pom.xml
===================================================================
--- build/trunk/parent/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
+++ build/trunk/parent/pom.xml 2009-11-23 18:33:26 UTC (rev 5117)
@@ -429,6 +429,12 @@
<serverAuthId>oss.sonatype.org/jboss-staging</serverAuthId>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
</plugins>
</pluginManagement>
</build>
14 years, 5 months
Weld SVN: r5116 - in archetypes/trunk: weld-jsf-minimal and 7 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 13:30:08 -0500 (Mon, 23 Nov 2009)
New Revision: 5116
Modified:
archetypes/trunk/pom.xml
archetypes/trunk/weld-jsf-minimal-jee/pom.xml
archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml
archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/weld-jsf-minimal/pom.xml
archetypes/trunk/weld-jsf-minimal/src/main/resources/META-INF/archetype.xml
archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
Log:
a few updates
Modified: archetypes/trunk/pom.xml
===================================================================
--- archetypes/trunk/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -2,48 +2,56 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>5</version>
+ <version>7-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.weld.archetype</groupId>
+
+ <groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>0.0.1-BETA-SNAPSHOT</version>
- <name>Weld Parent Archetype</name>
- <description>This POM is the future home of configuration common to all archetypes.</description>
- <url>http://sfwk.org/Documentation/WeldArchetypeProposal</url>
- <!-- SCM and distribution management -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/extensions/trunk/archetypes</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/extensions/trunk/archetypes</developerConnection>
- <!-- This is an invalid URL -->
- <!-- <url>http://fisheye.jboss.org/browse/Weld</url>-->
- </scm>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
+
+ <name>Weld Archetypes</name>
+ <description>Aggregator and parent to all Weld Archetypes</description>
+ <url>http://www.seamframework.org/Documentation/WeldQuickstartForMavenUsers</url>
+
+
<developers>
<developer>
<name>Steven Boscarine</name>
<roles>
- <role>Developer</role>
- <role>Volunteer</role>
+ <role>Archetypes lead</role>
</roles>
<email>steven.boscarine(a)childrens.harvard.edu</email>
<organization>Children's Hospital Boston: Informatics Program</organization>
<organizationUrl>http://chip.org/</organizationUrl>
<url>http://info.rmatics.org/</url>
</developer>
+ <developer>
+ <name>Pete Muir</name>
+ <roles>
+ <role>Project lead</role>
+ </roles>
+ <email>pete.muir(a)jboss.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Pete</url>
+ </developer>
</developers>
- <dependencies />
- <properties>
- <!--
- eliminates [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is
- platform dependent!
- -->
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
+
<modules>
<module>weld-jsf-minimal</module>
- <module>weld-jsf-minimal-jee</module>
+ <!-- Exclude the Java EE version for now, it is not ready yet -->
+<!-- <module>weld-jsf-minimal-jee</module>-->
</modules>
+
+ <!-- SCM and distribution management -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/weld/archetypes/trunk</url>
+ </scm>
+
</project>
Modified: archetypes/trunk/weld-jsf-minimal/pom.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -2,15 +2,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
- <groupId>org.jboss.weld.archetype</groupId>
+ <groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>0.0.1-BETA-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>weld-jsf-minimal</artifactId>
- <name>jsf-minimal</name>
- <description>JSF 2.0 and Weld 1.0 on Servlet Containers like Tomcat 6 and Jetty 6</description>
+
+ <groupId>org.jboss.weld.archetypes</groupId>
+ <artifactId>weld-jsf-minimal-servlet</artifactId>
+ <name>Servlet/JSF Archetype for Weld</name>
+ <description>JSF 2.0 and Weld 1.0 on Servlet Containers such as Tomcat 6 and Jetty 6</description>
+
<packaging>maven-archetype</packaging>
+
<build>
<extensions>
<!-- TODO: Explain what I do. -->
@@ -22,14 +28,8 @@
<plugins>
<!-- TODO: Explain what I do. -->
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
- <!--
- Ommitting a version throws this error: [WARNING] Rule 1:
- org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message: Some plugins are missing
- valid versions:(LATEST RELEASE SNAPSHOT are not allowed )
- -->
- <version>2.0-alpha-4</version>
- <extensions>true</extensions>
</plugin>
</plugins>
</build>
Modified: archetypes/trunk/weld-jsf-minimal/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal/src/main/resources/META-INF/archetype.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal/src/main/resources/META-INF/archetype.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>weld-archetype-servlet-quickstart</id>
<resources>
Modified: archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -7,38 +7,47 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
+
<properties>
<!--
eliminates [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is
platform dependent!
-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <!-- The version of Weld extensions in use -->
+ <weld.extensions.version>1.0.0-CR2</weld.extensions.version>
</properties>
+
<dependencyManagement>
<dependencies>
<!-- Import scope will provide versions for dependencies below. -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions-bom</artifactId>
- <version>1.0.0-CR2</version>
+ <version>${weld.extensions.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
+
<dependencies>
+
<!-- Common to JEE and Servlet containers -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
+
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
- <!-- JSF 2.0 -->
+
+ <!-- JSF 2.0 API -->
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
@@ -100,22 +109,25 @@
</exclusion>
</exclusions>
</dependency>
+
<!-- end Jetty/Tomcat-specific scopes and artifacts -->
+
</dependencies>
+
<build>
<finalName>${artifactId}</finalName>
<plugins>
- <!-- Compiler plugin enforces Java 1.6 -->
+ <!-- Compiler plugin enforces Java 1.5 compatibility -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
- <!-- Eclipse plugin enforces download of source and JavaDoc jars -->
+ <!-- Eclipse plugin - download source and JavaDoc jars automatically -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
@@ -125,6 +137,7 @@
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
+
<!-- Embedded Jetty (jetty:run) -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
@@ -138,13 +151,19 @@
</connectors>
<!-- force friendly name instead of artifact name + version -->
<contextPath>${build.finalName}</contextPath>
- <!-- Where the BeanManager is constructed. This is where you'll declare datasources. -->
+ <!-- Where the BeanManager is constructed. This is where you'll declare datasources.
+-->
<jettyEnvXml>\${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
+
<!-- This parameter will auto-deploy modified classes. -->
- <!-- You can save changes in a file or class and refresh your browser to view the changes. -->
+ <!-- You can save changes in a file or class and refresh your browser to view the changes.
+-->
<scanIntervalSeconds>3</scanIntervalSeconds>
</configuration>
</plugin>
+
</plugins>
+
</build>
+
</project>
Modified: archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -3,6 +3,6 @@
<!-- disable storage of sessions across restarts -->
<Manager pathname=""/>
<Resource name="BeanManager" auth="Container" type="javax.enterprise.inject.spi.BeanManager" factory="org.jboss.weld.resources.ManagerObjectFactory"/>
- <!-- Uncomment to enable injection into Servlet -->
+ <!-- Uncomment to enable injection into Servlets, Servlet Listeners and Filters in Tomcat -->
<!-- <Listener className="org.jboss.weld.environment.tomcat.WeldLifecycleListener"/> -->
</Context>
Modified: archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -7,6 +7,6 @@
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
- <!-- Write your navigation rules here. You are encouraged to use CDI for creating @Named managed beans. -->
+ <!-- Write your navigation rules here. You should use CDI for creating @Named managed beans! -->
</faces-config>
Modified: archetypes/trunk/weld-jsf-minimal-jee/pom.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal-jee/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal-jee/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -3,14 +3,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.weld.archetype</groupId>
+ <groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>0.0.1-BETA-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
+
+ <groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-jsf-minimal-jee</artifactId>
- <description>JSF 2.0 and Weld 1.0 on JEE6 containers like JBoss 6.0</description>
- <name>jsf-minimal-jee</name>
+ <description>JSF 2.0 and Weld 1.0 on Jave EE 6 containers like JBoss 6.0</description>
+ <name>Java EE/JSF Archetype for Weld</name>
+
<packaging>maven-archetype</packaging>
+
<build>
<extensions>
<!-- TODO: Explain what I do. -->
@@ -22,15 +27,10 @@
<plugins>
<!-- TODO: Explain what I do. -->
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
- <!--
- Ommitting a version throws this error: [WARNING] Rule 1:
- org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message: Some plugins are missing
- valid versions:(LATEST RELEASE SNAPSHOT are not allowed )
- -->
- <version>2.0-alpha-4</version>
- <extensions>true</extensions>
</plugin>
</plugins>
</build>
+
</project>
Modified: archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<archetype>
<id>weld-archetype-servlet-quickstart</id>
<resources>
Modified: archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
+++ archetypes/trunk/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml 2009-11-23 18:30:08 UTC (rev 5116)
@@ -7,6 +7,7 @@
<packaging>war</packaging>
<name>${artifactId}</name>
<version>${version}</version>
+
<properties>
<!--
eliminates [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is
@@ -16,14 +17,15 @@
<!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file -->
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<jboss.domain>default</jboss.domain>
+ <weld.api.version>1.0</weld.api.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Import scope will provide versions for dependencies below. -->
<dependency>
<groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions-bom</artifactId>
- <version>1.0.0-CR2</version>
+ <artifactId>weld-api-bom</artifactId>
+ <version>${weld.api.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -46,12 +48,12 @@
<artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
- <!-- Provided on JBoss AS, not necessarily Java EE 6 -->
+ <!-- Provided on JBoss AS, not necessarily Java EE 6. Useful to give you extra built in constraints! -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.0.GA</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<!-- JSF 2.0 -->
<dependency>
@@ -77,6 +79,7 @@
<classifier>jdk15</classifier>
</dependency>
+ <!-- Needed on JBoss AS as EL is out of date -->
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
@@ -92,26 +95,28 @@
<build>
<finalName>${artifactId}</finalName>
<plugins>
- <!-- Compiler plugin enforces Java 1.6 -->
+ <!-- Compiler plugin enforces Java 1.5 compatiblity -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
- <!-- Eclipse plugin enforces download of source and JavaDoc jars -->
+ <!-- Eclipse plugin can force download of source and JavaDoc jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
+<!-- <downloadSources>true</downloadSources>-->
+<!-- <downloadJavadocs>true</downloadJavadocs>-->
</configuration>
</plugin>
+
+ <!-- Configure the JBoss Maven deploy plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
14 years, 5 months
Weld SVN: r5115 - archetypes/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 12:24:55 -0500 (Mon, 23 Nov 2009)
New Revision: 5115
Added:
archetypes/trunk/pom.xml
archetypes/trunk/weld-jsf-minimal-jee/
archetypes/trunk/weld-jsf-minimal/
Removed:
archetypes/trunk/archetypes/
Log:
oops
Copied: archetypes/trunk/pom.xml (from rev 5114, archetypes/trunk/archetypes/pom.xml)
===================================================================
--- archetypes/trunk/pom.xml (rev 0)
+++ archetypes/trunk/pom.xml 2009-11-23 17:24:55 UTC (rev 5115)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-parent</artifactId>
+ <version>5</version>
+ </parent>
+ <groupId>org.jboss.weld.archetype</groupId>
+ <artifactId>weld-archetype-parent</artifactId>
+ <version>0.0.1-BETA-SNAPSHOT</version>
+ <name>Weld Parent Archetype</name>
+ <description>This POM is the future home of configuration common to all archetypes.</description>
+ <url>http://sfwk.org/Documentation/WeldArchetypeProposal</url>
+ <!-- SCM and distribution management -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/extensions/trunk/archetypes</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/extensions/trunk/archetypes</developerConnection>
+ <!-- This is an invalid URL -->
+ <!-- <url>http://fisheye.jboss.org/browse/Weld</url>-->
+ </scm>
+ <packaging>pom</packaging>
+ <developers>
+ <developer>
+ <name>Steven Boscarine</name>
+ <roles>
+ <role>Developer</role>
+ <role>Volunteer</role>
+ </roles>
+ <email>steven.boscarine(a)childrens.harvard.edu</email>
+ <organization>Children's Hospital Boston: Informatics Program</organization>
+ <organizationUrl>http://chip.org/</organizationUrl>
+ <url>http://info.rmatics.org/</url>
+ </developer>
+ </developers>
+ <dependencies />
+ <properties>
+ <!--
+ eliminates [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is
+ platform dependent!
+ -->
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <modules>
+ <module>weld-jsf-minimal</module>
+ <module>weld-jsf-minimal-jee</module>
+ </modules>
+</project>
Copied: archetypes/trunk/weld-jsf-minimal (from rev 5114, archetypes/trunk/archetypes/weld-jsf-minimal)
Copied: archetypes/trunk/weld-jsf-minimal-jee (from rev 5114, archetypes/trunk/archetypes/weld-jsf-minimal-jee)
14 years, 5 months
Weld SVN: r5114 - extensions/trunk and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 12:15:30 -0500 (Mon, 23 Nov 2009)
New Revision: 5114
Added:
archetypes/trunk/archetypes/
Removed:
extensions/trunk/archetypes/
Log:
move archetypes
Copied: archetypes/trunk/archetypes (from rev 5113, extensions/trunk/archetypes)
14 years, 5 months
Weld SVN: r5113 - archetypes and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-11-23 12:10:33 -0500 (Mon, 23 Nov 2009)
New Revision: 5113
Added:
archetypes/
archetypes/branches/
archetypes/tags/
archetypes/trunk/
Log:
Add archetypes project
14 years, 5 months
Weld SVN: r5112 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-11-23 09:41:58 -0500 (Mon, 23 Nov 2009)
New Revision: 5112
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java
Log:
CDITCK-75
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java 2009-11-23 08:18:20 UTC (rev 5111)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/DogAgent.java 2009-11-23 14:41:58 UTC (rev 5112)
@@ -3,7 +3,6 @@
import static javax.ejb.TransactionManagementType.BEAN;
import javax.annotation.Resource;
-import javax.annotation.security.RunAs;
import javax.ejb.EJBException;
import javax.ejb.Stateless;
import javax.ejb.TransactionManagement;
@@ -15,7 +14,6 @@
@Stateless
@TransactionManagement(BEAN)
-@RunAs("Bubba")
@Named
@Default
public class DogAgent implements Agent
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java 2009-11-23 08:18:20 UTC (rev 5111)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/transactional/TransactionalObserversTest.java 2009-11-23 14:41:58 UTC (rev 5112)
@@ -50,19 +50,6 @@
dog = (PomeranianInterface) getInstanceByName("Teddy");
}
-// @AfterMethod(alwaysRun = true)
-// public void teardownTest()
-// {
-// try
-// {
-// dog.removeSessionBean();
-// }
-// catch (Exception e)
-// {
-// // Not important since the bean is now gone one way or the other
-// }
-// }
-
@Test(groups = { "events", "integration" })
@SpecAssertion(section = "10.4.4", id = "a")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
@@ -73,8 +60,6 @@
assert dogAgent != null;
dogAgent.sendOutsideTransaction(BigInteger.TEN);
assert dog.isCorrectTransactionState();
- // TODO Fix the security contexts
- // assert dog.isCorrectContext();
}
@Test(groups = { "events", "integration" })
@@ -135,8 +120,6 @@
Agent dogAgent = getInstanceByType(Agent.class);
dogAgent.sendInTransaction(new RuntimeException("test event"));
assert dog.isCorrectTransactionState();
- // TODO Fix the security contexts
- // assert dog.isCorrectContext();
}
@Test(groups = { "events", "integration" })
14 years, 5 months
Weld SVN: r5111 - in core/trunk/impl/src/main: java/org/jboss/weld/injection and 9 other directories.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-11-23 03:18:20 -0500 (Mon, 23 Nov 2009)
New Revision: 5111
Added:
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanManagerMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/MetadataMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ResolutionMessage.java
core/trunk/impl/src/main/resources/org/jboss/weld/messages/beanmanager_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/metadata_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/resolution_en.properties
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/WeldException.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/Exceptions.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/JsfMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ReflectionMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ServletMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java
core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java
core/trunk/impl/src/main/java/org/jboss/weld/resources/ManagerObjectFactory.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java
core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties
core/trunk/impl/src/main/resources/org/jboss/weld/messages/servlet_en.properties
Log:
Additional exception message conversion for localization
Modified: core/trunk/impl/src/main/java/org/jboss/weld/WeldException.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/WeldException.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/WeldException.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -32,6 +32,11 @@
// Exception messages
private static final IMessageConveyor messageConveyer = loggerFactory().getMessageConveyor();
+ public WeldException(Throwable throwable)
+ {
+ super(throwable);
+ }
+
public <E extends Enum<?>> WeldException(E key, Object... args)
{
super(messageConveyer.getMessage(key, args));
Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -17,8 +17,8 @@
package org.jboss.weld.injection;
import static org.jboss.weld.injection.Exceptions.rethrowException;
+import static org.jboss.weld.logging.messages.BeanMessage.PROXY_REQUIRED;
-import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
@@ -37,6 +37,7 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.InvalidObjectException;
import org.jboss.weld.introspector.ConstructorSignature;
import org.jboss.weld.introspector.ForwardingWeldConstructor;
import org.jboss.weld.introspector.WeldClass;
@@ -216,7 +217,7 @@
private void readObject(ObjectInputStream stream) throws InvalidObjectException
{
- throw new InvalidObjectException("Proxy required");
+ throw new InvalidObjectException(PROXY_REQUIRED);
}
private static class SerializationProxy<T> extends WeldInjectionPointSerializationProxy<T, Constructor<T>>
Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/Exceptions.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/Exceptions.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/Exceptions.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -20,6 +20,8 @@
import javax.enterprise.inject.CreationException;
+import org.jboss.weld.WeldException;
+
class Exceptions
{
@@ -38,11 +40,11 @@
}
catch (InstantiationException e1)
{
- throw new RuntimeException(e1);
+ throw new WeldException(e1);
}
catch (IllegalAccessException e1)
{
- throw new RuntimeException(e1);
+ throw new WeldException(e1);
}
e.initCause(t);
throw e;
Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -17,8 +17,8 @@
package org.jboss.weld.injection;
import static org.jboss.weld.injection.Exceptions.rethrowException;
+import static org.jboss.weld.logging.messages.BeanMessage.PROXY_REQUIRED;
-import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
@@ -37,6 +37,7 @@
import org.jboss.interceptor.util.InterceptionUtils;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.InvalidObjectException;
import org.jboss.weld.introspector.ForwardingWeldField;
import org.jboss.weld.introspector.WeldField;
@@ -148,7 +149,7 @@
private void readObject(ObjectInputStream stream) throws InvalidObjectException
{
- throw new InvalidObjectException("Proxy required");
+ throw new InvalidObjectException(PROXY_REQUIRED);
}
private static class SerializationProxy<T> extends WeldInjectionPointSerializationProxy<T, Field>
Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -17,8 +17,8 @@
package org.jboss.weld.injection;
import static org.jboss.weld.injection.Exceptions.rethrowException;
+import static org.jboss.weld.logging.messages.BeanMessage.PROXY_REQUIRED;
-import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectStreamException;
import java.lang.annotation.Annotation;
@@ -36,6 +36,7 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.InvalidObjectException;
import org.jboss.weld.introspector.ForwardingWeldMethod;
import org.jboss.weld.introspector.MethodSignature;
import org.jboss.weld.introspector.WeldMethod;
@@ -307,7 +308,7 @@
private void readObject(ObjectInputStream stream) throws InvalidObjectException
{
- throw new InvalidObjectException("Proxy required");
+ throw new InvalidObjectException(PROXY_REQUIRED);
}
private static class SerializationProxy<T> extends WeldInjectionPointSerializationProxy<T, Method>
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -17,6 +17,8 @@
package org.jboss.weld.introspector;
import static org.jboss.weld.introspector.WeldAnnotated.MAPPED_METAANNOTATIONS;
+import static org.jboss.weld.logging.messages.ReflectionMessage.ANNOTATION_MAP_NULL;
+import static org.jboss.weld.logging.messages.ReflectionMessage.DECLARED_ANNOTATION_MAP_NULL;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
@@ -30,7 +32,9 @@
import javax.inject.Qualifier;
+import org.jboss.weld.WeldException;
import org.jboss.weld.literal.DefaultLiteral;
+import org.jboss.weld.logging.messages.ReflectionMessage;
import org.jboss.weld.metadata.TypeStore;
import com.google.common.base.Supplier;
@@ -155,7 +159,7 @@
{
if (annotationMap == null)
{
- throw new NullPointerException("annotationMap cannot be null");
+ throw new WeldException(ANNOTATION_MAP_NULL);
}
this.annotationMap = annotationMap;
this.annotationSet = new HashSet<Annotation>();
@@ -176,7 +180,7 @@
if (declaredAnnotationMap == null)
{
- throw new NullPointerException("declaredAnnotationMap cannot be null");
+ throw new WeldException(DECLARED_ANNOTATION_MAP_NULL);
}
this.declaredAnnotationMap = declaredAnnotationMap;
this.declaredAnnotationSet = new HashSet<Annotation>();
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,12 +16,15 @@
*/
package org.jboss.weld.introspector.jlr;
+import static org.jboss.weld.logging.messages.ReflectionMessage.UNABLE_TO_GET_PARAMETER_NAME;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Set;
import javax.enterprise.inject.spi.AnnotatedCallable;
+import org.jboss.weld.ForbiddenArgumentException;
import org.jboss.weld.introspector.AnnotationStore;
import org.jboss.weld.introspector.WeldCallable;
import org.jboss.weld.introspector.WeldParameter;
@@ -133,7 +136,7 @@
*/
public String getName()
{
- throw new IllegalArgumentException("Unable to determine name of parameter");
+ throw new ForbiddenArgumentException(UNABLE_TO_GET_PARAMETER_NAME);
}
/**
Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -19,6 +19,7 @@
import static org.jboss.weld.logging.Category.JSF;
import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
import static org.jboss.weld.logging.messages.JsfMessage.FOUND_CONVERSATION_FROM_REQUEST;
+import static org.jboss.weld.logging.messages.JsfMessage.IMPROPER_ENVIRONMENT;
import static org.jboss.weld.logging.messages.JsfMessage.RESUMING_CONVERSATION;
import javax.enterprise.util.AnnotationLiteral;
@@ -28,6 +29,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.Container;
+import org.jboss.weld.ForbiddenStateException;
import org.jboss.weld.conversation.ConversationIdName;
import org.jboss.weld.servlet.ServletHelper;
import org.jboss.weld.util.Reflections;
@@ -116,7 +118,7 @@
}
else
{
- throw new IllegalStateException("Weld doesn not support using JSF in an non-servlet environment");
+ throw new ForbiddenStateException(IMPROPER_ENVIRONMENT);
}
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanManagerMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanManagerMessage.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanManagerMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, 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.weld.logging.messages;
+
+import org.jboss.weld.logging.MessageId;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.beanmanager")
+@LocaleData({
+ @Locale("en")
+})
+/**
+ * Log messages for bean manager and related support classes.
+ *
+ * Message IDs: 001300 - 001399
+ *
+ * @author David Allen
+ *
+ */
+public enum BeanManagerMessage
+{
+ @MessageId("001300") CANNOT_LOCATE_BEAN_MANAGER
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanManagerMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/JsfMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/JsfMessage.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/JsfMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -22,6 +22,7 @@
@MessageId("000501") SKIPPING_CLEANING_UP_CONVERSATION,
@MessageId("000502") INITIATING_CONVERSATION,
@MessageId("000503") FOUND_CONVERSATION_FROM_REQUEST,
- @MessageId("000504") RESUMING_CONVERSATION;
+ @MessageId("000504") RESUMING_CONVERSATION,
+ @MessageId("000505") IMPROPER_ENVIRONMENT;
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/MetadataMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/MetadataMessage.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/MetadataMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, 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.weld.logging.messages;
+
+import org.jboss.weld.logging.MessageId;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.metadata")
+@LocaleData({
+ @Locale("en")
+})
+/**
+ * Log messages for Meta Data.
+ *
+ * Message IDs: 001100 - 001199
+ *
+ * @author David Allen
+ *
+ */
+public enum MetadataMessage
+{
+ @MessageId("001100") META_ANNOTATION_ON_WRONG_TYPE,
+ @MessageId("001101") NON_BINDING_MEMBER_TYPE,
+ @MessageId("001102") STEREOTYPE_NOT_REGISTERED,
+ @MessageId("001103") QUALIFIER_ON_STEREOTYPE,
+ @MessageId("001104") VALUE_ON_NAMED_STEREOTYPE,
+ @MessageId("001105") MULTIPLE_SCOPES;
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/MetadataMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ReflectionMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ReflectionMessage.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ReflectionMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -24,6 +24,9 @@
@MessageId("000602") MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE,
@MessageId("000603") TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE,
@MessageId("000604") MISSING_TARGET_METHOD_FIELD_TYPE,
- @MessageId("000605") MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD;
+ @MessageId("000605") MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD,
+ @MessageId("000606") UNABLE_TO_GET_PARAMETER_NAME,
+ @MessageId("000607") ANNOTATION_MAP_NULL,
+ @MessageId("000608") DECLARED_ANNOTATION_MAP_NULL;
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ResolutionMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ResolutionMessage.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ResolutionMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat, Inc. and/or its affiliates, 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.weld.logging.messages;
+
+import org.jboss.weld.logging.MessageId;
+
+import ch.qos.cal10n.BaseName;
+import ch.qos.cal10n.Locale;
+import ch.qos.cal10n.LocaleData;
+
+@BaseName("org.jboss.weld.messages.resolution")
+@LocaleData({
+ @Locale("en")
+})
+/**
+ * Log messages for resolution classes.
+ *
+ * Message IDs: 001200 - 001299
+ *
+ * @author David Allen
+ *
+ */
+public enum ResolutionMessage
+{
+ @MessageId("001200") INVALID_MEMBER_TYPE,
+ @MessageId("001201") CANNOT_EXTRACT_RAW_TYPE,
+ @MessageId("001202") CANNOT_EXTRACT_TYPE_INFORMATION;
+}
Property changes on: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ResolutionMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ServletMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ServletMessage.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/ServletMessage.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -18,6 +18,13 @@
public enum ServletMessage
{
- @MessageId("000700") NOT_STARTING;
+ @MessageId("000700") NOT_STARTING,
+ @MessageId("000701") CONTEXT_NULL,
+ @MessageId("000702") BEAN_MANAGER_NOT_FOUND,
+ @MessageId("000703") REQUEST_SCOPE_BEAN_STORE_MISSING,
+ @MessageId("000704") BEAN_DEPLOYMENT_ARCHIVE_MISSING,
+ @MessageId("000705") BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND,
+ @MessageId("000706") ILLEGAL_USE_OF_WELD_LISTENER,
+ @MessageId("000707") ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -27,6 +27,7 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.introspector.WeldAnnotation;
+import org.jboss.weld.logging.messages.MetadataMessage;
import org.jboss.weld.resources.ClassTransformer;
import org.slf4j.cal10n.LocLogger;
@@ -71,7 +72,7 @@
{
if (!Annotation.class.isAssignableFrom(getRawType()))
{
- throw new DefinitionException(getMetaAnnotationTypes().toString() + " can only be applied to an annotation, it was applied to " + getRawType());
+ throw new DefinitionException(MetadataMessage.META_ANNOTATION_ON_WRONG_TYPE, getMetaAnnotationTypes(), getRawType());
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,6 +16,8 @@
*/
package org.jboss.weld.metadata.cache;
+import static org.jboss.weld.logging.messages.MetadataMessage.NON_BINDING_MEMBER_TYPE;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.util.Set;
@@ -24,6 +26,7 @@
import javax.inject.Qualifier;
import org.jboss.weld.DefinitionException;
+import org.jboss.weld.WeldException;
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Reflections;
@@ -76,7 +79,7 @@
{
if ((Reflections.isArrayType(annotatedMethod.getJavaClass()) || Annotation.class.isAssignableFrom(annotatedMethod.getJavaClass())) && !nonBindingTypes.contains(annotatedMethod))
{
- throw new DefinitionException("Member of array type or annotation type must be annotated @NonBinding " + annotatedMethod);
+ throw new DefinitionException(NON_BINDING_MEMBER_TYPE, annotatedMethod);
}
}
@@ -148,15 +151,15 @@
}
catch (IllegalArgumentException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
catch (IllegalAccessException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
catch (InvocationTargetException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -19,6 +19,7 @@
import static org.jboss.weld.logging.Category.REFLECTION;
import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import static org.jboss.weld.logging.messages.MetadataMessage.NON_BINDING_MEMBER_TYPE;
import static org.jboss.weld.logging.messages.ReflectionMessage.MISSING_TARGET;
import static org.jboss.weld.logging.messages.ReflectionMessage.MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE;
import static org.jboss.weld.logging.messages.ReflectionMessage.TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE;
@@ -33,6 +34,7 @@
import javax.interceptor.InterceptorBinding;
import org.jboss.weld.DefinitionException;
+import org.jboss.weld.WeldException;
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.Reflections;
@@ -127,7 +129,7 @@
{
if ((Reflections.isArrayType(annotatedMethod.getJavaClass()) || Annotation.class.isAssignableFrom(annotatedMethod.getJavaClass())) && !nonBindingTypes.contains(annotatedMethod))
{
- throw new DefinitionException("Member of array type or annotation type must be annotated @NonBinding " + annotatedMethod);
+ throw new DefinitionException(NON_BINDING_MEMBER_TYPE, annotatedMethod);
}
}
}
@@ -161,15 +163,15 @@
}
catch (IllegalArgumentException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
catch (IllegalAccessException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
catch (InvocationTargetException e)
{
- throw new RuntimeException(e);
+ throw new WeldException(e);
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,11 +16,14 @@
*/
package org.jboss.weld.metadata.cache;
+import static org.jboss.weld.logging.messages.MetadataMessage.STEREOTYPE_NOT_REGISTERED;
+
import java.lang.annotation.Annotation;
import java.util.HashSet;
import java.util.Set;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.ForbiddenStateException;
/**
* Meta model for the merged stereotype for a bean
@@ -66,7 +69,7 @@
StereotypeModel<?> stereotype = manager.getServices().get(MetaAnnotationStore.class).getStereotype(stereotypeAnnotation.annotationType());
if (stereotype == null)
{
- throw new IllegalStateException("Stereotype " + stereotypeAnnotation + " not registered with container");
+ throw new ForbiddenStateException(STEREOTYPE_NOT_REGISTERED, stereotypeAnnotation);
}
if (stereotype.isPolicy())
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/StereotypeModel.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -21,6 +21,9 @@
import static java.lang.annotation.ElementType.TYPE;
import static org.jboss.weld.logging.Category.REFLECTION;
import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import static org.jboss.weld.logging.messages.MetadataMessage.MULTIPLE_SCOPES;
+import static org.jboss.weld.logging.messages.MetadataMessage.QUALIFIER_ON_STEREOTYPE;
+import static org.jboss.weld.logging.messages.MetadataMessage.VALUE_ON_NAMED_STEREOTYPE;
import static org.jboss.weld.logging.messages.ReflectionMessage.MISSING_TARGET;
import static org.jboss.weld.logging.messages.ReflectionMessage.MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD;
@@ -96,7 +99,7 @@
{
if (!annotation.annotationType().equals(Named.class))
{
- throw new DefinitionException("Cannot declare binding types on a stereotype " + getAnnotatedAnnotation());
+ throw new DefinitionException(QUALIFIER_ON_STEREOTYPE, getAnnotatedAnnotation());
}
}
}
@@ -124,7 +127,7 @@
{
if (!"".equals(getAnnotatedAnnotation().getAnnotation(Named.class).value()))
{
- throw new DefinitionException("Cannot specify a value for a @Named stereotype " + getAnnotatedAnnotation());
+ throw new DefinitionException(VALUE_ON_NAMED_STEREOTYPE, getAnnotatedAnnotation());
}
beanNameDefaulted = true;
}
@@ -140,7 +143,7 @@
scopeTypes.addAll(getAnnotatedAnnotation().getMetaAnnotations(NormalScope.class));
if (scopeTypes.size() > 1)
{
- throw new DefinitionException("At most one scope type may be specified for " + getAnnotatedAnnotation());
+ throw new DefinitionException(MULTIPLE_SCOPES, getAnnotatedAnnotation());
}
else if (scopeTypes.size() == 1)
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,6 +16,10 @@
*/
package org.jboss.weld.resolution;
+import static org.jboss.weld.logging.messages.ResolutionMessage.CANNOT_EXTRACT_RAW_TYPE;
+import static org.jboss.weld.logging.messages.ResolutionMessage.CANNOT_EXTRACT_TYPE_INFORMATION;
+import static org.jboss.weld.logging.messages.ResolutionMessage.INVALID_MEMBER_TYPE;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
@@ -31,6 +35,8 @@
import javax.enterprise.util.TypeLiteral;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.ForbiddenArgumentException;
+import org.jboss.weld.InvalidOperationException;
import org.jboss.weld.bean.AbstractClassBean;
import org.jboss.weld.injection.WeldInjectionPoint;
import org.jboss.weld.introspector.AnnotationStore;
@@ -90,7 +96,7 @@
}
else
{
- throw new IllegalStateException();
+ throw new ForbiddenArgumentException(INVALID_MEMBER_TYPE, member);
}
}
@@ -109,7 +115,7 @@
}
else
{
- throw new IllegalArgumentException("Cannot extract rawType from " + type);
+ throw new ForbiddenArgumentException(CANNOT_EXTRACT_RAW_TYPE, type);
}
this.actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
this._string = rawType.toString() + "<" + Arrays.asList(actualTypeArguments).toString() + ">; binding types = " + Names.annotationsToString(annotationStore.getBindings());
@@ -122,7 +128,7 @@
}
else
{
- throw new IllegalArgumentException("Unable to extract type information from " + type);
+ throw new ForbiddenArgumentException(CANNOT_EXTRACT_TYPE_INFORMATION, type);
}
this.typeClosure = new HashSet<Type>();
typeClosure.add(type);
@@ -158,7 +164,7 @@
public String getName()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
@Override
@@ -169,38 +175,38 @@
public boolean isFinal()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
public boolean isPublic()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
public boolean isPrivate()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
public boolean isPackagePrivate()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
public Package getPackage()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
public boolean isStatic()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
@Override
public boolean isProxyable()
{
- throw new UnsupportedOperationException();
+ throw new InvalidOperationException();
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/resources/ManagerObjectFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/resources/ManagerObjectFactory.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/resources/ManagerObjectFactory.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,6 +16,9 @@
*/
package org.jboss.weld.resources;
+import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import static org.jboss.weld.logging.messages.BeanManagerMessage.CANNOT_LOCATE_BEAN_MANAGER;
+
import java.util.Hashtable;
import java.util.Map.Entry;
@@ -28,9 +31,13 @@
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import ch.qos.cal10n.IMessageConveyor;
+
public class ManagerObjectFactory implements ObjectFactory
{
-
+ // Exception messages
+ private static final IMessageConveyor messageConveyer = loggerFactory().getMessageConveyor();
+
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception
{
for (Entry<BeanDeploymentArchive, BeanManagerImpl> entry : Container.instance().beanDeploymentArchives().entrySet())
@@ -40,7 +47,7 @@
return entry.getValue().getCurrent();
}
}
- throw new NamingException("Unable to locate BeanManager");
+ throw new NamingException(messageConveyer.getMessage(CANNOT_LOCATE_BEAN_MANAGER));
}
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletHelper.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -16,10 +16,14 @@
*/
package org.jboss.weld.servlet;
+import static org.jboss.weld.logging.messages.ServletMessage.BEAN_MANAGER_NOT_FOUND;
+import static org.jboss.weld.logging.messages.ServletMessage.CONTEXT_NULL;
+
import javax.enterprise.inject.spi.BeanManager;
import javax.servlet.ServletContext;
import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.ForbiddenArgumentException;
/**
* @author pmuir
@@ -32,12 +36,12 @@
{
if (ctx == null)
{
- throw new IllegalArgumentException("ServletContext is null");
+ throw new ForbiddenArgumentException(CONTEXT_NULL);
}
BeanManagerImpl beanManagerImpl = (BeanManagerImpl) ctx.getAttribute(BeanManager.class.getName());
if (beanManagerImpl == null)
{
- throw new IllegalArgumentException("Unable to find BeanManager. ServletContext: " + ctx);
+ throw new ForbiddenArgumentException(BEAN_MANAGER_NOT_FOUND, ctx);
}
else
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -22,11 +22,13 @@
*/
package org.jboss.weld.servlet;
+import static org.jboss.weld.logging.messages.ServletMessage.REQUEST_SCOPE_BEAN_STORE_MISSING;
import static org.jboss.weld.servlet.ServletHelper.getModuleBeanManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import org.jboss.weld.ForbiddenStateException;
import org.jboss.weld.context.ContextLifecycle;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
@@ -152,7 +154,7 @@
BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
if (beanStore == null)
{
- throw new IllegalStateException("Cannot obtain request scoped beans from the request");
+ throw new ForbiddenStateException(REQUEST_SCOPE_BEAN_STORE_MISSING);
}
lifecycle.endRequest(request.getRequestURI(), beanStore);
request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java 2009-11-23 08:18:20 UTC (rev 5111)
@@ -24,7 +24,11 @@
import static org.jboss.weld.logging.Category.SERVLET;
import static org.jboss.weld.logging.LoggerFactory.loggerFactory;
+import static org.jboss.weld.logging.messages.ServletMessage.BEAN_DEPLOYMENT_ARCHIVE_MISSING;
+import static org.jboss.weld.logging.messages.ServletMessage.BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND;
+import static org.jboss.weld.logging.messages.ServletMessage.ILLEGAL_USE_OF_WELD_LISTENER;
import static org.jboss.weld.logging.messages.ServletMessage.NOT_STARTING;
+import static org.jboss.weld.logging.messages.ServletMessage.ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED;
import javax.enterprise.inject.spi.BeanManager;
import javax.servlet.ServletContext;
@@ -35,6 +39,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.Container;
+import org.jboss.weld.ForbiddenStateException;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.context.ContextLifecycle;
import org.jboss.weld.servlet.api.ServletServices;
@@ -72,12 +77,12 @@
BeanDeploymentArchive war = Container.instance().deploymentServices().get(ServletServices.class).getBeanDeploymentArchive(ctx);
if (war == null)
{
- throw new IllegalStateException("Unable to locate BeanDeploymentArchive. ServletContext: " + ctx);
+ throw new ForbiddenStateException(BEAN_DEPLOYMENT_ARCHIVE_MISSING, ctx);
}
BeanManagerImpl beanManager = Container.instance().beanDeploymentArchives().get(war);
if (beanManager == null)
{
- throw new IllegalStateException("Unable to locate BeanManager. ServletContext: " + ctx + "; BeanDeploymentArchive: " + war);
+ throw new ForbiddenStateException(BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND, ctx, war);
}
return beanManager;
}
@@ -93,7 +98,7 @@
}
if (!Container.instance().deploymentServices().contains(ServletServices.class))
{
- throw new IllegalStateException("Cannot use WeldListener without ServletServices");
+ throw new ForbiddenStateException(ILLEGAL_USE_OF_WELD_LISTENER);
}
sce.getServletContext().setAttribute(BeanManager.class.getName(), getBeanManager(sce.getServletContext()));
}
@@ -152,7 +157,7 @@
}
else
{
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ throw new ForbiddenStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
}
}
}
@@ -174,7 +179,7 @@
}
else
{
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ throw new ForbiddenStateException(ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED);
}
}
}
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/beanmanager_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/beanmanager_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/beanmanager_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1 @@
+CANNOT_LOCATE_BEAN_MANAGER=Unable to locate BeanManager
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/beanmanager_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/jsf_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -2,4 +2,5 @@
SKIPPING_CLEANING_UP_CONVERSATION=Skipping conversation cleanup after the {0} phase because {1}
INITIATING_CONVERSATION=Initiating conversation before the {0} phase
FOUND_CONVERSATION_FROM_REQUEST=Found conversation id {0} in request parameter
-RESUMING_CONVERSATION=Resuming conversation with id {0}
\ No newline at end of file
+RESUMING_CONVERSATION=Resuming conversation with id {0}
+IMPROPER_ENVIRONMENT=Weld does not support using JSF in a non-servlet environment
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/metadata_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/metadata_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/metadata_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1,6 @@
+META_ANNOTATION_ON_WRONG_TYPE={0} can only be applied to an annotation. It was applied to {1}
+NON_BINDING_MEMBER_TYPE=Member of array type or annotation type must be annotated @NonBinding\: {0}
+STEREOTYPE_NOT_REGISTERED=Stereotype {0} not registered with container
+QUALIFIER_ON_STEREOTYPE=Cannot declare qualifiers on stereotype {0}
+VALUE_ON_NAMED_STEREOTYPE=Cannot specify a value for @Named stereotype {0}
+MULTIPLE_SCOPES=At most one scope type may be specified for {0}
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/metadata_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/reflection_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -3,4 +3,7 @@
MISSING_TARGET_TYPE_METHOD_OR_TARGET_TYPE={0} is not declared @Target(TYPE, METHOD) or @Target(TYPE)
TARGET_TYPE_METHOD_INHERITS_FROM_TARGET_TYPE={0} is declared @Target(TYPE, METHOD), but inherits {1}, which is declared @Target(TYPE)
MISSING_TARGET_METHOD_FIELD_TYPE={0} is not declared @Target(METHOD, FIELD, TYPE)
-MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD={0} is not declared @Target(METHOD, FIELD, TYPE, PARAMETER), @Target(METHOD, TYPE), @Target(METHOD), @Target(TYPE) or @Target(FIELD)
\ No newline at end of file
+MISSING_TARGET_METHOD_FIELD_TYPE_PARAMETER_OR_TARGET_METHOD_TYPE_OR_TARGET_METHOD_OR_TARGET_TYPE_OR_TARGET_FIELD={0} is not declared @Target(METHOD, FIELD, TYPE, PARAMETER), @Target(METHOD, TYPE), @Target(METHOD), @Target(TYPE) or @Target(FIELD)
+UNABLE_TO_GET_PARAMETER_NAME=Unable to determine name of parameter
+ANNOTATION_MAP_NULL=annotationMap cannot be null
+DECLARED_ANNOTATION_MAP_NULL=declaredAnnotationMap cannot be null
Added: core/trunk/impl/src/main/resources/org/jboss/weld/messages/resolution_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/resolution_en.properties (rev 0)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/resolution_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -0,0 +1,3 @@
+INVALID_MEMBER_TYPE=Invalid member type {0}
+CANNOT_EXTRACT_RAW_TYPE=Cannot extract rawType from {0}
+CANNOT_EXTRACT_TYPE_INFORMATION=Unable to extract type information from {0}
Property changes on: core/trunk/impl/src/main/resources/org/jboss/weld/messages/resolution_en.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/servlet_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/servlet_en.properties 2009-11-22 23:48:19 UTC (rev 5110)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/servlet_en.properties 2009-11-23 08:18:20 UTC (rev 5111)
@@ -1 +1,8 @@
-NOT_STARTING=Not starting Weld/Servlet integration as Weld failed to initialize
\ No newline at end of file
+NOT_STARTING=Not starting Weld/Servlet integration as Weld failed to initialize
+CONTEXT_NULL=ServletContext is null
+BEAN_MANAGER_NOT_FOUND=Unable to find BeanManager for {0}
+REQUEST_SCOPE_BEAN_STORE_MISSING=Cannot obtain request scoped beans from the request
+BEAN_DEPLOYMENT_ARCHIVE_MISSING=Unable to locate bean deployment archive for {0}
+BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND=Unable to locate bean manager for {0} in {1}
+ILLEGAL_USE_OF_WELD_LISTENER=Cannot use WeldListener without ServletServices
+ONLY_HTTP_SERVLET_LIFECYCLE_DEFINED=Non Http-Servlet lifecycle not defined
14 years, 5 months
Weld SVN: r5110 - in core/trunk: impl/src/main/java/org/jboss/weld/bean/proxy and 10 other directories.
by weld-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2009-11-22 18:48:19 -0500 (Sun, 22 Nov 2009)
New Revision: 5110
Added:
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/AbstractDecoratorMethodHandler.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Frame.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/SimpleAbstractDecoratorWithInvalidAbstractMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Window.java
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-simple.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethod.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethodAndInitializerMethod.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withCallToItself.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withConstructor.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withInitializerMethod.xml
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/broken/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/broken/beans-withInvalidAbstractMethod.xml
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
Log:
WELD-296,WELD-298: add support for abstract decorators
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2009-11-22 15:57:32 UTC (rev 5109)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -23,29 +23,47 @@
import static org.jboss.weld.logging.messages.BeanMessage.NO_DELEGATE_FOR_DECORATOR;
import static org.jboss.weld.logging.messages.BeanMessage.TOO_MANY_DELEGATES_FOR_DECORATOR;
import static org.jboss.weld.logging.messages.BeanMessage.UNABLE_TO_PROCESS;
+import static org.jboss.weld.logging.messages.BeanMessage.ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.Decorator;
+import javax.inject.Inject;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import javax.enterprise.inject.spi.Decorator;
-import javax.inject.Inject;
-
+import javassist.util.proxy.ProxyObject;
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.DefinitionException;
import org.jboss.weld.ForbiddenStateException;
+import org.jboss.weld.bean.proxy.AbstractDecoratorMethodHandler;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.injection.MethodInjectionPoint;
+import org.jboss.weld.injection.ProxyClassConstructorInjectionPointWrapper;
import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.MethodSignature;
import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldConstructor;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
+import org.jboss.weld.introspector.jlr.WeldConstructorImpl;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Proxies;
+import org.jboss.weld.util.Reflections;
public class DecoratorImpl<T> extends ManagedBean<T> implements Decorator<T>
{
+ private WeldClass<?> annotatedDelegateItem;
+ private WeldClass<T> proxyClassForAbstractDecorators;
+ private WeldConstructor<T> constructorForAbstractDecorator;
+
public static <T> Decorator<T> wrap(final Decorator<T> decorator)
{
return new ForwardingDecorator<T>()
@@ -107,6 +125,7 @@
initDelegateBindings();
initDelegateType();
checkDelegateType();
+ checkAbstractMethods();
}
}
@@ -189,8 +208,28 @@
}
}
+ annotatedDelegateItem = WeldClassImpl.of(delegateInjectionPoint.getJavaClass(), manager.getServices().get(ClassTransformer.class));
}
+ private void checkAbstractMethods()
+ {
+ if (getAnnotatedItem().isAbstract())
+ {
+ for(WeldMethod<?,?> method: getAnnotatedItem().getWeldMethods())
+ {
+ if (Reflections.isAbstract(((AnnotatedMethod) method).getJavaMember()))
+ {
+ MethodSignature methodSignature = method.getSignature();
+ if (this.annotatedDelegateItem.getWeldMethod(methodSignature) == null)
+ {
+ throw new DefinitionException(ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE, method.getSignature(), this, getAnnotatedItem().getName());
+ }
+ }
+ }
+ }
+ }
+
+
public Set<Annotation> getDelegateQualifiers()
{
return delegateBindings;
@@ -210,14 +249,56 @@
{
return delegateInjectionPoint;
}
-
+
@Override
+ protected void initType()
+ {
+ super.initType();
+ if (getAnnotatedItem().isAbstract())
+ {
+ Proxies.TypeInfo typeInfo = Proxies.TypeInfo.of(Collections.singleton(getAnnotatedItem().getJavaClass()));
+ Class<T> clazz = Proxies.createProxyClass(null, typeInfo);
+ proxyClassForAbstractDecorators = manager.getServices().get(ClassTransformer.class).loadClass(clazz);
+ }
+ }
+
+ @Override
+ protected void initConstructor()
+ {
+ super.initConstructor();
+ if (getAnnotatedItem().isAbstract())
+ {
+ constructorForAbstractDecorator = WeldConstructorImpl.of(
+ proxyClassForAbstractDecorators.getDeclaredWeldConstructor(getConstructor().getSignature()),
+ proxyClassForAbstractDecorators,
+ manager.getServices().get(ClassTransformer.class));
+ }
+ }
+
+ @Override
public void initDecorators()
{
// No-op, decorators can't have decorators
}
-
+
@Override
+ protected T createInstance(CreationalContext<T> ctx)
+ {
+ if (!getAnnotatedItem().isAbstract())
+ {
+ return super.createInstance(ctx);
+ }
+ else
+ {
+ ProxyClassConstructorInjectionPointWrapper<T> constructorInjectionPointWrapper = new ProxyClassConstructorInjectionPointWrapper(this, constructorForAbstractDecorator, getConstructor());
+ T instance = constructorInjectionPointWrapper.newInstance(manager, ctx);
+ AbstractDecoratorMethodHandler abstractDecoratorMethodHandler = new AbstractDecoratorMethodHandler(annotatedDelegateItem, getDelegateInjectionPoint(), constructorInjectionPointWrapper.getInjectedDelegate());
+ ((ProxyObject)instance).setHandler(abstractDecoratorMethodHandler);
+ return instance;
+ }
+ }
+
+ @Override
public String getDescription()
{
// TODO Auto-generated method stub
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-11-22 15:57:32 UTC (rev 5109)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -58,10 +58,8 @@
import org.jboss.weld.injection.InjectionContextImpl;
import org.jboss.weld.injection.WeldInjectionPoint;
import org.jboss.weld.introspector.WeldClass;
-import org.jboss.weld.introspector.WeldConstructor;
import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.introspector.WeldMethod;
-import org.jboss.weld.logging.messages.BeanMessage;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.serialization.spi.helpers.SerializableContextual;
import org.jboss.weld.util.Beans;
@@ -244,7 +242,7 @@
public T produce(CreationalContext<T> ctx)
{
- T instance = constructor.newInstance(manager, ctx);
+ T instance = ManagedBean.this.createInstance(ctx);
if (!hasDecorators())
{
// This should be safe, but needs verification PLM
@@ -270,6 +268,11 @@
}
}
+ protected T createInstance(CreationalContext<T> ctx)
+ {
+ return constructor.newInstance(manager, ctx);
+ }
+
@Override
public void initializeAfterBeanDiscovery()
{
@@ -456,7 +459,7 @@
*
* @return The constructor
*/
- public WeldConstructor<T> getConstructor()
+ public ConstructorInjectionPoint<T> getConstructor()
{
return constructor;
}
Added: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/AbstractDecoratorMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/AbstractDecoratorMethodHandler.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/AbstractDecoratorMethodHandler.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.bean.proxy;
+
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.InjectionPoint;
+import java.lang.reflect.Method;
+
+import javassist.util.proxy.MethodHandler;
+import org.jboss.weld.injection.FieldInjectionPoint;
+import org.jboss.weld.injection.ParameterInjectionPoint;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
+import org.jboss.weld.util.Reflections;
+
+/**
+ * {@link MethodHandler} for Abstract decorators.
+ *
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+public class AbstractDecoratorMethodHandler implements MethodHandler
+{
+
+ private WeldClass<?> delegateClass;
+
+ private InjectionPoint injectionPoint;
+
+ private Object delegate;
+
+ public AbstractDecoratorMethodHandler(WeldClass<?> delegateClass, InjectionPoint injectionPoint, Object injectedDelegate)
+ {
+ this.delegateClass = delegateClass;
+ this.injectionPoint = injectionPoint;
+ this.delegate = injectedDelegate;
+ }
+
+ public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable
+ {
+ // intercept injection of delegate if not set already
+ // assumes that injection happens on a single thread
+ // TODO: replace this way of initializing field-injected delegates (move out) - MBG
+ if (delegate == null)
+ {
+ if (injectionPoint instanceof FieldInjectionPoint)
+ {
+ this.delegate = ((FieldInjectionPoint) injectionPoint).get(self);
+ }
+ else
+ if (injectionPoint.getMember() instanceof Method && injectionPoint instanceof ParameterInjectionPoint<?, ?>)
+ {
+ if (thisMethod.equals(injectionPoint.getMember()))
+ {
+ int position = ((ParameterInjectionPoint<?, ?>) injectionPoint).getPosition();
+ delegate = args[position];
+ }
+ }
+ }
+ // if method is abstract, invoke the corresponding method on the delegate
+ if (Reflections.isAbstract(thisMethod))
+ {
+ Method method = ((AnnotatedMethod<?>) delegateClass.getWeldMethod(new MethodSignatureImpl(thisMethod))).getJavaMember();
+ return method.invoke(delegate, args);
+ }
+
+ return proceed.invoke(self, args);
+
+ }
+}
Added: core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java (rev 0)
+++ core/trunk/impl/src/main/java/org/jboss/weld/injection/ProxyClassConstructorInjectionPointWrapper.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.injection;
+
+import javax.decorator.Decorator;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.introspector.WeldConstructor;
+
+/**
+ * A wrapper on a {@link ConstructorInjectionPoint}, to be used if a proxy subclass is instantiated instead of the
+ * original (e.g. because the original is an abstract {@link Decorator})
+ *
+ * This is a wrapper class, it is not thread-safe and any instance of this class should be used only for temporarily
+ * enhancing the bean instance creation process.
+ *
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+public class ProxyClassConstructorInjectionPointWrapper<T> extends ConstructorInjectionPoint<T>
+{
+ private ConstructorInjectionPoint<T> originalConstructorInjectionPoint;
+
+ private Object injectedDelegate;
+
+ public ProxyClassConstructorInjectionPointWrapper(Bean<T> declaringBean, WeldConstructor<T> weldConstructor, ConstructorInjectionPoint<T> originalConstructorInjectionPoint)
+ {
+ super(declaringBean, weldConstructor);
+ this.originalConstructorInjectionPoint = originalConstructorInjectionPoint;
+ }
+
+ @Override
+ public List<ParameterInjectionPoint<?, T>> getWeldParameters()
+ {
+ return originalConstructorInjectionPoint.getWeldParameters();
+ }
+
+ @Override
+ protected Object[] getParameterValues(List<ParameterInjectionPoint<?, T>> parameters, Object specialVal, Class<? extends Annotation> specialParam, BeanManagerImpl manager, CreationalContext<?> creationalContext)
+ {
+ Object[] parameterValues = super.getParameterValues(parameters, specialVal, specialParam, manager, creationalContext);
+ if (parameters.size() > 0)
+ {
+ for (ParameterInjectionPoint<?, T> parameterInjectionPoint: parameters)
+ {
+ if (parameterInjectionPoint.isDelegate())
+ {
+ this.injectedDelegate = parameterValues[parameterInjectionPoint.getPosition()];
+ }
+ }
+ }
+ return parameterValues;
+ }
+
+ /**
+ * The delegate injected during the constructed process, if any
+ *
+ * @return
+ */
+ public Object getInjectedDelegate()
+ {
+ return injectedDelegate;
+ }
+}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java 2009-11-22 15:57:32 UTC (rev 5109)
+++ core/trunk/impl/src/main/java/org/jboss/weld/logging/messages/BeanMessage.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -107,6 +107,7 @@
@MessageId("000086") CANNOT_DESTROY_ENTERPRISE_BEAN_NOT_CREATED,
@MessageId("000087") MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED,
@MessageId("000088") OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS,
- @MessageId("000089") TOO_MANY_EJBS_FOR_CLASS;
+ @MessageId("000089") TOO_MANY_EJBS_FOR_CLASS,
+ @MessageId("000090") ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE;
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-11-22 15:57:32 UTC (rev 5109)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -413,6 +413,17 @@
}
/**
+ * Checks if a method is abstract
+ *
+ * @param method
+ * @return
+ */
+ public static boolean isAbstract(Method method)
+ {
+ return Modifier.isAbstract(method.getModifiers());
+ }
+
+ /**
* Gets a constructor with matching parameter types
*
* @param <T> The type
Modified: core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties
===================================================================
--- core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties 2009-11-22 15:57:32 UTC (rev 5109)
+++ core/trunk/impl/src/main/resources/org/jboss/weld/messages/bean_en.properties 2009-11-22 23:48:19 UTC (rev 5110)
@@ -88,3 +88,4 @@
MESSAGE_DRIVEN_BEANS_CANNOT_BE_MANAGED=Message driven beans cannot be Managed Beans\: {0}
OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS=Observer method must be static or business method\: {0} on {1}
TOO_MANY_EJBS_FOR_CLASS=Unable to determine EJB for {0}, multiple EJBs with that class\: {1}
+ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE=Method {0} defined on {1} does not match a method on decorated type {2}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+public class AbstractDecoratorTestHelper
+{
+ static void resetAll()
+ {
+ Window.drawn = false;
+ Window.moved = false;
+ FrameWithFieldInjectedDelegate.drawn = false;
+ FrameWithFieldInjectedDelegateAndAbstractMethod.moved = false;
+ FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.moved = false;
+ FrameWithConstructorInjectedDelegate.drawn = false;
+ FrameWithConstructorInjectedDelegateAndAbstractMethod.moved = false;
+ FrameWithInitializerMethodInjectedDelegate.drawn = false;
+ FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved = false;
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithConstructorInjectedDelegate
+{
+
+ static boolean drawn;
+
+ Window window;
+
+ @Inject
+ FrameWithConstructorInjectedDelegate(@Delegate Window window)
+ {
+ this.window = window;
+ }
+
+ public void draw()
+ {
+ drawn = true;
+ window.draw();
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithConstructorInjectedDelegateAndAbstractMethod
+{
+
+ Window window;
+
+ static boolean moved = false;
+
+ @Inject
+ FrameWithConstructorInjectedDelegateAndAbstractMethod(@Delegate Window window)
+ {
+ this.window = window;
+ }
+
+ public abstract void draw();
+
+ public void move()
+ {
+ moved = true;
+ draw();
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithFieldInjectedDelegate
+{
+
+ static boolean drawn;
+
+ @Inject @Delegate
+ Window window;
+
+ public void draw()
+ {
+ drawn = true;
+ window.draw();
+ }
+
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithFieldInjectedDelegateAndAbstractMethod
+{
+
+ static boolean moved;
+
+ @Inject @Delegate
+ Window window;
+
+ public abstract void draw();
+
+ public void move()
+ {
+ moved = true;
+ window.move();
+ }
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod
+{
+
+ static boolean moved;
+
+ @Inject @Delegate
+ Window window;
+
+ public abstract void draw();
+
+ public void move()
+ {
+ moved = true;
+ draw();
+ }
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithInitializerMethodInjectedDelegate
+{
+
+ static boolean drawn;
+
+ private Window window;
+
+ @Inject
+ void initWindow(@Delegate Window window){
+ this.window = window;
+ }
+
+ public void draw() {
+ drawn = true;
+ window.draw();
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class FrameWithInitializerMethodInjectedDelegateAndAbstractMethod
+{
+
+ static boolean moved;
+
+ private Window window;
+
+ @Inject
+ void initWindow(@Delegate Window window)
+ {
+ this.window = window;
+ }
+
+ public abstract void draw();
+
+ public void move()
+ {
+ moved = true;
+ window.move();
+ }
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-simple.xml")
+public class SimpleAbstractDecoratorTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ resetAll();
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+ window.draw();
+ assert Window.drawn;
+ assert FrameWithFieldInjectedDelegate.drawn;
+ }
+
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withAbstractMethodAndInitializerMethod.xml")
+public class SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+
+ resetAll();
+ window.draw();
+ assert Window.drawn;
+ assert FrameWithFieldInjectedDelegate.drawn;
+ assert !FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved;
+
+ resetAll();
+ window.move();
+ assert Window.moved;
+ assert !FrameWithFieldInjectedDelegate.drawn;
+ assert FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved;
+
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withAbstractMethod.xml")
+public class SimpleAbstractDecoratorWithAbstractMethodTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+
+ resetAll();
+ window.draw();
+ assert Window.drawn;
+ assert FrameWithFieldInjectedDelegate.drawn;
+ assert !FrameWithFieldInjectedDelegateAndAbstractMethod.moved;
+
+ resetAll();
+ window.move();
+ assert Window.moved;
+ assert !FrameWithFieldInjectedDelegate.drawn;
+ assert FrameWithFieldInjectedDelegateAndAbstractMethod.moved;
+
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withCallToItself.xml")
+public class SimpleAbstractDecoratorWithCallToItselfTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+
+ resetAll();
+ window.move();
+ assert Window.drawn;
+ assert FrameWithFieldInjectedDelegate.drawn;
+ assert FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.moved;
+
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.*;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withConstructor.xml")
+public class SimpleAbstractDecoratorWithConstructorTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ resetAll();
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+ window.draw();
+ assert Window.drawn;
+ assert FrameWithConstructorInjectedDelegate.drawn;
+
+ resetAll();
+ window.move();
+ assert !Window.moved;
+ assert Window.drawn;
+ assert FrameWithConstructorInjectedDelegate.drawn;
+ assert FrameWithConstructorInjectedDelegateAndAbstractMethod.moved;
+
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+import static org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withInitializerMethod.xml")
+public class SimpleAbstractDecoratorWithInitializerMethodTest extends AbstractWeldTest
+{
+ @Test
+ public void testAbstractDecoratorApplied()
+ {
+
+ resetAll();
+
+ Window window = getCurrentManager().getInstanceByType(Window.class);
+ window.draw();
+ assert Window.drawn;
+ assert FrameWithInitializerMethodInjectedDelegate.drawn;
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator;
+
+/**
+ *
+ * @author Marius Bogoevici
+ */
+public class Window
+{
+ static boolean drawn;
+
+ static boolean moved;
+
+ public void draw()
+ {
+ drawn = true;
+ }
+
+ public void move()
+ {
+ moved = true;
+ }
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Frame.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Frame.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Frame.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator.broken;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Decorator
+public abstract class Frame
+{
+
+ @Inject @Delegate
+ Window window;
+
+ public void draw()
+ {
+ window.draw();
+ }
+
+ public abstract void resize();
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/SimpleAbstractDecoratorWithInvalidAbstractMethodTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/SimpleAbstractDecoratorWithInvalidAbstractMethodTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/SimpleAbstractDecoratorWithInvalidAbstractMethodTest.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator.broken;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.DefinitionException;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@Artifact
+@BeansXml("beans-withInvalidAbstractMethod.xml")
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class SimpleAbstractDecoratorWithInvalidAbstractMethodTest extends AbstractWeldTest
+{
+ @Test(groups = "broken")
+ // TODO: needs exception transformer to run in JBAS
+ public void testAbstractDecoratorApplied()
+ {
+ assert false;
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Window.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Window.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/Window.java 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.tests.decorators.abstractDecorator.broken;
+
+/**
+ *
+ * @author Marius Bogoevici
+ */
+public class Window
+{
+ static boolean drawn;
+
+ static boolean moved;
+
+ public void draw()
+ {
+ drawn = true;
+ }
+
+ public void move()
+ {
+ moved = true;
+ }
+}
\ No newline at end of file
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-simple.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-simple.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-simple.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethod.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethod.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethod.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegateAndAbstractMethod</class>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethodAndInitializerMethod.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethodAndInitializerMethod.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withAbstractMethodAndInitializerMethod.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithInitializerMethodInjectedDelegateAndAbstractMethod</class>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withCallToItself.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withCallToItself.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withCallToItself.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod</class>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithFieldInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withConstructor.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withConstructor.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withConstructor.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithConstructorInjectedDelegateAndAbstractMethod</class>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithConstructorInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withInitializerMethod.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withInitializerMethod.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/beans-withInitializerMethod.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.FrameWithInitializerMethodInjectedDelegate</class>
+ </decorators>
+</beans>
Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/broken/beans-withInvalidAbstractMethod.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/broken/beans-withInvalidAbstractMethod.xml (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/abstractDecorator/broken/beans-withInvalidAbstractMethod.xml 2009-11-22 23:48:19 UTC (rev 5110)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.abstractDecorator.broken.Frame</class>
+ </decorators>
+</beans>
14 years, 5 months