Seam SVN: r13862 - modules/xml/tags.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 09:00:33 -0400 (Thu, 14 Oct 2010)
New Revision: 13862
Added:
modules/xml/tags/3.0.0.Alpha3/
Log:
[maven-scm] copy for tag 3.0.0.Alpha3
Copied: modules/xml/tags/3.0.0.Alpha3 (from rev 13861, modules/xml/trunk)
13 years, 6 months
Seam SVN: r13861 - in modules/xml/trunk: dist and 3 other directories.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 09:00:10 -0400 (Thu, 14 Oct 2010)
New Revision: 13861
Modified:
modules/xml/trunk/dist/pom.xml
modules/xml/trunk/docs/pom.xml
modules/xml/trunk/examples/princess-rescue/pom.xml
modules/xml/trunk/impl/pom.xml
modules/xml/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 3.0.0.Alpha3
Modified: modules/xml/trunk/dist/pom.xml
===================================================================
--- modules/xml/trunk/dist/pom.xml 2010-10-14 12:07:59 UTC (rev 13860)
+++ modules/xml/trunk/dist/pom.xml 2010-10-14 13:00:10 UTC (rev 13861)
@@ -1,72 +1,71 @@
-<?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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>seam-xml-config-distribution</artifactId>
- <name>Seam XML Config Distribution</name>
- <description>Builds a Seam XML Config release distribution</description>
- <packaging>pom</packaging>
-
- <properties>
- <maven.deploy.skip>true</maven.deploy.skip>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config</artifactId>
- <version>${project.version}</version>
- <classifier>sources</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config</artifactId>
- <version>${project.version}</version>
- <classifier>javadoc</classifier>
- <optional>true</optional>
- </dependency>
-
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config-parent</artifactId>
+ <version>3.0.0.Alpha3</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>seam-xml-config-distribution</artifactId>
+ <name>Seam XML Config Distribution</name>
+ <description>Builds a Seam XML Config release distribution</description>
+ <packaging>pom</packaging>
+
+ <properties>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ </properties>
+
+ <dependencies>
+
<dependency>
<groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ <version>${project.version}</version>
+ <classifier>javadoc</classifier>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
<artifactId>seam-xml-config-reference-guide</artifactId>
- <version>${project.version}</version>
- <type>war</type>
+ <version>${project.version}</version>
+ <type>war</type>
<optional>true</optional>
- </dependency>
-
+ </dependency>
+
<dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-examples-princess-rescue</artifactId>
- <version>${project.version}</version>
- <type>zip</type>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-examples-princess-rescue</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
<optional>true</optional>
- </dependency>
-
- </dependencies>
-
- <build>
- <finalName>seam-xml-config</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>seam-xml-config</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: modules/xml/trunk/docs/pom.xml
===================================================================
--- modules/xml/trunk/docs/pom.xml 2010-10-14 12:07:59 UTC (rev 13860)
+++ modules/xml/trunk/docs/pom.xml 2010-10-14 13:00:10 UTC (rev 13861)
@@ -1,17 +1,16 @@
-<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">
+<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.seam.xml</groupId>
<artifactId>seam-xml-config-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.jboss.seam.xml</groupId>
<artifactId>seam-xml-config-reference-guide</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<packaging>jdocbook</packaging>
<name>Seam XML Config Reference Guide</name>
@@ -75,8 +74,8 @@
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/trunk/docs</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/trunk/docs</developerConnection>
- <url>http://fisheye.jboss.org/browse/seam/modules/xml/docs</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3/docs</developerConnection>
+ <url>http://fisheye.jboss.org/browse/seam/modules/xml/docs/tags/3.0.0.Alpha3/docs</url>
</scm>
</project>
Modified: modules/xml/trunk/examples/princess-rescue/pom.xml
===================================================================
--- modules/xml/trunk/examples/princess-rescue/pom.xml 2010-10-14 12:07:59 UTC (rev 13860)
+++ modules/xml/trunk/examples/princess-rescue/pom.xml 2010-10-14 13:00:10 UTC (rev 13861)
@@ -1,11 +1,10 @@
<?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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
<parent>
<artifactId>seam-xml-config-parent</artifactId>
<groupId>org.jboss.seam.xml</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -14,7 +13,7 @@
<artifactId>seam-xml-examples-princess-rescue</artifactId>
<packaging>war</packaging>
<name>Seam XML Config Example: Princess Rescue</name>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<dependencies>
Modified: modules/xml/trunk/impl/pom.xml
===================================================================
--- modules/xml/trunk/impl/pom.xml 2010-10-14 12:07:59 UTC (rev 13860)
+++ modules/xml/trunk/impl/pom.xml 2010-10-14 13:00:10 UTC (rev 13861)
@@ -1,12 +1,11 @@
<?xml version="1.0"?>
-<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">
+<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>
<artifactId>seam-xml-config-parent</artifactId>
<groupId>org.jboss.seam.xml</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -93,9 +92,9 @@
</dependencies>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/trunk/impl</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/trunk/impl</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/xml/trunk/impl</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3/impl</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/xml/tags/3.0.0.Alpha3/impl</url>
</scm>
<build>
Modified: modules/xml/trunk/pom.xml
===================================================================
--- modules/xml/trunk/pom.xml 2010-10-14 12:07:59 UTC (rev 13860)
+++ modules/xml/trunk/pom.xml 2010-10-14 13:00:10 UTC (rev 13861)
@@ -1,5 +1,4 @@
-<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">
+<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>
@@ -11,7 +10,7 @@
<groupId>org.jboss.seam.xml</groupId>
<artifactId>seam-xml-config-parent</artifactId>
<packaging>pom</packaging>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha3</version>
<name>Seam XML Config Parent</name>
<properties>
@@ -157,9 +156,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/xml/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/xml/tags/3.0.0.Alpha3</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/xml/tags/3.0.0.Alpha3</url>
</scm>
</project>
13 years, 6 months
Seam SVN: r13860 - branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-10-14 08:07:59 -0400 (Thu, 14 Oct 2010)
New Revision: 13860
Modified:
branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml
Log:
JBPAPP-5243
Modified: branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml 2010-10-14 12:04:04 UTC (rev 13859)
+++ branches/enterprise/JBPAPP_5_0/doc/Seam_Reference_Guide/en-US/Webservices.xml 2010-10-14 12:07:59 UTC (rev 13860)
@@ -212,6 +212,14 @@
other libraries of your application. Also deploy the integration library,
<filename>jboss-seam-resteasy.jar</filename>.
</para>
+
+ <para>
+ In seam-gen based projects, this can be done by appending <literal>jaxrs-api.jar</literal>, <literal>resteasy-jaxrs.jar</literal>
+ and <literal>jboss-seam-resteasy.jar</literal> to the <literal>deployed-jars.list</literal> (war deployment) or
+ <literal>deployed-jars-ear.list</literal> (ear deployment) file. For a JBDS based project, copy the libraries mentioned
+ above to the <literal>EarContent/lib</literal> (ear deployment) or <literal>WebContent/WEB-INF/lib</literal> (war deployment)
+ folder and reload the project in the IDE.
+ </para>
<para>
On startup, all classes annotated <literal>@javax.ws.rs.Path</literal> will be discovered automatically
@@ -474,6 +482,14 @@
<note>
<para>
+ RESTEasy components do not support hot redeployment. As a result, the components should never
+ be placed in the <literal>src/hot</literal> folder. The <literal>src/main</literal> folder should
+ be used instead.
+ </para>
+ </note>
+
+ <note>
+ <para>
Sub-resources as defined in the JAX RS specification, section 3.4.1, can not be Seam component instances
at this time. Only root resource classes can be registered as Seam components. In other words, do not
return a Seam component instance from a root resource method.
13 years, 6 months
Seam SVN: r13859 - branches/community/Seam_2_2/src/test/ftest.
by seam-commits@lists.jboss.org
Author: plenyi(a)redhat.com
Date: 2010-10-14 08:04:04 -0400 (Thu, 14 Oct 2010)
New Revision: 13859
Modified:
branches/community/Seam_2_2/src/test/ftest/build.xml
Log:
JBQA-3275 Fixed how the ftest-output xml files are located. More related minor improvements.
Modified: branches/community/Seam_2_2/src/test/ftest/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-14 12:00:58 UTC (rev 13858)
+++ branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-14 12:04:04 UTC (rev 13859)
@@ -416,7 +416,7 @@
insert child '<exception class="java.lang.Error"><message><![CDATA[Deployment in error.] ]></message><full-stacktrace><![CDATA[ ] ]></full-stacktrace></exception>'
*/
def xmlFile = new File("../../../test-output/testng-results.xml");
- println "../../../test-output/testng-results.xml";
+ ant.echo 'Checking "../../../test-output/testng-results.xml"';
assert xmlFile.exists() && xmlFile.isFile();
def root = slurper.parse(xmlFile);
@@ -446,37 +446,42 @@
def testOutDir = new File("../../../test-output");
assert testOutDir.exists() && testOutDir.isDirectory();
testOutDir.eachDir { dir ->
- if (dir.getName().endsWith("example")) {
- def exampleName;
- dir.eachFile { f ->
- if (f.getName().endsWith(container + ".xml")) {
- exampleName = f.getName().split("_" + container + ".*\\.xml")[0];
+ ant.echo "Checking " + dir.getName();
+ String exampleName;
+ String xmlFilePath;
+ String xmlFileEditPath;
+
+ dir.eachFile { f ->
+ if (f.isFile() && f.getName().matches(".*_" + container + ".*\\.xml")) {
+ exampleName = f.getName().split("_" + container + ".*\\.xml")[0];
+ xmlFilePath = f.getAbsolutePath();
+ xmlFileEditPath = xmlFilePath.substring(0, xmlFilePath.length() - 4) + "-edit.xml";
+ xmlFile = new File(xmlFilePath);
+ ant.echo "DEBUG Parsing file " + xmlFile.getName();
+ if (xmlFile.exists() && xmlFile.isFile()) {
+ root = slurper.parse(xmlFile);
+ def tsName = root.attributes().get("name");
+ def tsTime = root.attributes().get("time");
+ def tsTests = root.attributes().get("tests");
+ serviceMethods = root.testcase.findAll { it.(a)name.toString().contains("@") }
+
+ serviceMethods.each { it.replaceNode {} }
+ root.testcase.skipped.replaceNode { node -> failure(message:'Test skipped.',type:'java.lang.Error.') }
+
+ writer = new FileWriter(xmlFileEditPath);
+ writer << "<" + "?xml version=\"1.0\" encoding=\"UTF-8\" ?" + ">";
+ writer << '<testsuite name="' + tsName + '" failures="0" tests="' + tsTests + '" time="' + tsTime + '" errors="' + tsTests + '">';
+ writer << builder.bind(root.getBody());
+ writer << "</testsuite>";
+ writer.close();
+
+ ant.delete(file:xmlFilePath);
+ ant.move(file:xmlFileEditPath,tofile:xmlFilePath);
}
+ else {
+ println dir.getName() + "does not contain any xml file with test results (Looking for " + xmlFilePath + "). Skipping this directory."
+ }
}
- def xmlFilePath = "../../../test-output/" + dir.getName() + "/" + exampleName + "_" + container + ".xml";
- def xmlFileEditPath = "../../../test-output/" + dir.getName() + "/" + exampleName + "_" + container + "-edit.xml";
- xmlFile = new File(xmlFilePath);
- println xmlFilePath;
- assert xmlFile.exists() && xmlFile.isFile();
-
- root = slurper.parse(xmlFile);
- def tsName = root.attributes().get("name");
- def tsTime = root.attributes().get("time");
- def tsTests = root.attributes().get("tests");
- serviceMethods = root.testcase.findAll { it.(a)name.toString().contains("@") }
-
- serviceMethods.each { it.replaceNode {} }
- root.testcase.skipped.replaceNode { node -> failure(message:'Test skipped.',type:'java.lang.Error.') }
-
- writer = new FileWriter(xmlFileEditPath);
- writer << "<" + "?xml version=\"1.0\" encoding=\"UTF-8\" ?" + ">";
- writer << '<testsuite name="' + tsName + '" failures="0" tests="' + tsTests + '" time="' + tsTime + '" errors="' + tsTests + '">';
- writer << builder.bind(root.getBody());
- writer << "</testsuite>";
- writer.close();
-
- ant.delete(file:xmlFilePath);
- ant.move(file:xmlFileEditPath,tofile:xmlFilePath);
}
}
]]>
13 years, 6 months
Seam SVN: r13858 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-10-14 08:00:58 -0400 (Thu, 14 Oct 2010)
New Revision: 13858
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml
Log:
JBSEAM-4715
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml 2010-10-14 11:20:03 UTC (rev 13857)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Webservices.xml 2010-10-14 12:00:58 UTC (rev 13858)
@@ -232,10 +232,17 @@
<para>
First, get the RESTEasy libraries and the <literal>jaxrs-api.jar</literal>, deploy them with the
other libraries of your application. Also deploy the integration library,
- <literal>jboss-seam-resteasy.jar</literal>.
+ <literal>jboss-seam-resteasy.jar</literal>.
</para>
-
<para>
+ In seam-gen based projects, this can be done by appending <literal>jaxrs-api.jar</literal>, <literal>resteasy-jaxrs.jar</literal>
+ and <literal>jboss-seam-resteasy.jar</literal> to the <literal>deployed-jars.list</literal> (war deployment) or
+ <literal>deployed-jars-ear.list</literal> (ear deployment) file. For a JBoss Tools based project, copy the libraries mentioned
+ above to the <literal>EarContent/lib</literal> (ear deployment) or <literal>WebContent/WEB-INF/lib</literal> (war deployment)
+ folder and reload the project in the IDE.
+ </para>
+
+ <para>
On startup, all classes annotated <literal>@javax.ws.rs.Path</literal> will be discovered automatically
and registered as HTTP resources. Seam automatically accepts and serves HTTP requests with its built-in
<literal>SeamResourceServlet</literal>. The URI of a resource is build as follows:
@@ -512,6 +519,13 @@
<note>
<para>
+ RESTEasy components do not support hot redeployment. As a result, the components should never
+ be placed in the <literal>src/hot</literal> folder. The <literal>src/main</literal> folder should
+ be used instead.
+ </para>
+ </note>
+ <note>
+ <para>
Provider classes can currently not be Seam components. Although you can configure an
<literal>@Provider</literal> annotated class as a Seam component, it will at runtime be managed
by RESTEasy as a singleton with no Seam interception, bijection, etc. The instance will not be
13 years, 6 months
Seam SVN: r13857 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 07:20:03 -0400 (Thu, 14 Oct 2010)
New Revision: 13857
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
Log:
minor doc changes
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 11:19:10 UTC (rev 13856)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 11:20:03 UTC (rev 13857)
@@ -68,8 +68,8 @@
</para>
<para>
- For example, say you had a class <literal>com.mydomain.package2.Report</literal>.
- To configure a <literal>Report</literal> bean you would use
+ For example, say you had a class <code>com.mydomain.package2.Report</code>.
+ To configure a <code>Report</code> bean you would use
<literal><ns:Report></literal>. Methods and fields on the bean are resolved
from the same namespace as the bean itself. It is possible to distinguish between
overloaded methods by specifying the parameter types, for more information see
@@ -83,7 +83,7 @@
<title>Adding, replacing and modifying beans</title>
<para>
- By configuring a bean via XML creates a new bean, however there
+ By default configuring a bean via XML creates a new bean, however there
may be cases where you want to modify an existing bean rather than
adding a new one. The <literal><s:replaces></literal> and
<literal><s:modifies></literal> tags allow you to do this.
@@ -93,20 +93,21 @@
The <literal><s:replaces></literal> tag prevents the existing bean from being
installed, and registers a new one with the given configuration. The
<literal><s:modifies></literal> tag does the same, except that it merges
- the annotations on the bean with the annotations defined in XML. This has almost
- the same effect as modifiying an existing bean, except it is possible to install
- multiple beans that modify the same class.
+ the annotations on the bean with the annotations defined in XML. Where the
+ same annotation is specified on both the class and in XML the annotation in
+ XML takes precidence. This has almost the same effect as modifiying an existing
+ bean, except it is possible to install multiple beans that modify the same class.
</para>
- <programlisting role="XML"><![CDATA[<test:Report>
+ <programlisting role="XML"><![CDATA[<my:Report>
<s:modifies>
- <test:NewQualifier/>
-</test:Report>
+ <my:NewQualifier/>
+</my:Report>
-<test:ReportDatasource>
+<my:ReportDatasource>
<s:replaces>
- <test:NewQualifier/>
-</test:ReportDatasource>]]></programlisting>
+ <my:NewQualifier/>
+</my:ReportDatasource>]]></programlisting>
<para>
The first entry above adds a new bean with an extra qualifier, in addition
@@ -126,7 +127,7 @@
<para>
Annotations are resolved in the same way as normal classes. Conceptually
- annotations are applied to the object their parent element in the resolves
+ annotations are applied to the object their parent element resolves
to. It is possible to set the value of annotation members using the xml
attribute that corresponds to the member name. For example:
</para>
@@ -138,13 +139,12 @@
}]]></programlisting>
<programlisting role="XML" ><![CDATA[<test:QualifiedBean1>
- <test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
-</test:QualifiedBean1>
+ <test:OtherQualifier value1="AA" value2="1">A</my:OtherQualifier>
+</my:QualifiedBean1>
<test:QualifiedBean2>
<test:OtherQualifier value1="BB" value2="2" value="B" />
-</test:QualifiedBean2>
-]]></programlisting>
+</my:QualifiedBean2>]]></programlisting>
<para>
The <code>value</code> member can be set using the inner text of the node, as seen
@@ -213,43 +213,43 @@
<literal>Collection</literal> field values. Some examples:
</para>
- <programlisting role="XML"><![CDATA[<test:ArrayFieldValue>
+ <programlisting role="XML"><![CDATA[<my:ArrayFieldValue>
- <test:iarray>
+ <my:intArrayField>
<s:value>1</s:value>
<s:value>2</s:value>
- </test:iarray>
+ </my:intArrayField>
- <test:carray>
+ <my:classArrayField>
<s:value>java.lang.Integer</s:value>
<s:value>java.lang.Long</s:value>
- </test:carray>
+ </my:classArrayField>
- <test:sarray>
+ <my:stringArrayField>
<s:value>hello</s:value>
<s:value>world</s:value>
- </test:sarray>
+ </my:stringArrayField>
-</test:ArrayFieldValue>
+</my:ArrayFieldValue>
-<test:MapFieldValue>
+<my:MapFieldValue>
- <test:map1>
+ <my:map1>
<s:entry><s:key>1</s:key><s:value>hello</s:value></s:entry>
<s:entry><s:key>2</s:key><s:value>world</s:value></s:entry>
- </test:map1>
+ </my:map1>
- <test:map2>
+ <my:map2>
<s:e><s:k>1</s:k><s:v>java.lang.Integer</s:v></s:e>
<s:e><s:k>2</s:k><s:v>java.lang.Long</s:v></s:e>
- </test:map2>
+ </my:map2>
-</test:MapFieldValue>]]></programlisting>
+</my:MapFieldValue>]]></programlisting>
<para>
- Type conversion is done automatically for all primitives and primitive wrappers, <literal>Date</literal>,
- <literal>Calendar</literal>,<literal>Enum</literal> and <literal>Class</literal> fields.
- In this instance <literal>ArrayFieldValue.carray</literal> is actually an array of classes, not an array of Strings.
+ Type conversion is done automatically for all primitives and primitive wrappers,
+ <literal>Date</literal>, <literal>Calendar</literal>,<literal>Enum</literal> and
+ <literal>Class</literal> fields.
</para>
<para>
@@ -263,6 +263,13 @@
<s:value>#{paramValue}</s:key>
</m:parameters>
</m:Report>]]></programlisting>
+
+ <para>
+ Internally field values are set by wrapping the <code>InjectionTarget</code>
+ for a bean. This means that the expressions are evaluated once, at bean
+ creation time.
+ </para>
+
</section>
<section>
@@ -273,7 +280,7 @@
This allows for the configuration of complex types with nestled classes. Inline beans can be declared inside both
<literal><s:value></literal> and <literal><s:key></literal> elements, and may be used in both collections
and simple field values. Inline beans must not have any qualifier annotations declared on the bean, instead seam-xml assigns
- them an artificial qualifier. Inline beans may have any scope, however the default <literal>Dependent</literal> scope is
+ them an artificial qualifier. Inline beans may have any scope, however the default <code>Dependent</code> scope is
recomended.
</para>
@@ -288,7 +295,7 @@
<my:Horse>
<my:name>
<value>billy</value>
- </test:name>
+ </my:name>
<my:shoe>
<Inject/>
</my:shoe>
@@ -308,56 +315,56 @@
It is also possible to configure methods in a similar way to configuring fields:
</para>
+ <programlisting role="JAVA" ><![CDATA[class MethodBean {
+
+ public int doStuff() {
+ return 1;
+ }
+
+ public int doStuff(MethodValueBean bean) {
+ return bean.value + 1;
+ }
+
+ public void doStuff(MethodValueBean[][] beans) {
+ /*do stuff */
+ }
+
+}]]></programlisting>
+
<programlisting role="XML" ><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:ee"
- xmlns:test="urn:java:org.jboss.seam.xml.test.method">
- <test:MethodBean>
+ xmlns:my="urn:java:org.jboss.seam.xml.test.method">
+ <my:MethodBean>
- <test:doStuff>
+ <my:doStuff>
<s:Produces/>
- </test:doStuff>
+ </my:doStuff>
- <test:doStuff>
+ <my:doStuff>
<s:Produces/>
- <test:Qualifier1/>
+ <my:Qualifier1/>
<s:parameters>
- <test:MethodValueBean>
- <test:Qualifier2/>
- </test:MethodValueBean>
+ <my:MethodValueBean>
+ <my:Qualifier2/>
+ </my:MethodValueBean>
</s:parameters>
- </test:doStuff>
+ </my:doStuff>
- <test:doStuff>
+ <my:doStuff>
<s:Produces/>
- <test:Qualifier1/>
+ <my:Qualifier1/>
<s:parameters>
<s:array dimensions="2">
- <test:Qualifier2/>
- <test:MethodValueBean/>
+ <my:Qualifier2/>
+ <my:MethodValueBean/>
</s:array>
</s:parameters>
- </test:doStuff>
+ </my:doStuff>
- </test:MethodBean>
+ </my:MethodBean>
</beans>]]></programlisting>
-
-<programlisting role="JAVA" ><![CDATA[class MethodBean {
-
- public int doStuff() {
- return 1;
- }
-
- public int doStuff(MethodValueBean bean) {
- return bean.value + 1;
- }
-
- public void doStuff(MethodValueBean[][] beans) {
- /*do stuff */
- }
-
-}]]></programlisting>
<para>
In this instance <literal>MethodBean</literal> has three methods, all of them rather
@@ -409,11 +416,11 @@
the following:
</para>
- <programlisting role="XML"><![CDATA[<test:method>
+ <programlisting role="XML"><![CDATA[<my:method>
<s:array>
- <test:MethodValueBean/>
+ <my:MethodValueBean/>
</s:array>
-</test:method>]]>
+</my:method>]]>
</programlisting>
<note>
@@ -436,15 +443,15 @@
<code>@Inject</code> annotation applied to it. Annotations can be applied to the constructor
parameters in the same manner as method parameters.
</para>
- <programlisting role="XML"><![CDATA[<test:MyBean>
+ <programlisting role="XML"><![CDATA[<my:MyBean>
<s:parameters>
<s:Integer>
- <test:MyQualifier/>
+ <my:MyQualifier/>
</s:Integer>
</s:parameters>
-</test:MyBean>]]></programlisting>
+</my:MyBean>]]></programlisting>
<para>
- The example above is equivilent to the following java:
+ The example above is equivalent to the following java:
</para>
<programlisting role="JAVA">class MyBean {
@Inject
@@ -459,23 +466,25 @@
<title>Overriding the type of an injection point</title>
<para>
- It is possible to limit which bean types are availible to inject int a given injection point:
+ It is possible to limit which bean types are availible to inject
+ into a given injection point:
</para>
<programlisting role="JAVA"><![CDATA[class SomeBean
{
public Object someField;
}]]></programlisting>
-<programlisting role="XML"><![CDATA[<test:SomeBean>
- <test:someField>
+<programlisting role="XML"><![CDATA[<my:SomeBean>
+ <my:someField>
<s:Inject/>
<s:Exact>com.mydomain.InjectedBean</s:Exact>
- </test:someField>
-</test:SomeBean>]]></programlisting>
+ </my:someField>
+</my:SomeBean>]]></programlisting>
<para>
In the example above only beans that are assignable to InjectedBean will be eligable for injection into the field.
- This also works for parameter injection points.
+ This also works for parameter injection points. This functionallity is part of Weld Extensions, and the
+ <code>@Exact</code> annotation can be used directly in java.
</para>
</section>
@@ -492,26 +501,26 @@
binding and is named:
</para>
- <programlisting role="XML" ><![CDATA[<test:SomeStereotype>
- <s:Stereotype/>
- <test:InterceptorBinding/>
- <s:Named/>
- </test:SomeStereotype>]]></programlisting>
+ <programlisting role="XML" ><![CDATA[<my:SomeStereotype>
+ <s:Stereotype/>
+ <my:InterceptorBinding/>
+ <s:Named/>
+</my:SomeStereotype>]]></programlisting>
<para>
This configures a qualifier annotation:
</para>
-<programlisting role="XML" ><![CDATA[<test:SomeQualifier>
- <s:Qualifier/>
- </test:SomeQualifier>]]></programlisting>
+<programlisting role="XML" ><![CDATA[<my:SomeQualifier>
+ <s:Qualifier/>
+</my:SomeQualifier>]]></programlisting>
<para>
This configures an interceptor binding:
</para>
- <programlisting role="XML" ><![CDATA[<test:SomeInterceptorBinding>
- <s:InterceptorBinding/>
- </test:SomeInterceptorBinding>]]></programlisting>
+ <programlisting role="XML" ><![CDATA[<my:SomeInterceptorBinding>
+ <s:InterceptorBinding/>
+</my:SomeInterceptorBinding>]]></programlisting>
</section>
13 years, 6 months
Seam SVN: r13856 - in branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools: drools-compiler/4.0.7-SOA-P and 2 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-10-14 07:19:10 -0400 (Thu, 14 Oct 2010)
New Revision: 13856
Modified:
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.sha1
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.sha1
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.sha1
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.sha1
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.sha1
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.md5
branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.sha1
Log:
JBPAPP-5180 new drools in local repo
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-1db2193c0a7db56a787766061bb3552b
\ No newline at end of file
+858490a58a7347f04b02e6730b6925d2
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.jar.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-fe782efed1111d6b2bb433a5d3dd0cc776489618
\ No newline at end of file
+c4fefd7c7184880a8501c36ba44644c135243879
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom 2010-10-14 11:19:10 UTC (rev 13856)
@@ -5,13 +5,20 @@
<parent>
<artifactId>drools</artifactId>
<groupId>org.drools</groupId>
- <version>4.0.7-SOA-P</version>
+ <version>4.0.7</version>
</parent>
<artifactId>drools-compiler</artifactId>
<packaging>jar</packaging>
<name>Drools :: Compiler</name>
+ <repositories>
+ <repository>
+ <id>basedir</id>
+ <url>file://${basedir}/../m2_repo</url>
+ </repository>
+ </repositories>
+
<build/>
<dependencies>
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-b98146f3b358f616a665bd0ef60a32a9
\ No newline at end of file
+d1990b5893d33a041b8b62faf3d8a2bd
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/4.0.7-SOA-P/drools-compiler-4.0.7-SOA-P.pom.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-76e645c2e5a4ecf5dd1d11f651ea64bc59cd5088
\ No newline at end of file
+d61092483236f1523ed1701c56762386a9ff1855
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?><metadata>
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>4.0.7-SOA-P</version>
@@ -6,6 +7,6 @@
<versions>
<version>4.0.7-SOA-P</version>
</versions>
- <lastUpdated>20081110115552</lastUpdated>
+ <lastUpdated>20101014084806</lastUpdated>
</versioning>
-</metadata>
\ No newline at end of file
+</metadata>
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-622d331769b1447800936901b40254e9
\ No newline at end of file
+26fa658a14317d5c73f4a9668f4d0952
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-compiler/maven-metadata.xml.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-487e9106bc6f7d2aa187d1903c96a88f2669706a
\ No newline at end of file
+6b0d129e24db6648a245cadd01f5014a1246bc00
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-8c4dbe8f1e51a41d7216ab27f6196faf
\ No newline at end of file
+aaf846a56bfa84e0e23e44e9f138467d
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.jar.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-c436fcc464e9b04f510e2be6ebcc6dfd73a2e8a6
\ No newline at end of file
+6a950b4df54fd005e26a5be924ac4f7d3003b9b7
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom 2010-10-14 11:19:10 UTC (rev 13856)
@@ -5,13 +5,20 @@
<parent>
<artifactId>drools</artifactId>
<groupId>org.drools</groupId>
- <version>4.0.7-SOA-P</version>
+ <version>4.0.7</version>
</parent>
<artifactId>drools-core</artifactId>
<packaging>jar</packaging>
<name>Drools :: Rete-OO Core</name>
+ <repositories>
+ <repository>
+ <id>basedir</id>
+ <url>file://${basedir}/../m2_repo</url>
+ </repository>
+ </repositories>
+
<dependencies>
<!-- following are required for parser (lang). May be refactored out of core module. -->
<dependency>
@@ -49,4 +56,6 @@
</plugin>
</plugins>
</build>
+
+
</project>
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-871f9be32befa11aa674b5c1bdd60420
\ No newline at end of file
+0d19424a8d29e51d3748f1f5aeafdeb3
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/4.0.7-SOA-P/drools-core-4.0.7-SOA-P.pom.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-6e0e9a9732628cc256e95c38fd2450cb852da120
\ No newline at end of file
+c8638917f59aa36265decd0db38ba0801fb6137c
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?><metadata>
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>4.0.7-SOA-P</version>
@@ -6,6 +7,6 @@
<versions>
<version>4.0.7-SOA-P</version>
</versions>
- <lastUpdated>20081110115543</lastUpdated>
+ <lastUpdated>20101014084847</lastUpdated>
</versioning>
-</metadata>
\ No newline at end of file
+</metadata>
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.md5
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.md5 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.md5 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-62dfb3b2e3248d5f9fcbd9c64e4ee267
\ No newline at end of file
+abcdafff0e6ef4ffcdb64a8c56c78663
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.sha1
===================================================================
--- branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.sha1 2010-10-14 11:05:17 UTC (rev 13855)
+++ branches/enterprise/JBPAPP_4_3_CP08_JBPAPP-5180/build/localRepo/org/drools/drools-core/maven-metadata.xml.sha1 2010-10-14 11:19:10 UTC (rev 13856)
@@ -1 +1 @@
-f7495d918384facc01f7b0da941ffa0fa34e5eaf
\ No newline at end of file
+443eed3c2f016f1ac8ba52acbcd8b7b60bcafea7
\ No newline at end of file
13 years, 6 months
Seam SVN: r13855 - in modules/xml/trunk: impl and 1 other directory.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 07:05:17 -0400 (Thu, 14 Oct 2010)
New Revision: 13855
Modified:
modules/xml/trunk/impl/pom.xml
modules/xml/trunk/pom.xml
Log:
change scope to provided
Modified: modules/xml/trunk/impl/pom.xml
===================================================================
--- modules/xml/trunk/impl/pom.xml 2010-10-14 10:52:01 UTC (rev 13854)
+++ modules/xml/trunk/impl/pom.xml 2010-10-14 11:05:17 UTC (rev 13855)
@@ -21,11 +21,13 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
Modified: modules/xml/trunk/pom.xml
===================================================================
--- modules/xml/trunk/pom.xml 2010-10-14 10:52:01 UTC (rev 13854)
+++ modules/xml/trunk/pom.xml 2010-10-14 11:05:17 UTC (rev 13855)
@@ -67,10 +67,10 @@
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- </dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
13 years, 6 months
Seam SVN: r13854 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 06:52:01 -0400 (Thu, 14 Oct 2010)
New Revision: 13854
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
Log:
more documentation work
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 10:01:22 UTC (rev 13853)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 10:52:01 UTC (rev 13854)
@@ -4,61 +4,70 @@
<chapter id="xml">
<title>Seam XML Reference</title>
- <section id="xml.namespaces">
- <title>XML Namespaces</title>
- <para>The main namespace is <literal>urn:java:ee</literal> contains builtin tags and types from core packages.
- The builtin tags are:</para>
+ <section id="xml.namespaces">
+ <title>XML Namespaces</title>
+
+ <para>
+ The main namespace is <literal>urn:java:ee</literal> contains builtin tags
+ and types from core packages. The builtin tags are:
+ </para>
- <itemizedlist>
- <listitem><para><literal>Beans</literal></para></listitem>
- <listitem><para><literal>modifies</literal></para></listitem>
- <listitem><para><literal>replaces</literal></para></listitem>
- <listitem><para><literal>parameters</literal></para></listitem>
- <listitem><para><literal>value</literal></para></listitem>
- <listitem><para><literal>key</literal></para></listitem>
- <listitem><para><literal>entry</literal></para></listitem>
- <listitem><para><literal>e</literal> (alias for entry)</para></listitem>
- <listitem><para><literal>v</literal> (alias for value)</para></listitem>
- <listitem><para><literal>k</literal> (alias for key)</para></listitem>
- <listitem><para><literal>array</literal></para></listitem>
- <listitem><para><literal>int</literal></para></listitem>
- <listitem><para><literal>short</literal></para></listitem>
- <listitem><para><literal>long</literal></para></listitem>
- <listitem><para><literal>byte</literal></para></listitem>
- <listitem><para><literal>char</literal></para></listitem>
- <listitem><para><literal>double</literal></para></listitem>
- <listitem><para><literal>float</literal></para></listitem>
- <listitem><para><literal>boolean</literal></para></listitem>
- </itemizedlist>
+ <itemizedlist>
+ <listitem><para><literal>Beans</literal></para></listitem>
+ <listitem><para><literal>modifies</literal></para></listitem>
+ <listitem><para><literal>replaces</literal></para></listitem>
+ <listitem><para><literal>parameters</literal></para></listitem>
+ <listitem><para><literal>value</literal></para></listitem>
+ <listitem><para><literal>key</literal></para></listitem>
+ <listitem><para><literal>entry</literal></para></listitem>
+ <listitem><para><literal>e</literal> (alias for entry)</para></listitem>
+ <listitem><para><literal>v</literal> (alias for value)</para></listitem>
+ <listitem><para><literal>k</literal> (alias for key)</para></listitem>
+ <listitem><para><literal>array</literal></para></listitem>
+ <listitem><para><literal>int</literal></para></listitem>
+ <listitem><para><literal>short</literal></para></listitem>
+ <listitem><para><literal>long</literal></para></listitem>
+ <listitem><para><literal>byte</literal></para></listitem>
+ <listitem><para><literal>char</literal></para></listitem>
+ <listitem><para><literal>double</literal></para></listitem>
+ <listitem><para><literal>float</literal></para></listitem>
+ <listitem><para><literal>boolean</literal></para></listitem>
+ </itemizedlist>
- <para>as well as classes from the following packages:</para>
+ <para>
+ as well as classes from the following packages:
+ </para>
- <itemizedlist>
- <listitem><para><literal>java.lang</literal></para></listitem>
- <listitem><para><literal>java.util</literal></para></listitem>
- <listitem><para><literal>javax.annotation</literal></para></listitem>
- <listitem><para><literal>javax.inject</literal></para></listitem>
- <listitem><para><literal>javax.enterprise.inject</literal></para></listitem>
- <listitem><para><literal>javax.enterprise.context</literal></para></listitem>
- <listitem><para><literal>javax.enterprise.event</literal></para></listitem>
- <listitem><para><literal>javax.decorator</literal></para></listitem>
- <listitem><para><literal>javax.interceptor</literal></para></listitem>
- <listitem><para><literal>org.jboss.weld.extensions.core</literal></para></listitem>
- <listitem><para><literal>org.jboss.weld.extensions.unwraps</literal></para></listitem>
- <listitem><para><literal>org.jboss.weld.extensions.resourceLoader</literal></para></listitem>
- </itemizedlist>
+ <itemizedlist>
+ <listitem><para><literal>java.lang</literal></para></listitem>
+ <listitem><para><literal>java.util</literal></para></listitem>
+ <listitem><para><literal>javax.annotation</literal></para></listitem>
+ <listitem><para><literal>javax.inject</literal></para></listitem>
+ <listitem><para><literal>javax.enterprise.inject</literal></para></listitem>
+ <listitem><para><literal>javax.enterprise.context</literal></para></listitem>
+ <listitem><para><literal>javax.enterprise.event</literal></para></listitem>
+ <listitem><para><literal>javax.decorator</literal></para></listitem>
+ <listitem><para><literal>javax.interceptor</literal></para></listitem>
+ <listitem><para><literal>org.jboss.weld.extensions.core</literal></para></listitem>
+ <listitem><para><literal>org.jboss.weld.extensions.unwraps</literal></para></listitem>
+ <listitem><para><literal>org.jboss.weld.extensions.resourceLoader</literal></para></listitem>
+ </itemizedlist>
- <para>Other namspaces are specified using the following syntax:</para>
+ <para>
+ Other namspaces are specified using the following syntax:
+ </para>
+
<programlisting>
- <![CDATA[xmlns:ns="urn:java:com.mydomain.package1:com.mydomain.package2"]]>
- </programlisting>
+ <![CDATA[xmlns:my="urn:java:com.mydomain.package1:com.mydomain.package2"]]></programlisting>
+
<para>
- This maps <literal>ns</literal> to the packages <literal>com.mydomain.package1</literal>
- and <literal>com.mydomain.package2</literal>. These packages are searched in order to
- resolve elements in this namespace.
+ This maps the namespace <literal>my</literal> to the packages
+ <literal>com.mydomain.package1</literal> and
+ <literal>com.mydomain.package2</literal>. These packages are searched in
+ order to resolve elements in this namespace.
</para>
- <para >
+ <para>
For example, say you had a class <literal>com.mydomain.package2.Report</literal>.
To configure a <literal>Report</literal> bean you would use
<literal><ns:Report></literal>. Methods and fields on the bean are resolved
@@ -70,22 +79,26 @@
</section>
- <section id="xml.installing-beans">
- <title>Adding, replacing and modifying beans</title>
- <para>By configuring a bean via XML creates a new bean, however there
- may be cases where you want to modify an existing bean rather than
- adding a new one. The <literal><s:replaces></literal> and
- <literal><s:modifies></literal> tags allow you to do this.</para>
- <para>The <literal><s:replaces></literal> tag prevents the existing bean from being
- installed, and registers a new one with the given configuration. The
- <literal><s:modifies></literal> tag does the same, except that it merges
- the annotations on the bean with the annotations defined in XML. This has almost
- the same effect as modifiying an existing bean, except it is possible to install
- multiple beans that modify the same class.
- </para>
+ <section id="xml.installing-beans">
+ <title>Adding, replacing and modifying beans</title>
+
+ <para>
+ By configuring a bean via XML creates a new bean, however there
+ may be cases where you want to modify an existing bean rather than
+ adding a new one. The <literal><s:replaces></literal> and
+ <literal><s:modifies></literal> tags allow you to do this.
+ </para>
+
+ <para>
+ The <literal><s:replaces></literal> tag prevents the existing bean from being
+ installed, and registers a new one with the given configuration. The
+ <literal><s:modifies></literal> tag does the same, except that it merges
+ the annotations on the bean with the annotations defined in XML. This has almost
+ the same effect as modifiying an existing bean, except it is possible to install
+ multiple beans that modify the same class.
+ </para>
- <programlisting role="XML"><![CDATA[
-<test:Report>
+ <programlisting role="XML"><![CDATA[<test:Report>
<s:modifies>
<test:NewQualifier/>
</test:Report>
@@ -93,32 +106,78 @@
<test:ReportDatasource>
<s:replaces>
<test:NewQualifier/>
-</test:ReportDatasource>]]>
- </programlisting>
- <para>The first entry above adds a new bean with an extra qualifier, in addition to the qualifiers already present,
- and prevents the existing <literal>Report</literal> bean from being installed.</para>
- <para>The second prevents the existing bean from being installed, and registers a new bean with a single qualifier.</para>
- </section>
+</test:ReportDatasource>]]></programlisting>
+
+ <para>
+ The first entry above adds a new bean with an extra qualifier, in addition
+ to the qualifiers already present, and prevents the existing
+ <literal>Report</literal> bean from being installed.
+ </para>
+
+ <para>
+ The second prevents the existing bean from being installed, and registers
+ a new bean with a single qualifier.
+ </para>
+
+ </section>
+
+ <section>
+ <title>Applying annotations using XML</title>
+
+ <para>
+ Annotations are resolved in the same way as normal classes. Conceptually
+ annotations are applied to the object their parent element in the resolves
+ to. It is possible to set the value of annotation members using the xml
+ attribute that corresponds to the member name. For example:
+ </para>
+
+ <programlisting role="JAVA" ><![CDATA[public @interface OtherQualifier {
+ String value1();
+ int value2();
+ QualifierEnum value();
+}]]></programlisting>
+
+ <programlisting role="XML" ><![CDATA[<test:QualifiedBean1>
+ <test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
+</test:QualifiedBean1>
- <secion id="xml.configuring-fields" >
+<test:QualifiedBean2>
+ <test:OtherQualifier value1="BB" value2="2" value="B" />
+</test:QualifiedBean2>
+]]></programlisting>
+
+ <para>
+ The <code>value</code> member can be set using the inner text of the node, as seen
+ in the first example. Type conversion is performed automatically.
+ </para>
+
+ <note>
+ <para>
+ It is currently not possible set array annotation members.
+ </para>
+ </note>
+
+ </section>
+
+ <section id="xml.configuring-fields" >
<title>Configuring Fields</title>
+
<para>
It is possible to both apply qualifiers to and set the initial value of a field.
Fields reside in the same namespace as the declaring bean, and the element name
must exactly match the field name. For example if we have the following class:
</para>
- <programlisting role="JAVA">class RobotFactory {
- Robot robot;
- }
- </programlisting>
+ <programlisting role="JAVA" >class RobotFactory {
+ Robot robot;
+}</programlisting>
<para>
The following xml will add the <code>@Produces</code> annotation to the
<code>robot</code> field:
</para>
- <programlisting role="JAVA" ><![CDATA[<my:RobotFactory>
+ <programlisting role="XML" ><![CDATA[<my:RobotFactory>
<my:robot>
<s:Produces/>
</my:robot>
@@ -126,7 +185,11 @@
<section>
<title>Initial Field Values</title>
- <para>Inital field values can be set three different ways as shown below:</para>
+
+ <para>
+ Inital field values can be set three different ways as shown below:
+ </para>
+
<programlisting role="XML"><![CDATA[<r:MyBean company="Red Hat Inc" />
<r:MyBean>
@@ -138,12 +201,18 @@
<s:value>Red Hat Inc<s:value>
<r:SomeQualifier/>
</r:company>
-</r:MyBean>]]>
- </programlisting>
+</r:MyBean>]]></programlisting>
- <para>The third form is the only one that also allows you to add annotations such as qualifiers to the field.</para>
+ <para>
+ The third form is the only one that also allows you to add annotations such as
+ qualifiers to the field.
+ </para>
- <para>It is possible to set <literal>Map</literal>,<literal>Array</literal> and <literal>Collection</literal> field values. Some examples:</para>
+ <para>
+ It is possible to set <literal>Map</literal>,<literal>Array</literal> and
+ <literal>Collection</literal> field values. Some examples:
+ </para>
+
<programlisting role="XML"><![CDATA[<test:ArrayFieldValue>
<test:iarray>
@@ -207,6 +276,7 @@
them an artificial qualifier. Inline beans may have any scope, however the default <literal>Dependent</literal> scope is
recomended.
</para>
+
<programlisting role="XML"><![CDATA[<my:Knight>
<my:sword>
<value>
@@ -225,10 +295,11 @@
</my:Horse>
</value>
</my:horse>
-</my:Knight>]]></programlisting>
+</my:Knight>]]></programlisting>
+
</section>
- </secion>
+ </section>
<section id="xml.configuring-methods" >
<title>Configuring methods</title>
@@ -236,6 +307,7 @@
<para>
It is also possible to configure methods in a similar way to configuring fields:
</para>
+
<programlisting role="XML" ><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -282,7 +354,7 @@
}
public void doStuff(MethodValueBean[][] beans) {
- //do stuff
+ /*do stuff */
}
}]]></programlisting>
@@ -291,11 +363,13 @@
In this instance <literal>MethodBean</literal> has three methods, all of them rather
imaginatively named <literal>doStuff</literal>.
</para>
+
<para>
The first <literal><test:doStuff></literal>
entry in the XML file configures the method that takes no arguments. The
<literal><s:Produces></literal> element makes it into a producer method.
</para>
+
<para>
The next entry in the file configures the method that takes a
<literal>MethodValueBean</literal> as a parameter and the final entry
@@ -303,6 +377,7 @@
as a parameter. For both these methods a qualifier was added to the method parameter and
they were made into producer methods.
</para>
+
<para>
Method parameters are specified inside the <literal><s:parameters></literal>
element. If these parameters have annotation children they are taken to be annotations on
@@ -316,15 +391,15 @@
<programlisting role="JAVA"><![CDATA[class MethodBean {
@Produces
- public int doStuff() {//method body}
+ public int doStuff() {/*method body */}
@Produces
@Qualifier1
- public int doStuff(@Qualifier2 MethodValueBean param) {//method body}
+ public int doStuff(@Qualifier2 MethodValueBean param) {/*method body */}
@Produces
@Qualifier1
- public int doStuff(@Qualifier2 MethodValueBean[][] param) {//method body}
+ public int doStuff(@Qualifier2 MethodValueBean[][] param) {/*method body */}
}]]></programlisting>
<para>
@@ -348,7 +423,8 @@
<code><parameters></code> element, in which case it is resolved
as a method.
</para>
- </note>
+ </note>
+
</section>
<section>
@@ -403,36 +479,9 @@
</para>
</section>
-
+
<section>
- <title>Annotation Members</title>
- <para>
- It is possible to set the value of annotation members using attributes in xml. For example:
- </para>
- <programlisting role="JAVA" ><![CDATA[public @interface OtherQualifier {
- String value1();
- int value2();
- QualifierEnum value();
-}]]></programlisting>
-
- <programlisting role="XML" ><![CDATA[<test:QualifiedBean1>
- <test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
-</test:QualifiedBean1>
-
-<test:QualifiedBean2>
- <test:OtherQualifier value1="BB" value2="2" value="B" />
-</test:QualifiedBean2>
-]]>
- </programlisting>
-
- <para>
- The value member can be set using the inner text of the node, as seen in the first example.
- </para>
-
- </section>
-
- <section>
- <title>Configuring Meta Annotations</title>
+ <title>Configuring Meta Annotations</title>
<para>
It is possible to make existing annotations into qualifiers, stereotypes or interceptor bindings.
@@ -491,7 +540,7 @@
<literal>'Version 1.23'</literal>. The corresponding java for the above XML is:
</para>
-<programlisting role="java" ><![CDATA[class SomeClass
+<programlisting role="JAVA" ><![CDATA[class SomeClass
{
@Produces
13 years, 6 months
Seam SVN: r13853 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-14 06:01:22 -0400 (Thu, 14 Oct 2010)
New Revision: 13853
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
Log:
more seam-xml documentation work
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 10:00:04 UTC (rev 13852)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-14 10:01:22 UTC (rev 13853)
@@ -4,140 +4,10 @@
<chapter id="xml">
<title>Seam XML Reference</title>
- <section>
- <title>OLD Getting Started - To be removed</title>
- <para>By default XML files are discovered from the classpath. The extension looks for an XML file in the following locations:</para>
- <itemizedlist>
- <listitem><literal>/WEB-INF/beans.xml</literal></listitem>
- <listitem><literal>/META-INF/beans.xml</literal></listitem>
- <listitem><literal>/WEB-INF/seam-beans.xml</literal></listitem>
- <listitem><literal>/META-INF/seam-beans.xml</literal></listitem>
- </itemizedlist>
-
- <para>The <literal>beans.xml</literal> file is the preferred way of configuring beans via XML, however it may be possible that some JSR-299 implementations will not allow this,
- so <literal>seam-beans.xml</literal> is provided as an alternative. </para>
-
- <para>Let's start with a simple example:</para>
- <programlisting role="XML">
- <![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:ee"
- xmlns:test="urn:java:org.jboss.seam.xml.test.injection">
-
- <test:ProducerQualifier>
- <s:Qualifier/>
- </test:ProducerQualifier>
-
- <test:ProducerBean someOtherField="45" >
- <test:someField>
- <s:Produces/>
- <test:ProducerQualifier/>
- <s:value>hello world</s:value>
- </test:someField>
- </test:ProducerBean>
-
- <test:ReceiverBean>
- <test:value>
- <test:ProducerQualifier/>
- <s:Inject/>
- </test:value>
- </test:ReceiverBean>
-
-</beans>
- ]]>
- </programlisting>
-
- <para>You will notice that two new namspace declarations have been added to the
- <literal>beans.xml</literal> file: <literal>urn:java:ee</literal> and
- <literal>urn:java:org.jboss.seam.xml.test.injection</literal>. The
- <literal>urn:java:ee</literal> namespace is the main one used by the XML
- extension, we will cover exactly what lives in this namespace later. The
- <literal>urn:java:org.jboss.seam.xml.test.injection</literal> namespace is used
- to resolve classes in the java package <literal>org.jboss.seam.xml.test.injection</literal>,
- so in the example above <literal><test:ProducerBean></literal> resolves to
- <literal>org.jboss.seam.xml.test.injection.ProducerBean</literal>.</para>
-
- <para>It is possible to map an XML namespace to multiple java packages. This is
- done by sperating the packages with a colon like so:</para>
- <programlisting>
- <![CDATA[
- xmlns:test="urn:java:com.mydomain.package1:com.mydomain.package2"
- ]]>
- </programlisting>
- <para>The namespaces are searched in the order they are specified in the xml
- document.</para>
-
- <programlisting role="XML">
- <![CDATA[
-<test:ProducerQualifier>
- <s:Qualifier/>
-</test:ProducerQualifier>
- ]]>
- </programlisting>
-
- <para>The first entry in the file defines a new qualifier. <literal>ProducerQualifier</literal>
- is an annotation in the package <literal>org.jboss.seam.xml.test.injection</literal>.</para>
-
- <programlisting role="XML">
- <![CDATA[
-<test:ProducerBean someOtherField="45" >
- <test:someField>
- <s:Produces/>
- <test:ProducerQualifier/>
- <s:value>hello world</s:value>
- </test:someField>
-</test:ProducerBean>
- ]]>
- </programlisting>
-
- <para>The next entry in the file is a bean declaration. The bean class is
- <literal>org.jboss.seam.xml.test.injection.ProducerBean</literal>.
- It is important to note that this declaration does not change the existing declaration of
- <literal>ProducerBean</literal>, instead it installs a new bean. In
- this instance there will be two <literal>ProducerBean</literal> CDI beans.</para>
-
- <para>This bean has a field called <literal>someField</literal>, this field is configured to be a producer field using XML (it is also possible to configure producer
- methods, more on this later). The <literal><test:value/></literal> declaration has several child elements. The <literal><s:Produces/></literal>
- element tells the container that this is a producer field. <literal><test:ProducerQualifier/></literal> element defines a qualifier for the producer
- field. The <literal><s:value></literal> element defines an initial value for the field.</para>
-
- <para>This bean also has another field called <literal>someOtherField</literal> this field has it's value to to 45 using a shorthand syntax. A field may not be specified
- twice, trying to set the value using the shorthand syntax and the normal syntax will result in an error.</para>
-
- <para>Child elements of fields, methods and classes that resolve to Annotation types are considered to be annotations on the corresponding element,
- so the corresponding Java declaration for the XML above would be:</para>
-
- <programlisting role="JAVA"><![CDATA[
-public class ProducerBean {
- @Produces
- @ProducerQualifier
- public String someField = "hello world";
-
- int someOtherField = 45;
-
-}
- ]]></programlisting>
-
- <programlisting role="JAVA"><![CDATA[
-<test:ReceiverBean>
- <test:value>
- <test:ProducerQualifier/>
- <s:Inject/>
- </test:value>
-</test:ReceiverBean>
- ]]></programlisting>
-
- <para>The XML above declares a new bean that injects the value that was produced above.
- In this case the <literal>@Inject</literal> annotation is applied instead of
- <literal>@Produces</literal> and no initial value is set.</para>
- </section>
-
- <section>
+ <section id="xml.namespaces">
<title>XML Namespaces</title>
- <para>The main namesapce is <literal>urn:java:ee</literal> contains builtin tags and types from core packages.
- The builting tags are:</para>
+ <para>The main namespace is <literal>urn:java:ee</literal> contains builtin tags and types from core packages.
+ The builtin tags are:</para>
<itemizedlist>
<listitem><para><literal>Beans</literal></para></listitem>
@@ -174,23 +44,34 @@
<listitem><para><literal>javax.decorator</literal></para></listitem>
<listitem><para><literal>javax.interceptor</literal></para></listitem>
<listitem><para><literal>org.jboss.weld.extensions.core</literal></para></listitem>
+ <listitem><para><literal>org.jboss.weld.extensions.unwraps</literal></para></listitem>
+ <listitem><para><literal>org.jboss.weld.extensions.resourceLoader</literal></para></listitem>
</itemizedlist>
<para>Other namspaces are specified using the following syntax:</para>
<programlisting>
<![CDATA[xmlns:ns="urn:java:com.mydomain.package1:com.mydomain.package2"]]>
</programlisting>
- <para>This maps <literal>ns</literal> to the packages <literal>com.mydomain.package1</literal>
- and <literal>com.mydomain.package2</literal>. These packages are searched in order to
- resolve elements in this namespace.</para>
- <para>For example, say you had a class <literal>com.mydomain.package2.Report</literal>.
- To configure a <literal>Report</literal> bean you
- would use <literal><ns:Report></literal>. Methods and fields of a bean come
- from the same namespace as the bean iteself.</para>
+ <para>
+ This maps <literal>ns</literal> to the packages <literal>com.mydomain.package1</literal>
+ and <literal>com.mydomain.package2</literal>. These packages are searched in order to
+ resolve elements in this namespace.
+ </para>
+
+ <para >
+ For example, say you had a class <literal>com.mydomain.package2.Report</literal>.
+ To configure a <literal>Report</literal> bean you would use
+ <literal><ns:Report></literal>. Methods and fields on the bean are resolved
+ from the same namespace as the bean itself. It is possible to distinguish between
+ overloaded methods by specifying the parameter types, for more information see
+ <link linkend="xml.configuring-methods">Configuring Methods</link>.
+ </para>
+
+
</section>
- <section>
- <title>Overriding and extending beans</title>
+ <section id="xml.installing-beans">
+ <title>Adding, replacing and modifying beans</title>
<para>By configuring a bean via XML creates a new bean, however there
may be cases where you want to modify an existing bean rather than
adding a new one. The <literal><s:replaces></literal> and
@@ -198,8 +79,10 @@
<para>The <literal><s:replaces></literal> tag prevents the existing bean from being
installed, and registers a new one with the given configuration. The
<literal><s:modifies></literal> tag does the same, except that it merges
- the annotations on the bean with the annotations defined in XML. This has the
- same effect as modifiying an existing bean.</para>
+ the annotations on the bean with the annotations defined in XML. This has almost
+ the same effect as modifiying an existing bean, except it is possible to install
+ multiple beans that modify the same class.
+ </para>
<programlisting role="XML"><![CDATA[
<test:Report>
@@ -217,12 +100,34 @@
<para>The second prevents the existing bean from being installed, and registers a new bean with a single qualifier.</para>
</section>
- <section>
- <title>Initial Field Values</title>
- <para>Inital field values can be set three different ways as shown below:</para>
- <programlisting role="XML">
- <![CDATA[
-<r:MyBean company="Red Hat Inc" />
+ <secion id="xml.configuring-fields" >
+ <title>Configuring Fields</title>
+ <para>
+ It is possible to both apply qualifiers to and set the initial value of a field.
+ Fields reside in the same namespace as the declaring bean, and the element name
+ must exactly match the field name. For example if we have the following class:
+ </para>
+
+ <programlisting role="JAVA">class RobotFactory {
+ Robot robot;
+ }
+ </programlisting>
+
+ <para>
+ The following xml will add the <code>@Produces</code> annotation to the
+ <code>robot</code> field:
+ </para>
+
+ <programlisting role="JAVA" ><![CDATA[<my:RobotFactory>
+ <my:robot>
+ <s:Produces/>
+ </my:robot>
+</my:RobotFactory/>]]></programlisting>
+
+ <section>
+ <title>Initial Field Values</title>
+ <para>Inital field values can be set three different ways as shown below:</para>
+ <programlisting role="XML"><![CDATA[<r:MyBean company="Red Hat Inc" />
<r:MyBean>
<r:company>Red Hat Inc</r:company>
@@ -234,14 +139,12 @@
<r:SomeQualifier/>
</r:company>
</r:MyBean>]]>
- </programlisting>
+ </programlisting>
- <para>The third form is the only one that also allows you to add annotations such as qualifiers to the field.</para>
+ <para>The third form is the only one that also allows you to add annotations such as qualifiers to the field.</para>
- <para>It is possible to set <literal>Map</literal>,<literal>Array</literal> and <literal>Collection</literal> field values. Some examples:</para>
- <programlisting role="XML">
- <![CDATA[
-<test:ArrayFieldValue>
+ <para>It is possible to set <literal>Map</literal>,<literal>Array</literal> and <literal>Collection</literal> field values. Some examples:</para>
+ <programlisting role="XML"><![CDATA[<test:ArrayFieldValue>
<test:iarray>
<s:value>1</s:value>
@@ -272,65 +175,68 @@
<s:e><s:k>2</s:k><s:v>java.lang.Long</s:v></s:e>
</test:map2>
-</test:MapFieldValue>
- ]]>
- </programlisting>
- <para>Type conversion is done automatically for all primitives and primitive wrappers, <literal>Date</literal>,
- <literal>Calendar</literal>,<literal>Enum</literal> and <literal>Class</literal> fields.
- In this instance <literal>ArrayFieldValue.carray</literal> is actually an array of classes, not an array of Strings.</para>
- <para>The use of EL to set field values is also supported:</para>
- <programlisting role="XML">
- <![CDATA[
-<m:Report>
+</test:MapFieldValue>]]></programlisting>
+
+ <para>
+ Type conversion is done automatically for all primitives and primitive wrappers, <literal>Date</literal>,
+ <literal>Calendar</literal>,<literal>Enum</literal> and <literal>Class</literal> fields.
+ In this instance <literal>ArrayFieldValue.carray</literal> is actually an array of classes, not an array of Strings.
+ </para>
+
+ <para>
+ The use of EL to set field values is also supported:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<m:Report>
<m:name>#{reportName}</m:name>
<m:parameters>
<s:key>#{paramName}</s:key>
<s:value>#{paramValue}</s:key>
</m:parameters>
-</m:Report>
-]]>
-</programlisting>
- </section>
- <section>
- <title>Inline Bean Declarations</title>
- <para>Inline beans allow you to set field values to another bean that is declared inline inside the field declaration.
- This allows for the configuration of complex types with nestled classes. Inline beans can be declared inside both
- <literal><s:value></literal> and <literal><s:key></literal> elements, and may be used in both collections
- and simple field values. Inline beans must not have any qualifier annotations declared on the bean, instead seam-xml assigns
- them an artificial qualifier. Inline beans may have any scope, however the default <literal>Dependent</literal> scope is
- recomended.
- </para>
-<programlisting role="XML">
-<![CDATA[
-<test:Knight>
- <test:sword>
+</m:Report>]]></programlisting>
+ </section>
+
+ <section>
+ <title>Inline Bean Declarations</title>
+
+ <para>
+ Inline beans allow you to set field values to another bean that is declared inline inside the field declaration.
+ This allows for the configuration of complex types with nestled classes. Inline beans can be declared inside both
+ <literal><s:value></literal> and <literal><s:key></literal> elements, and may be used in both collections
+ and simple field values. Inline beans must not have any qualifier annotations declared on the bean, instead seam-xml assigns
+ them an artificial qualifier. Inline beans may have any scope, however the default <literal>Dependent</literal> scope is
+ recomended.
+ </para>
+ <programlisting role="XML"><![CDATA[<my:Knight>
+ <my:sword>
<value>
- <test:Sword type="sharp"/>
+ <my:Sword type="sharp"/>
</value>
- </test:sword>
- <test:horse>
+ </my:sword>
+ <my:horse>
<value>
- <test:Horse>
- <test:name>
+ <my:Horse>
+ <my:name>
<value>billy</value>
</test:name>
- <test:shoe>
+ <my:shoe>
<Inject/>
- </test:shoe>
- </test:Horse>
+ </my:shoe>
+ </my:Horse>
</value>
- </test:horse>
-</test:Knight>
-]]>
-</programlisting>
- </section>
- <section>
- <title>Configuring methods</title>
+ </my:horse>
+</my:Knight>]]></programlisting>
+ </section>
+
+ </secion>
- <para>It is also possible to configure methods in a similar way to configuring fields:</para>
- <programlisting role="XML" >
- <![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+ <section id="xml.configuring-methods" >
+ <title>Configuring methods</title>
+
+ <para>
+ It is also possible to configure methods in a similar way to configuring fields:
+ </para>
+ <programlisting role="XML" ><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:ee"
@@ -363,13 +269,10 @@
</test:doStuff>
</test:MethodBean>
-</beans>
-]]>
-</programlisting>
-<programlisting role="JAVA" >
-<![CDATA[
-public class MethodBean {
+</beans>]]></programlisting>
+<programlisting role="JAVA" ><![CDATA[class MethodBean {
+
public int doStuff() {
return 1;
}
@@ -382,29 +285,35 @@
//do stuff
}
-}
-]]>
-</programlisting>
+}]]></programlisting>
- <para>In this instance <literal>MethodBean</literal> has three methods, all of them rather
- imaginatively named <literal>doStuff</literal>.</para>
- <para> The first <literal><test:doStuff></literal>
- entry in the XML file configures the method that takes no arguments. The
- <literal><s:Produces></literal> element makes it into a producer method.
- </para>
- <para>The next entry in the file configures the method that takes a
- <literal>MethodValueBean</literal> as a parameter and the final entry
- configures a method that takes a two dimensional array of<literal>MethodValueBean</literal>'s
- as a parameter. For both these methods a qualifier was added to the method parameter and
- they were made into producer methods.</para>
- <para>Method parameters are specified inside the <literal><s:parameters></literal>
- element. If these parameters have annotation children they are taken to be annotations on
- the parameter. </para>
+ <para>
+ In this instance <literal>MethodBean</literal> has three methods, all of them rather
+ imaginatively named <literal>doStuff</literal>.
+ </para>
+ <para>
+ The first <literal><test:doStuff></literal>
+ entry in the XML file configures the method that takes no arguments. The
+ <literal><s:Produces></literal> element makes it into a producer method.
+ </para>
+ <para>
+ The next entry in the file configures the method that takes a
+ <literal>MethodValueBean</literal> as a parameter and the final entry
+ configures a method that takes a two dimensional array of<literal>MethodValueBean</literal>'s
+ as a parameter. For both these methods a qualifier was added to the method parameter and
+ they were made into producer methods.
+ </para>
+ <para>
+ Method parameters are specified inside the <literal><s:parameters></literal>
+ element. If these parameters have annotation children they are taken to be annotations on
+ the parameter.
+ </para>
- <para>The corresponding Java declaration for the XML above would be:</para>
- <programlisting role="JAVA">
- <![CDATA[
-public class MethodBean {
+ <para>
+ The corresponding Java declaration for the XML above would be:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[class MethodBean {
@Produces
public int doStuff() {//method body}
@@ -416,22 +325,32 @@
@Produces
@Qualifier1
public int doStuff(@Qualifier2 MethodValueBean[][] param) {//method body}
-} ]]>
- </programlisting>
- <para>Array parameters can be represented using the <literal><s:array></literal> element,
- with a child element to represent the type of the array. E.g.</para>
- <programlisting role="JAVA">
-int method(MethodValueBean[] param);
- </programlisting>
- <para>could be configured via xml using the following:</para>
- <programlisting role="XML"><![CDATA[
-<test:method>
+}]]></programlisting>
+
+ <para>
+ Array parameters can be represented using the <literal><s:array></literal> element,
+ with a child element to represent the type of the array. E.g.
+ <code>int method(MethodValueBean[] param);</code> could be configured via xml using
+ the following:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<test:method>
<s:array>
<test:MethodValueBean/>
</s:array>
</test:method>]]>
- </programlisting>
- </section>
+ </programlisting>
+
+ <note>
+ <para>
+ If a class has a field and a method of the same name then by default the
+ field will be resolved, unless the element has a child
+ <code><parameters></code> element, in which case it is resolved
+ as a method.
+ </para>
+ </note>
+ </section>
+
<section>
<title>Configuring the bean constructor</title>
<para>
@@ -458,49 +377,45 @@
...
}
} </programlisting>
- </section>
- <section>
- <title>Overriding the type of an injection point</title>
+ </section>
+
+ <section>
+ <title>Overriding the type of an injection point</title>
- <para>It is possible to limit which bean types are availible to inject int a given injection point:</para>
- <programlisting role="JAVA">
- <![CDATA[
-public class SomeBean
+ <para>
+ It is possible to limit which bean types are availible to inject int a given injection point:
+ </para>
+ <programlisting role="JAVA"><![CDATA[class SomeBean
{
public Object someField;
-}
-]]>
-</programlisting>
-<programlisting role="XML">
-<![CDATA[
-<test:SomeBean>
+}]]></programlisting>
+
+<programlisting role="XML"><![CDATA[<test:SomeBean>
<test:someField>
<s:Inject/>
<s:Exact>com.mydomain.InjectedBean</s:Exact>
</test:someField>
-</test:SomeBean>
-]]>
-</programlisting>
-<para>In the example above only beans that are assignable to InjectedBean will be eligable for injection into the field.
- This also works for parameter injection points.</para>
+</test:SomeBean>]]></programlisting>
+
+ <para>
+ In the example above only beans that are assignable to InjectedBean will be eligable for injection into the field.
+ This also works for parameter injection points.
+ </para>
- </section>
+ </section>
- <section>
- <title>Annotation Members</title>
- <para>It is possible to set the value of annotation members using attributes in xml. For example:</para>
- <programlisting role="JAVA" >
- <![CDATA[
-public @interface OtherQualifier {
+ <section>
+ <title>Annotation Members</title>
+ <para>
+ It is possible to set the value of annotation members using attributes in xml. For example:
+ </para>
+ <programlisting role="JAVA" ><![CDATA[public @interface OtherQualifier {
String value1();
int value2();
QualifierEnum value();
-}
-]]>
-</programlisting>
-<programlisting role="XML" >
-<![CDATA[
-<test:QualifiedBean1>
+}]]></programlisting>
+
+ <programlisting role="XML" ><![CDATA[<test:QualifiedBean1>
<test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
</test:QualifiedBean1>
@@ -508,52 +423,58 @@
<test:OtherQualifier value1="BB" value2="2" value="B" />
</test:QualifiedBean2>
]]>
- </programlisting>
- <para>The value member can be set using the inner text of the node, as seen in the first example.</para>
+ </programlisting>
+
+ <para>
+ The value member can be set using the inner text of the node, as seen in the first example.
+ </para>
+
</section>
<section>
<title>Configuring Meta Annotations</title>
- <para>It is possible to make existing annotations into qualifiers, stereotypes or interceptor bindings.</para>
- <para>This configures a stereotype annotation <literal>SomeStereotype</literal> that has a single interceptor
- binding and is named:</para>
-<programlisting role="XML" >
-<![CDATA[
- <test:SomeStereotype>
+
+ <para>
+ It is possible to make existing annotations into qualifiers, stereotypes or interceptor bindings.
+ </para>
+
+ <para>
+ This configures a stereotype annotation <literal>SomeStereotype</literal> that has a single interceptor
+ binding and is named:
+ </para>
+
+ <programlisting role="XML" ><![CDATA[<test:SomeStereotype>
<s:Stereotype/>
<test:InterceptorBinding/>
<s:Named/>
- </test:SomeStereotype>
-]]>
-</programlisting>
-<para>This configures a qualifier annotation:</para>
-<programlisting role="XML" >
-<![CDATA[
- <test:SomeQualifier>
+ </test:SomeStereotype>]]></programlisting>
+
+ <para>
+ This configures a qualifier annotation:
+ </para>
+
+<programlisting role="XML" ><![CDATA[<test:SomeQualifier>
<s:Qualifier/>
- </test:SomeQualifier>
-]]>
-</programlisting>
-<para>This configures an interceptor binding:</para>
-<programlisting role="XML" >
-<![CDATA[
- <test:SomeInterceptorBinding>
+ </test:SomeQualifier>]]></programlisting>
+
+ <para>
+ This configures an interceptor binding:
+ </para>
+ <programlisting role="XML" ><![CDATA[<test:SomeInterceptorBinding>
<s:InterceptorBinding/>
- </test:SomeInterceptorBinding>
-]]>
-</programlisting>
- </section>
+ </test:SomeInterceptorBinding>]]></programlisting>
+
+ </section>
- <section>
+ <section>
<title>Virtual Producer Fields</title>
<para>
Seam XML supports configuration of virtual producer fields. These allow for configuration
of resource producer fields, Weld Extensions generic bean and constant values directly via
XML. First an exmaple:
</para>
-<programlisting role="XML" >
-<![CDATA[
-<s:EntityManager>
+
+<programlisting role="XML" ><![CDATA[<s:EntityManager>
<s:Produces/>
<sPersistenceContext unitName="customerPu" />
</s:EntityManager>
@@ -562,17 +483,15 @@
<s:Produces/>
<my:VersionQualifier />
<value>Version 1.23</value>
-</s:String>
-]]>
-</programlisting>
+</s:String>]]></programlisting>
+
<para>
The first example configures a resource producer field. The second configures a bean
of type String, with the qualifier <literal>@VersionQualifier</literal> and the value
<literal>'Version 1.23'</literal>. The corresponding java for the above XML is:
</para>
-<programlisting role="java" >
-<![CDATA[
-public class SomeClass
+
+<programlisting role="java" ><![CDATA[class SomeClass
{
@Produces
@@ -583,15 +502,15 @@
@VersionQualifier
String field2 = "Version 1.23";
-}
-]]>
-</programlisting>
- <para>
- Although these look superficially like normal bean declarations, the <literal><Produces></literal>
- declaration means it is treated as a producer field instead of a normal bean.
- </para>
- </section>
+}]]></programlisting>
+
+ <para>
+ Although these look superficially like normal bean declarations, the <literal><Produces></literal>
+ declaration means it is treated as a producer field instead of a normal bean.
+ </para>
+ </section>
+
<section>
<title>More Information</title>
<para>For further information look at the units tests in the seam-xml distribution, also the
@@ -599,4 +518,6 @@
so it may also be worthwhile reading.</para>
</section>
+
+
</chapter>
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-10-14 10:00:04 UTC (rev 13852)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-10-14 10:01:22 UTC (rev 13853)
@@ -7,8 +7,7 @@
<para>
Seam provides a method for configuring JSR-299 beans using XML. Using XML
it is possible to add new beans, override existing beans, and add
- extra configuration to existing beans. The default is to add a new
- bean.
+ extra configuration to existing beans.
</para>
<section>
@@ -56,8 +55,7 @@
<para>
And the following support classes:
</para>
- <programlisting role="JAVA">
- <![CDATA[interface Datasource {
+ <programlisting role="JAVA"><![CDATA[interface Datasource {
public Data getData();
}
@@ -84,29 +82,28 @@
configure up multiple <literal>Report</literal>
beans via xml.
</para>
+ <example>
<programlistingco>
<areaspec>
- <area id="namepsace-declaration-seam" coords="6" />
- <area id="namepsace-declaration-reports" coords="7" />
- <area id="resport-dec" coords="9" />
- <area id="specializes" coords="10" />
- <area id="filename" coords="11" />
- <area id="datasource-qualifier" coords="13" />
- <area id="filename-short" coords="17" />
- <area id="replaces" coords="18" />
- <area id="inject" coords="20" />
- <area id="datasource-type" coords="21" />
+ <area id="namepsace-declaration-seam" coords="4" />
+ <area id="namepsace-declaration-reports" coords="5" />
+ <area id="resport-dec" coords="7" />
+ <area id="modifies" coords="8" />
+ <area id="filename" coords="9" />
+ <area id="datasource-qualifier" coords="11" />
+ <area id="filename-short" coords="15" />
+ <area id="replaces" coords="16" />
+ <area id="inject" coords="18" />
+ <area id="datasource-type" coords="19" />
</areaspec>
- <programlisting role="XML">
- <![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting ><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:java:ee"
xmlns:r="urn:java:org.example.reports">
<r:Report>
- <s:specializes/>
+ <s:modifies/>
<r:filename>sales.jrxml<r:filename>
<r:datasource>
<r:SalesQualifier/>
@@ -135,36 +132,53 @@
<callout arearefs="namepsace-declaration-reports">
<para>
+ There are now multiple namespaces in the <literal>beans.xml</literal>
+ file. These namespaces correspond to java package names.
+ </para>
+ <para>
The namespace <literal>urn:java:org.example.reports</literal>
corresponds to the package <literal>org.example.reports</literal>,
where our reporting classes live. Multiple java packages can be aggregated
- into a single namespace declaration by selerating the package names
+ into a single namespace declaration by seperating the package names
with colons, e.g.
- <literal>urn:java:org.example.reports:org.example.model</literal>
+ <literal>urn:java:org.example.reports:org.example.model</literal>.
+ The namespaces are searched in the order they are specified in the xml
+ document, so if two packages in the namespace have a class with the same name,
+ the first one listed will be resolved. For more information see
+ <link linkend="xml.namespaces">Namespaces</link>.
</para>
</callout>
<callout arearefs="resport-dec">
<para>
The <literal><Report></literal> declaration configures an
- instance of our <literal>Report</literal> class as a bean.
+ instance of our <code>Report</code> class as a bean.
</para>
</callout>
- <callout arearefs="specializes">
+ <callout arearefs="modifies">
<para>
- Beans installed using <literal><s:specializes></literal>
+ Beans installed using <literal><s:modifies></literal>
read annotations from the existing class, and merge them with
the annotations defined via xml. In addition if a bean is
- installed with <literal><s:specializes></literal>
- it prevents the original class being installed as a bean.
+ installed with <literal><s:modifies></literal>
+ it prevents the original class being installed as a bean. It
+ is also possible to add new beans and replace beans altogether,
+ for more information see
+ <link linkend="xml.installing-beans">Adding, modifying and
+ replacing beans</link>.
+
</para>
</callout>
<callout arearefs="filename">
<para>
The <literal><r:filename></literal> element sets the
- initial value of the filename field.
+ initial value of the filename field. For more information on how
+ methods and fields are resolved see
+ <link linkend="xml.configuring-methods">Configuring Methods</link>,
+ and
+ <link linkend="xml.configuring-fields">Configuring Fields</link>.
</para>
</callout>
@@ -213,12 +227,12 @@
</calloutlist>
</programlistingco>
-
+ </example>
</section>
<section>
<title>The Princess Rescue Example</title>
<para>
- TODO
+ TODO next release
</para>
</section>
<!--
13 years, 6 months