[seam-commits] Seam SVN: r14998 - in branches/community/Seam_2_3: seam-integration-tests/src/test/java/org/jboss/seam/test/integration and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Jul 24 09:26:32 EDT 2012
Author: manaRH
Date: 2012-07-24 09:26:31 -0400 (Tue, 24 Jul 2012)
New Revision: 14998
Added:
branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components.xml
Log:
JBSEAM-3138 fixed Initialization and added isolated components-precedence.xml
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java 2012-07-24 12:14:28 UTC (rev 14997)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java 2012-07-24 13:26:31 UTC (rev 14998)
@@ -561,7 +561,7 @@
{
return true;
}
- return precedence > highestPriorityDescriptor.getPrecedence();
+ return precedence >= highestPriorityDescriptor.getPrecedence();
}
else
{
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java 2012-07-24 12:14:28 UTC (rev 14997)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java 2012-07-24 13:26:31 UTC (rev 14998)
@@ -87,4 +87,28 @@
.addAsWebInfResource("WEB-INF/web.xml", "web.xml")
.addAsWebInfResource("WEB-INF/ejb-jar.xml", "ejb-jar.xml");
}
+
+ public static WebArchive defaultSeamDeployment(String customComponentsXml) {
+ return ShrinkWrap.create(ZipImporter.class, "test.war").importFrom(new File("target/seam-integration-tests.war")).as(WebArchive.class)
+ .addAsWebInfResource(new StringAsset(
+ "<jboss-deployment-structure>" +
+ "<deployment>" +
+ "<dependencies>" +
+ "<module name=\"org.javassist\"/>" +
+ "<module name=\"org.dom4j\"/>" +
+ "</dependencies>" +
+ "</deployment>" +
+ "</jboss-deployment-structure>"), "jboss-deployment-structure.xml")
+ .addAsResource("seam.properties")
+ .addAsResource("components.properties")
+ .addAsResource("messages_en.properties")
+ .addAsResource("META-INF/persistence.xml")
+
+ .addAsResource("hibernate.cfg.xml")
+ .addAsWebInfResource(customComponentsXml, "components.xml")
+ .addAsWebInfResource("WEB-INF/pages.xml", "pages.xml")
+ .addAsWebInfResource("WEB-INF/web.xml", "web.xml")
+ .addAsWebInfResource("WEB-INF/ejb-jar.xml", "ejb-jar.xml")
+ .addAsWebInfResource("WEB-INF/jboss-seam-integration-tests-hornetq-jms.xml", "jboss-seam-integration-tests-hornetq-jms.xml");
+ }
}
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-24 12:14:28 UTC (rev 14997)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-24 13:26:31 UTC (rev 14998)
@@ -18,7 +18,7 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- return Deployments.defaultSeamDeployment()
+ return Deployments.defaultSeamDeployment("WEB-INF/components-precedence.xml")
.addClasses(Component1.class, Component2.class);
}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml 2012-07-24 13:26:31 UTC (rev 14998)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.org/schema/seam/components"
+ xmlns:core="http://jboss.org/schema/seam/core"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd">
+
+ <core:init debug="false" jndi-pattern="java:app/test/#{ejbName}" />
+
+ <component name="component1" class="org.jboss.seam.test.integration.Component2" precedence="30">
+ <property name="name">Component1High</property>
+ </component>
+
+ <component name="component1" class="org.jboss.seam.test.integration.Component1" precedence="10">
+ <property name="name">Component1Low</property>
+ </component>
+
+</components>
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components.xml 2012-07-24 12:14:28 UTC (rev 14997)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components.xml 2012-07-24 13:26:31 UTC (rev 14998)
@@ -41,12 +41,6 @@
<jms:managed-queue-sender name="testSender"
auto-create="true"
- queue-jndi-name="queue/seamTest" />
- <component name="component1" class="org.jboss.seam.test.integration.Component2" precedence="30">
- <property name="name">Component1High</property>
- </component>
- <component name="component1" class="org.jboss.seam.test.integration.Component1" precedence="10">
- <property name="name">Component1Low</property>
- </component>
+ queue-jndi-name="queue/seamTest" />
</components>
More information about the seam-commits
mailing list