Seam SVN: r13832 - modules/international/trunk.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-13 00:06:09 -0400 (Wed, 13 Oct 2010)
New Revision: 13832
Modified:
modules/international/trunk/pom.xml
Log:
update to weldx beta1
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-10-12 15:01:30 UTC (rev 13831)
+++ modules/international/trunk/pom.xml 2010-10-13 04:06:09 UTC (rev 13832)
@@ -29,7 +29,7 @@
<properties>
<seam.version>3.0.0.b01</seam.version>
<!-- Use snapshot WeldX -->
- <weld.extensions.version>1.0.0-SNAPSHOT</weld.extensions.version>
+ <weld.extensions.version>1.0.0.Beta1</weld.extensions.version>
</properties>
<dependencyManagement>
13 years, 7 months
Seam SVN: r13831 - branches/community/Seam_2_2/src/test/ftest.
by seam-commits@lists.jboss.org
Author: plenyi(a)redhat.com
Date: 2010-10-12 11:01:30 -0400 (Tue, 12 Oct 2010)
New Revision: 13831
Modified:
branches/community/Seam_2_2/src/test/ftest/build.xml
Log:
JBQA-3275 Minor classpath fix.
Modified: branches/community/Seam_2_2/src/test/ftest/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-12 14:40:22 UTC (rev 13830)
+++ branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-12 15:01:30 UTC (rev 13831)
@@ -45,8 +45,7 @@
</fileset>
</path>
- <!-- TODO : should the libs be in seam/lib and managed with mvn? -->
- <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="../../../lib/ftest/groovy-all.jar"/>
+ <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="../../../lib/groovy-all.jar"/>
<target name="testall" description="Run functional testsuite based on container property">
<fail unless="container">Please set container property.</fail>
13 years, 7 months
Seam SVN: r13830 - branches/community/Seam_2_2/src/main/org/jboss/seam/core.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-10-12 10:40:22 -0400 (Tue, 12 Oct 2010)
New Revision: 13830
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java
Log:
JBSEAM-4284 - oops unwanted change
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java 2010-10-12 11:33:52 UTC (rev 13829)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java 2010-10-12 14:40:22 UTC (rev 13830)
@@ -33,7 +33,7 @@
private static final LogProvider log = Logging.getLogProvider(ConversationPropagation.class);
public static final String CONVERSATION_NAME_PARAMETER = "conversationName";
- public static final String CONVERSATION_PROPAGATION_PARAMETER = " ";
+ public static final String CONVERSATION_PROPAGATION_PARAMETER = "conversationPropagation";
private String conversationName;
private String conversationId;
13 years, 7 months
Seam SVN: r13829 - in branches/community/Seam_2_2: ui/src/main/config/component and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-10-12 07:33:52 -0400 (Tue, 12 Oct 2010)
New Revision: 13829
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java
branches/community/Seam_2_2/src/main/org/jboss/seam/core/Manager.java
branches/community/Seam_2_2/src/main/org/jboss/seam/core/PropagationType.java
branches/community/Seam_2_2/ui/src/main/config/component/conversationPropagation.xml
Log:
JBSEAM-4284
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java 2010-10-11 14:02:40 UTC (rev 13828)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/core/ConversationPropagation.java 2010-10-12 11:33:52 UTC (rev 13829)
@@ -33,7 +33,7 @@
private static final LogProvider log = Logging.getLogProvider(ConversationPropagation.class);
public static final String CONVERSATION_NAME_PARAMETER = "conversationName";
- public static final String CONVERSATION_PROPAGATION_PARAMETER = "conversationPropagation";
+ public static final String CONVERSATION_PROPAGATION_PARAMETER = " ";
private String conversationName;
private String conversationId;
@@ -160,7 +160,7 @@
if (value.startsWith("begin"))
{
propagationType = PropagationType.BEGIN;
- if ( value.length()>6 )
+ if ( value.length() > 6 )
{
pageflow = value.substring(6);
}
@@ -168,17 +168,17 @@
else if (value.startsWith("join"))
{
propagationType = PropagationType.JOIN;
- if ( value.length()>5 )
+ if ( value.length() > 5 )
{
pageflow = value.substring(5);
}
}
- else if (value.startsWith("nest"))
+ else if (value.startsWith("nested"))
{
- propagationType = PropagationType.NEST;
- if ( value.length()>5 )
+ propagationType = PropagationType.NESTED;
+ if ( value.length() > 7 )
{
- pageflow = value.substring(5);
+ pageflow = value.substring(7);
}
}
else
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/core/Manager.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/core/Manager.java 2010-10-11 14:02:40 UTC (rev 13828)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/core/Manager.java 2010-10-12 11:33:52 UTC (rev 13829)
@@ -514,7 +514,7 @@
/**
* Look for a conversation propagation style in the request
- * parameters and begin, nest or join the conversation,
+ * parameters and begin, nested or join the conversation,
* as necessary.
*
* @param parameters the request parameters
@@ -553,7 +553,7 @@
}
}
break;
- case NEST:
+ case NESTED:
if ( isLongRunningOrNestedConversation() )
{
beginNestedConversation();
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/core/PropagationType.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/core/PropagationType.java 2010-10-11 14:02:40 UTC (rev 13828)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/core/PropagationType.java 2010-10-12 11:33:52 UTC (rev 13829)
@@ -9,7 +9,7 @@
{
BEGIN,
JOIN,
- NEST,
+ NESTED,
NONE,
END,
ENDROOT
Modified: branches/community/Seam_2_2/ui/src/main/config/component/conversationPropagation.xml
===================================================================
--- branches/community/Seam_2_2/ui/src/main/config/component/conversationPropagation.xml 2010-10-11 14:02:40 UTC (rev 13828)
+++ branches/community/Seam_2_2/ui/src/main/config/component/conversationPropagation.xml 2010-10-12 11:33:52 UTC (rev 13829)
@@ -34,7 +34,7 @@
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>determines the conversation propagation style: begin, join, nest, none, end or endRoot.</description>
+ <description>determines the conversation propagation style: begin, join, nested, none, end or endRoot.</description>
<defaultvalue>"none"</defaultvalue>
</property>
</component>
13 years, 7 months
Seam SVN: r13828 - in branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226: doc/reference/en/modules and 7 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-10-11 10:02:40 -0400 (Mon, 11 Oct 2010)
New Revision: 13828
Added:
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-compiler-3.0.6.jar
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-core-3.0.6.jar
Removed:
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-compiler-3.0.5.jar
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-core-3.0.5.jar
Modified:
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/.classpath
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/doc/reference/en/modules/security.xml
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/drools/resources/META-INF/application.xml
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seambay/resources/META-INF/application.xml
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seamspace/resources/META-INF/application.xml
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/wiki/Wiki.iml
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/build-scripts/.classpath
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/resources/META-INF/application.xml
Log:
JBPAPP-5226
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/.classpath
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/.classpath 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/.classpath 2010-10-11 14:02:40 UTC (rev 13828)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main"/>
- <classpathentry kind="src" path="examples/itext/src"/>
<classpathentry kind="src" path="src/remoting"/>
<classpathentry kind="src" path="src/ioc"/>
<classpathentry kind="src" path="src/mail"/>
@@ -27,8 +26,6 @@
<classpathentry kind="lib" path="lib/jsf-impl.jar"/>
<classpathentry kind="lib" path="lib/ant.jar"/>
<classpathentry kind="lib" path="embedded-ejb/conf"/>
- <classpathentry kind="lib" path="drools/lib/drools-compiler-3.0.5.jar"/>
- <classpathentry kind="lib" path="drools/lib/drools-core-3.0.5.jar"/>
<classpathentry kind="lib" path="lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="lib/mail.jar"/>
<classpathentry kind="lib" path="lib/jbpm-3.1.4.jar"/>
@@ -41,5 +38,7 @@
<classpathentry kind="lib" path="lib/jsp-api.jar"/>
<classpathentry kind="lib" path="examples/itext/lib/jfreechart.jar"/>
<classpathentry kind="lib" path="drools/lib/janino-2.4.3.jar"/>
+ <classpathentry kind="lib" path="drools/lib/drools-compiler-3.0.6.jar"/>
+ <classpathentry kind="lib" path="drools/lib/drools-core-3.0.6.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/doc/reference/en/modules/security.xml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/doc/reference/en/modules/security.xml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/doc/reference/en/modules/security.xml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -56,20 +56,32 @@
<itemizedlist>
<listitem>
- <para>drools-compiler-4.0.2.jar</para>
+ <para>drools-compiler-3.0.6.jar</para>
</listitem>
<listitem>
- <para>drools-core-4.0.2.jar</para>
+ <para>drools-core-3.0.6.jar</para>
</listitem>
<listitem>
- <para>janino-2.5.10.jar</para>
- </listitem>
+ <para>commons-jci-core-1.0-406301.jar</para>
+ </listitem>
<listitem>
- <para>antlr-runtime-3.0.jar</para>
- </listitem>
+ <para>commons-jci-janino-2.4.3.jar</para>
+ </listitem>
<listitem>
- <para>mvel-1.2.22-java1.4.jar</para>
+ <para>commons-lang-2.1.jar</para>
</listitem>
+ <listitem>
+ <para>janino-2.4.3.jar</para>
+ </listitem>
+ <listitem>
+ <para>stringtemplate-2.3b6.jar</para>
+ </listitem>
+ <listitem>
+ <para>antlr-2.7.6.jar</para>
+ </listitem>
+ <listitem>
+ <para>antlr-3.0ea8.jar</para>
+ </listitem>
</itemizedlist>
<para>
Deleted: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-compiler-3.0.5.jar
===================================================================
(Binary files differ)
Added: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-compiler-3.0.6.jar
===================================================================
(Binary files differ)
Property changes on: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-compiler-3.0.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-core-3.0.5.jar
===================================================================
(Binary files differ)
Added: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-core-3.0.6.jar
===================================================================
(Binary files differ)
Property changes on: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/drools/lib/drools-core-3.0.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/drools/resources/META-INF/application.xml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/drools/resources/META-INF/application.xml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/drools/resources/META-INF/application.xml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -30,10 +30,10 @@
</module>
<module>
- <java>drools-compiler-3.0.5.jar</java>
+ <java>drools-compiler-3.0.6.jar</java>
</module>
<module>
- <java>drools-core-3.0.5.jar</java>
+ <java>drools-core-3.0.6.jar</java>
</module>
<module>
<java>antlr-2.7.6.jar</java>
@@ -57,4 +57,4 @@
<java>stringtemplate-2.3b6.jar</java>
</module>
-</application>
\ No newline at end of file
+</application>
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seambay/resources/META-INF/application.xml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seambay/resources/META-INF/application.xml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seambay/resources/META-INF/application.xml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -22,11 +22,11 @@
</module>
<module>
- <java>drools-compiler-3.0.5.jar</java>
+ <java>drools-compiler-3.0.6.jar</java>
</module>
<module>
- <java>drools-core-3.0.5.jar</java>
+ <java>drools-core-3.0.6.jar</java>
</module>
<module>
@@ -61,4 +61,4 @@
<java>jcaptcha-all-1.0-RC4.jar</java>
</module>
-</application>
\ No newline at end of file
+</application>
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seamspace/resources/META-INF/application.xml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seamspace/resources/META-INF/application.xml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/seamspace/resources/META-INF/application.xml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -27,11 +27,11 @@
</module>
<module>
- <java>drools-compiler-3.0.5.jar</java>
+ <java>drools-compiler-3.0.6.jar</java>
</module>
<module>
- <java>drools-core-3.0.5.jar</java>
+ <java>drools-core-3.0.6.jar</java>
</module>
<module>
@@ -66,4 +66,4 @@
<java>jcaptcha-all-1.0-RC4.jar</java>
</module>
-</application>
\ No newline at end of file
+</application>
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/wiki/Wiki.iml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/wiki/Wiki.iml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/examples/wiki/Wiki.iml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -386,7 +386,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../drools/lib/drools-compiler-3.0.5.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../drools/lib/drools-compiler-3.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -467,7 +467,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../drools/lib/drools-core-3.0.5.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../drools/lib/drools-core-3.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -558,13 +558,13 @@
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/drools-compiler-3.0.5.jar" />
- <url>jar://$MODULE_DIR$/../../drools/lib/drools-compiler-3.0.5.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/drools-compiler-3.0.6.jar" />
+ <url>jar://$MODULE_DIR$/../../drools/lib/drools-compiler-3.0.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/lib/drools-core-3.0.5.jar" />
- <url>jar://$MODULE_DIR$/../../drools/lib/drools-core-3.0.5.jar!/</url>
+ <attribute name="URI" value="/WEB-INF/lib/drools-core-3.0.6.jar" />
+ <url>jar://$MODULE_DIR$/../../drools/lib/drools-core-3.0.6.jar!/</url>
</containerElement>
<containerElement type="library" level="module">
<attribute name="method" value="1" />
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/build-scripts/.classpath
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/build-scripts/.classpath 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/build-scripts/.classpath 2010-10-11 14:02:40 UTC (rev 13828)
@@ -13,8 +13,8 @@
<classpathentry kind="lib" path="lib/jboss-seam.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam-debug.jar"/>
<classpathentry kind="lib" path="lib/jbpm-3.1.4.jar"/>
- <classpathentry kind="lib" path="lib/drools-core-3.0.5.jar"/>
- <classpathentry kind="lib" path="lib/drools-compiler-3.0.5.jar"/>
+ <classpathentry kind="lib" path="lib/drools-core-3.0.6.jar"/>
+ <classpathentry kind="lib" path="lib/drools-compiler-3.0.6.jar"/>
<classpathentry kind="lib" path="lib/janino-2.4.3.jar"/>
<classpathentry kind="lib" path="lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="lib/antlr-3.0ea8.jar"/>
Modified: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/resources/META-INF/application.xml
===================================================================
--- branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/resources/META-INF/application.xml 2010-10-11 11:56:02 UTC (rev 13827)
+++ branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/seam-gen/resources/META-INF/application.xml 2010-10-11 14:02:40 UTC (rev 13828)
@@ -32,10 +32,10 @@
<!-- Drools and dependencies -->
<module>
- <java>drools-core-3.0.5.jar</java>
+ <java>drools-core-3.0.6.jar</java>
</module>
<module>
- <java>drools-compiler-3.0.5.jar</java>
+ <java>drools-compiler-3.0.6.jar</java>
</module>
<module>
<java>janino-2.4.3.jar</java>
13 years, 7 months
Seam SVN: r13827 - branches/enterprise.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-10-11 07:56:02 -0400 (Mon, 11 Oct 2010)
New Revision: 13827
Added:
branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226/
Log:
EAP 4.2/4.3 branch for JBPAPP-5226 - Seam 1.2.1.AP
Copied: branches/enterprise/JBPAPP_4_2_CP09-JBPAPP-5226 (from rev 13826, tags/JBPAPP_4_2_CP09)
13 years, 7 months
Seam SVN: r13826 - in modules/xml/trunk/impl/src: main/resources/META-INF/services and 1 other directories.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-11 06:52:59 -0400 (Mon, 11 Oct 2010)
New Revision: 13826
Added:
modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider
modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider
Removed:
modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
Modified:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
Log:
minor
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-10-11 09:30:58 UTC (rev 13825)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-10-11 10:52:59 UTC (rev 13826)
@@ -63,7 +63,7 @@
private AnnotationInstanceProvider annotationInstanceProvider = new AnnotationInstanceProvider();
- static final String PROVIDERS_FILE = "META-INF/services/org.jboss.seam.xml.XmlExtension";
+ static final String PROVIDERS_FILE = "META-INF/services/" + XmlDocumentProvider.class.getName();
private List<XmlResult> results = new ArrayList<XmlResult>();
Deleted: modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
===================================================================
--- modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-10-11 09:30:58 UTC (rev 13825)
+++ modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-10-11 10:52:59 UTC (rev 13826)
@@ -1 +0,0 @@
-org.jboss.seam.xml.bootstrap.ResourceLoaderXmlDocumentProvider
\ No newline at end of file
Copied: modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider (from rev 13815, modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.XmlExtension)
===================================================================
--- modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider (rev 0)
+++ modules/xml/trunk/impl/src/main/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider 2010-10-11 10:52:59 UTC (rev 13826)
@@ -0,0 +1 @@
+org.jboss.seam.xml.bootstrap.ResourceLoaderXmlDocumentProvider
\ No newline at end of file
Deleted: modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
===================================================================
--- modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-10-11 09:30:58 UTC (rev 13825)
+++ modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-10-11 10:52:59 UTC (rev 13826)
@@ -1 +0,0 @@
-org.jboss.seam.xml.test.SimpleXmlProvider
\ No newline at end of file
Copied: modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider (from rev 13815, modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension)
===================================================================
--- modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider (rev 0)
+++ modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.bootstrap.XmlDocumentProvider 2010-10-11 10:52:59 UTC (rev 13826)
@@ -0,0 +1 @@
+org.jboss.seam.xml.test.SimpleXmlProvider
\ No newline at end of file
13 years, 7 months
Seam SVN: r13825 - modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-11 05:30:58 -0400 (Mon, 11 Oct 2010)
New Revision: 13825
Modified:
modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
Log:
make the SMPC PassivationCapable
Modified: modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java
===================================================================
--- modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java 2010-10-11 09:10:41 UTC (rev 13824)
+++ modules/persistence/trunk/impl/src/main/java/org/jboss/seam/persistence/ManagedPersistenceContextExtension.java 2010-10-11 09:30:58 UTC (rev 13825)
@@ -35,6 +35,7 @@
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.AnnotatedCallable;
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedMember;
import javax.enterprise.inject.spi.AnnotatedMethod;
@@ -58,6 +59,7 @@
import org.jboss.weld.extensions.literal.DefaultLiteral;
import org.jboss.weld.extensions.reflection.Reflections;
import org.jboss.weld.extensions.reflection.annotated.AnnotatedTypeBuilder;
+import org.jboss.weld.extensions.reflection.annotated.Annotateds;
import org.jboss.weld.extensions.util.service.ServiceLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -285,6 +287,19 @@
builder.getTypes().add(Object.class);
builder.beanLifecycle(lifecycle);
builder.alternative(alternative);
+ StringBuilder id = new StringBuilder("SMPC-" + ManagedPersistenceContextExtension.class.getName() + "-");
+ if (member instanceof AnnotatedField<?>)
+ {
+ AnnotatedField<?> field = (AnnotatedField<?>) member;
+ id.append(Annotateds.createFieldId(field));
+ }
+ else
+ {
+ AnnotatedCallable<?> method = (AnnotatedCallable<?>) member;
+ id.append(Annotateds.createCallableId(method));
+ }
+ builder.id(id.toString());
+ builder.passivationCapable(true);
builder.toString("Seam Managed Persistence Context with qualifiers [" + qualifiers + "] with configured by [" + member + "] on class [" + declaringClass + "]");
beans.add(builder.create());
}
13 years, 7 months
Seam SVN: r13824 - modules/persistence/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-10-11 05:10:41 -0400 (Mon, 11 Oct 2010)
New Revision: 13824
Modified:
modules/persistence/trunk/docs/src/main/docbook/en-US/persistence-general.xml
Log:
work on seam-persistence documentation
Modified: modules/persistence/trunk/docs/src/main/docbook/en-US/persistence-general.xml
===================================================================
--- modules/persistence/trunk/docs/src/main/docbook/en-US/persistence-general.xml 2010-10-11 07:24:25 UTC (rev 13823)
+++ modules/persistence/trunk/docs/src/main/docbook/en-US/persistence-general.xml 2010-10-11 09:10:41 UTC (rev 13824)
@@ -78,14 +78,178 @@
</para>
</section>
+
+ <section id="persistence.transactions" >
+ <title>Transaction Management</title>
+
+ <para>
+ Unlike EJB session beans CDI beans are not transactional by default. Seam
+ brings declarative transaction management to CDI beans by enabling them to
+ use <code>@TransactionAttribute</code>. Seam also provides the
+ <code>@Transactional</code> annotation, for environments where java EE
+ APIs are not present.
+ </para>
+ <section>
+ <title>Configuration</title>
+ <para>
+ If you are in an EE 6 environment then no configuration is necessary,
+ simply drop the seam-persistence jar into your app and you are ready
+ to go.
+ </para>
+ <para>
+ If you are not in an EE environment you may need to configure some
+ things with seam-xml. You may need the following entries in your
+ beans.xml file:
+ </para>
+ <programlisting role="XML"><![CDATA[<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:ee"
+ xmlns:t="urn:java:org.jboss.seam.persistence.transaction"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://docs.jboss.org/cdi/beans_1_0.xsd">
+ <t:SeSynchronizations>
+ <s:modifies/>
+ </t:SeSynchronizations>
+
+ <t:EntityTransaction>
+ <s:modifies />
+ </t:EntityTransaction>
+
+</beans>]]></programlisting>
+ <para>
+ Lets look at these individually.
+ </para>
+
+ <programlisting role="XML"><![CDATA[<t:SeSynchronizations>
+ <s:modifies/>
+</t:SeSynchronizations>]]></programlisting>
+
+ <para>
+ Seam will attempt to use JTA synchronizations if possible. If not then you need to install the
+ <code>SeSynchronzations</code> bean to allow seam to handle synchronizations manually.
+ Synchronizations allow seam to respond to transaction events such as
+ <literal>beforeCompletion()</literal> and <literal>afterCompletion()</literal>, and are needed
+ for the proper operation of the
+ <link linkend="persistence.seam-managed-persistence-contexts">Seam Managed Persistence Context</link>.
+ </para>
+
+ <programlisting role="XML"><![CDATA[<t:EntityTransaction>
+ <s:modifies />
+</t:EntityTransaction>]]></programlisting>
+
+ <para>
+ By default seam will attempt to look up <literal>java:comp/UserTransaction</literal> from JNDI
+ (or alternatively retrieve it from the EJBContext if a container managed transaction is active).
+ Installing <code>EntityTransaction</code> tells seam to use the JPA <code>EntityTransaction</code>
+ instead. To use this you must have a
+ <link linkend="persistence.seam-managed-persistence-contexts">Seam Managed Persistence Context</link>
+ installed with qualifier <code>@Default</code>.
+ </para>
+ <para>
+ TODO: document how to use different qualifiers.
+ </para>
+ <note>
+ <para>
+ You should avoid <code>EntityTransaction</code> if you have more than one persistence unit in your
+ application. Seam does not support installing multiple <code>EntityTransaction</code> beans, and
+ the <code>EntityTransaction</code> interface does not support two phase commit, so unless you are
+ careful you may have data consistency issues. If you need multiple persistence units in your
+ application then we highly recommend using an EE 6 compatible server, such as Jboss 6.
+ </para>
+ </note>
+
+ </section>
+
+ <section>
+ <title>Declarative Transaction Management</title>
+
+ <para>
+ Seam adds declarative transaction support to managed beans. Seam re-uses the EJB
+ <code>@TransactionAttribute</code> for this purpose, however it also provides
+ an alternative <code>@Transactional</code> annotation for environments where
+ the EJB API's are not available. An alternative to <code>@ApplicationException</code>,
+ <code>@SeamApplicationException</code> is also provided. Unlike EJBs managed beans
+ are not transactional by default, you can change this by adding the
+ <code>@TransactionAttribute</code> to the bean class.
+ </para>
+
+ <para>
+ If you are using seam managed transactions you do not need to worry about declarative
+ transaction management. Seam will automatically start a transaction for you at the
+ start of the faces request, and commit it before the render response phase.
+ </para>
+
+ <warning>
+ <para>
+ <code>@SeamApplicationException</code> will not control transaction rollback
+ when using EJB container managed transactions. If you are in an EE environment
+ then you should always use the EJB API's, namely <code>@TransactionAttribute</code>
+ and <code>@ApplicationException</code>.
+ </para>
+ </warning>
+ <note>
+ <para>
+ <code>TransactionAttributeType.REQUIRES_NEW</code> and
+ <code>TransactionAttributeType.NOT_SUPPORTED</code> are not yet supported on managed
+ beans. This will be added before seam-persistence goes final.
+ </para>
+ </note>
+ <para>
+ Lets have a look at some code. Annotations applied at a method level override annotations
+ applied at the class level.
+ </para>
+ <programlisting role="JAVA">@TransactionAttribute /*Defaults to TransactionAttributeType.REQUIRED */
+class TransactionaBean
+{
+
+ /* This is a transactional method, when this method is called a transaction
+ * will be started if one does not already exist.
+ * This behavior is inherited from the @TransactionAttribute annotation on
+ * the class.
+ */
+ void doWork()
+ {
+ ...
+ }
+
+ /* This a transaction will not be started for this method, however it */
+ /* will not complain if there is an existing transaction active. */
+ @TransactionAttributeType(TransactionAttributeType.SUPPORTED)
+ void doMoreWork()
+ {
+ ...
+ }
+
+ /* This method will throw an exception if there is no transaction active when */
+ /* it is invoked. */
+
+ @TransactionAttributeType(TransactionAttributeType.MANDATORY)
+ void doEvenMoreWork()
+ {
+ ...
+ }
+
+ /* This method will throw an exception if there is a transaction active when */
+ /* it is invoked. */
+ @TransactionAttributeType(TransactionAttributeType.NOT_SUPPORTED)
+ void doOtherWork()
+ {
+ ...
+ }
+} </programlisting>
+ </section>
+
+ </section>
+
<section id="persistence.seam-managed-persistence-contexts">
<title>Seam-managed persistence contexts</title>
<para>
- If you're using Seam outside of a Java EE 5 environment, you can't rely upon the
+ If you're using Seam outside of a Java EE environment, you can't rely upon the
container to manage the persistence context lifecycle for you. Even if you are
- in an EE 5 environment, you might have a complex application with many loosely
+ in an EE environment, you might have a complex application with many loosely
coupled components that collaborate together in the scope of a single conversation,
and in this case you might find that propagation of the persistence context between
component is tricky and error-prone.
@@ -109,27 +273,36 @@
EntityManagerFactory producerField;
</programlisting>
<para>
- This is just an ordinary resource producer field as defined by the CDI specification, however the presence of the <literal>@SeamManaged</literal>
- annotation tells seam to create a seam managed persistence context from this <literal>EntityManagerFactory</literal>. This managed
- persistence context can be injected normally, and has the same scope and qualifiers that are specified on the resource producer field.
+ This is just an ordinary resource producer field as defined by the CDI
+ specification, however the presence of the <literal>@SeamManaged</literal>
+ annotation tells seam to create a seam managed persistence context from
+ this <literal>EntityManagerFactory</literal>. This managed
+ persistence context can be injected normally, and has the same scope and
+ qualifiers that are specified on the resource producer field.
</para>
<para>
- This will work even in a SE environment where <code>@PersistenceUnit</code> injection is not normally supported. This is because
- the seam persistence extensions will bootstrap the <code>EntityManagerFactory</code> for you.
+ This will work even in a SE environment where <code>@PersistenceUnit</code>
+ injection is not normally supported. This is because the seam persistence
+ extensions will bootstrap the <code>EntityManagerFactory</code> for you.
</para>
- <note>
- <para>
- The more eagle eyed among you may have noticed that the resource producer field appears to be conversation scoped, which the CDI
- specification does not require containers to support. This is in fact not the case, as the @ConversationScoped annotation is removed
- by the seam persistence portable extension. It only specifies the scope of the created SMPC, not the EntityManagerFactory.
- </para>
- </note>
+
<para>
Now we can have our <literal>EntityManager</literal> injected using:
</para>
<programlisting role="JAVA"><![CDATA[@Inject EntityManager entityManager;]]></programlisting>
+ <note>
+ <para>
+ The more eagle eyed among you may have noticed that the resource producer
+ field appears to be conversation scoped, which the CDI specification does
+ not require containers to support. This is actually not the case, as the
+ @ConversationScoped annotation is removed by the seam persistence portable
+ extension. It only specifies the scope of the created SMPC, not the
+ EntityManagerFactory.
+ </para>
+ </note>
+
<warning>
<para>
If you are using EJB3 and mark your class or method
@@ -159,7 +332,7 @@
<para>
As with any optimistic transaction management, transaction isolation and consistency
can be achieved via use of optimistic locking. Fortunately, both Hibernate and EJB
- 3.0 make it very easy to use optimistic locking, by providing the
+ 3.1 make it very easy to use optimistic locking, by providing the
<literal>@Version</literal> annotation.
</para>
@@ -168,13 +341,11 @@
at the end of each transaction. This is sometimes the desired behavior. But very
often, we would prefer that all changes are held in memory and only written to
the database when the conversation ends successfully. This allows for truly
- atomic conversations. As the result of a truly stupid and shortsighted decision
- by certain non-JBoss, non-Sun and non-Sybase members of the EJB 3.0 expert group,
- there is currently no simple, usable and portable way to implement atomic
- conversations using EJB 3.0 persistence. However, Hibernate provides this feature
- as a vendor extension to the <literal>FlushModeType</literal>s defined by the
- specification, and it is our expectation that other vendors will soon provide
- a similar extension.
+ atomic conversations. Unfortunately there is currently no simple, usable and
+ portable way to implement atomic conversations using EJB 3.1 persistence.
+ However, Hibernate provides this feature as a vendor extension to the
+ <literal>FlushModeType</literal>s defined by the specification, and it is
+ our expectation that other vendors will soon provide a similar extension.
</para>
<para>
@@ -187,7 +358,7 @@
TODO: The next section needs to be updated to seam 3.
</para>
- <programlisting role="JAVA"><![CDATA[@In EntityManager em; //a Seam-managed persistence context
+ <programlisting role="JAVA"><![CDATA[@Inject EntityManager em; //a Seam-managed persistence context
@Begin(flushMode=MANUAL)
public void beginClaimWizard() {
@@ -282,7 +453,6 @@
session.enableFilter("myfilter");
}
</programlisting>
-
</section>
</section>
13 years, 7 months
Seam SVN: r13823 - branches/community/Seam_2_2/src/test/ftest.
by seam-commits@lists.jboss.org
Author: plenyi(a)redhat.com
Date: 2010-10-11 03:24:25 -0400 (Mon, 11 Oct 2010)
New Revision: 13823
Modified:
branches/community/Seam_2_2/src/test/ftest/build.xml
Log:
JBQA-3275 Minor changes and quick bug fixes.
Modified: branches/community/Seam_2_2/src/test/ftest/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-10 16:49:49 UTC (rev 13822)
+++ branches/community/Seam_2_2/src/test/ftest/build.xml 2010-10-11 07:24:25 UTC (rev 13823)
@@ -46,98 +46,11 @@
</path>
<!-- TODO : should the libs be in seam/lib and managed with mvn? -->
- <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="../../../lib/groovy-all.jar"/>
+ <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="../../../lib/ftest/groovy-all.jar"/>
<target name="testall" description="Run functional testsuite based on container property">
<fail unless="container">Please set container property.</fail>
<antcall target="testall.${container}" />
- <echo message="Rewriting ftest output xml files." />
- <groovy>
- <classpath>
- <pathelement location="../../../lib/ftest/xmlunit.jar" />
- </classpath>
- <![CDATA[
- import org.custommonkey.xmlunit.Diff
- import org.custommonkey.xmlunit.XMLUnit
- import groovy.xml.StreamingMarkupBuilder
-
- def container = System.getProperty("CONTAINER");
- def slurper = new XmlSlurper();
- def builder = new StreamingMarkupBuilder();
- builder.encoding = "UTF-8";
-
- /*
- edit $(SEAM)/test-output/testng-results.xml
- remove elements containing 'setUp' or 'tearDown' - failures incorrectly counted as testcases
- replace 'SKIP' with 'FAIL'
- 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";
- assert xmlFile.exists() && xmlFile.isFile();
-
- def root = slurper.parse(xmlFile);
- def serviceMethods = root.suite.test.class."test-method".findAll { it.@signature == "setUp()" || it.@signature == "tearDown()" }
- serviceMethods.each { it.replaceNode {} }
- def skippedMethods = root.suite.test.class."test-method".findAll { it.@status == "SKIP" }
- skippedMethods.each {
- it.attributes().put("status", "FAIL");
- it.appendNode { exception(class:'java.lang.Error') { message("Deployment in error.") } }
- }
-
- def writer = new FileWriter("../../../test-output/testng-results-edit.xml");
- writer << "<testng-results>";
- writer << builder.bind(root.getBody());
- writer << "</testng-results>";
- writer.close();
-
- ant.delete(file:'../../../test-output/testng-results.xml');
- ant.move(file:'../../../test-output/testng-results-edit.xml',tofile:'../../../test-output/testng-results.xml');
-
- /*
- for each ${SEAM}/${EXAMPLE} example/
- edit ${SEAM}/${EXAMPLE} example/${EXAMPLE}_${CONTAINER}.xml
- remove elements containing '@' - beforeMethod and afterMethod failures incorrectly counted as testcases
- replace '<skipped />' with '<failure message="Test skipped." type="java.lang.Error" />'
- */
- 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];
- }
- }
- 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);
- }
- }
- ]]>
- </groovy>
</target>
<target name="testall.jboss4" description="Run functional testsuite for JBoss 4">
@@ -177,6 +90,7 @@
<testexample name="wicket-runtime" />
<antcall target="stop.selenium.server" />
<antcall target="stop.container" />
+ <testoutRewrite container="${container}" />
</target>
<target name="testall.jboss5" description="Run functional testsuite for JBoss 5">
@@ -222,6 +136,7 @@
<testexample name="wicket-runtime" />
<antcall target="stop.selenium.server" />
<antcall target="stop.container" />
+ <testoutRewrite container="${container}" />
</target>
<target name="testall.jboss-embedded" description="Run functional testsuite for JBoss Embedded">
@@ -240,6 +155,7 @@
<testexample name="jpa" />
<testexample name="hibernate" />
<antcall target="stop.selenium.server" />
+ <testoutRewrite container="${container}" />
</target>
<target name="testall.tomcat6" description="Run functional testsuite for Tomcat 6">
@@ -251,118 +167,36 @@
<testexample name="hibernate" />
<antcall target="stop.selenium.server" />
+ <testoutRewrite container="${container}" />
</target>
<target name="test" description="Run tests for single example. Container selection is based on the value of container property">
<fail unless="container">Please set container property.</fail>
<antcall target="test.${container}" />
- <echo message="Rewriting ftest output xml files." />
- <groovy>
- <classpath>
- <pathelement location="../../../lib/ftest/xmlunit.jar" />
- </classpath>
- <![CDATA[
- import org.custommonkey.xmlunit.Diff
- import org.custommonkey.xmlunit.XMLUnit
- import groovy.xml.StreamingMarkupBuilder
-
- def container = System.getProperty("CONTAINER");
- def slurper = new XmlSlurper();
- def builder = new StreamingMarkupBuilder();
- builder.encoding = "UTF-8";
-
- /*
- edit $(SEAM)/test-output/testng-results.xml
- remove elements containing 'setUp' or 'tearDown' - failures incorrectly counted as testcases
- replace 'SKIP' with 'FAIL'
- 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";
- assert xmlFile.exists() && xmlFile.isFile();
-
- def root = slurper.parse(xmlFile);
- def serviceMethods = root.suite.test.class."test-method".findAll { it.@signature == "setUp()" || it.@signature == "tearDown()" }
- serviceMethods.each { it.replaceNode {} }
- def skippedMethods = root.suite.test.class."test-method".findAll { it.@status == "SKIP" }
- skippedMethods.each {
- it.attributes().put("status", "FAIL");
- it.appendNode { exception(class:'java.lang.Error') { message("Deployment in error.") } }
- }
-
- def writer = new FileWriter("../../../test-output/testng-results-edit.xml");
- writer << "<testng-results>";
- writer << builder.bind(root.getBody());
- writer << "</testng-results>";
- writer.close();
-
- ant.delete(file:'../../../test-output/testng-results.xml');
- ant.move(file:'../../../test-output/testng-results-edit.xml',tofile:'../../../test-output/testng-results.xml');
-
- /*
- for each ${SEAM}/${EXAMPLE} example/
- edit ${SEAM}/${EXAMPLE} example/${EXAMPLE}_${CONTAINER}.xml
- remove elements containing '@' - beforeMethod and afterMethod failures incorrectly counted as testcases
- replace '<skipped />' with '<failure message="Test skipped." type="java.lang.Error" />'
- */
- 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];
- }
- }
- 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);
- }
- }
- ]]>
- </groovy>
</target>
<target name="test.jboss4" description="Run tests for single example on JBoss 4">
<property name="container" value="jboss4" />
<antcall target="test.single.example" />
+ <testoutRewrite container="${container}" />
</target>
<target name="test.jboss5" description="Run tests for single example on JBoss 5">
<property name="container" value="jboss5" />
<antcall target="test.single.example" />
+ <testoutRewrite container="${container}" />
</target>
<target name="test.tomcat6" description="Run tests for single example on Tomcat 6">
<property name="container" value="tomcat6" />
<antcall target="test.single.example" />
+ <testoutRewrite container="${container}" />
</target>
<target name="test.jboss-embedded" description="Run tests for single example on JBoss Embedded">
<property name="container" value="jboss-embedded" />
<antcall target="test.single.example" />
+ <testoutRewrite container="${container}" />
</target>
<target name="test.single.example">
@@ -556,6 +390,100 @@
<property name="container" value="${container}" />
</ant>
</target>
+
+ <macrodef name="testoutRewrite">
+ <attribute name="container" />
+ <sequential>
+ <echo message="Rewriting ftest output xml files." />
+ <groovy>
+ <arg value="@{container}" />
+ <classpath>
+ <pathelement location="../../../lib/ftest/xmlunit.jar" />
+ </classpath>
+ <![CDATA[
+ import org.custommonkey.xmlunit.Diff
+ import org.custommonkey.xmlunit.XMLUnit
+ import groovy.xml.StreamingMarkupBuilder
+ def container = args[0];
+ def slurper = new XmlSlurper();
+ def builder = new StreamingMarkupBuilder();
+ builder.encoding = "UTF-8";
+
+ /*
+ edit $(SEAM)/test-output/testng-results.xml
+ remove elements containing 'setUp' or 'tearDown' - failures incorrectly counted as testcases
+ replace 'SKIP' with 'FAIL'
+ 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";
+ assert xmlFile.exists() && xmlFile.isFile();
+
+ def root = slurper.parse(xmlFile);
+ def serviceMethods = root.suite.test.class."test-method".findAll { it.@signature == "setUp()" || it.@signature == "tearDown()" }
+ serviceMethods.each { it.replaceNode {} }
+ def skippedMethods = root.suite.test.class."test-method".findAll { it.@status == "SKIP" }
+ skippedMethods.each {
+ it.attributes().put("status", "FAIL");
+ it.appendNode { exception(class:'java.lang.Error') { message("Deployment in error.") } }
+ }
+
+ def writer = new FileWriter("../../../test-output/testng-results-edit.xml");
+ writer << "<testng-results>";
+ writer << builder.bind(root.getBody());
+ writer << "</testng-results>";
+ writer.close();
+
+ ant.delete(file:'../../../test-output/testng-results.xml');
+ ant.move(file:'../../../test-output/testng-results-edit.xml',tofile:'../../../test-output/testng-results.xml');
+
+ /*
+ for each ${SEAM}/${EXAMPLE} example/
+ edit ${SEAM}/${EXAMPLE} example/${EXAMPLE}_${CONTAINER}.xml
+ remove elements containing '@' - beforeMethod and afterMethod failures incorrectly counted as testcases
+ replace '<skipped />' with '<failure message="Test skipped." type="java.lang.Error" />'
+ */
+ 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];
+ }
+ }
+ 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);
+ }
+ }
+ ]]>
+ </groovy>
+ </sequential>
+ </macrodef>
+
</project>
13 years, 7 months