Seam SVN: r15076 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 12:24:06 -0400 (Thu, 23 Aug 2012)
New Revision: 15076
Modified:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java
Log:
disable RestoreViewComponentAccessTest, it is broken
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java 2012-08-23 15:57:07 UTC (rev 15075)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java 2012-08-23 16:24:06 UTC (rev 15076)
@@ -15,6 +15,7 @@
import org.jboss.shrinkwrap.api.asset.Asset;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -118,21 +119,25 @@
}
@Test
+ @Ignore
public void testPage() throws Exception {
testBase("page");
}
@Test
+ @Ignore
public void testConversation() throws Exception {
testBase("conversation");
}
@Test
+ @Ignore
public void testSession() throws Exception {
testBase("session");
}
@Test
+ @Ignore
public void testApplication() throws Exception {
testBase("application");
}
12 years, 4 months
Seam SVN: r15075 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 11:57:07 -0400 (Thu, 23 Aug 2012)
New Revision: 15075
Added:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SessionScopedOutjectionOverwriteTest.java
Log:
JBSEAM-4966 test
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SessionScopedOutjectionOverwriteTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SessionScopedOutjectionOverwriteTest.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SessionScopedOutjectionOverwriteTest.java 2012-08-23 15:57:07 UTC (rev 15075)
@@ -0,0 +1,102 @@
+package org.jboss.seam.test.integration.faces;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.test.integration.Deployments;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * Test for JBSEAM-4966
+ */
+(a)RunWith(Arquillian.class)
+@RunAsClient
+public class SessionScopedOutjectionOverwriteTest
+{
+ private final WebClient client = new WebClient();
+
+ @ArquillianResource
+ URL contextPath;
+
+ @Deployment(name="SessionScopedIdlingTest", testable=false)
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ // This is a client test, use a real (non-mocked) Seam deployment
+ return Deployments.realSeamDeployment()
+ .addClasses(Foo.class, Bar.class)
+ .addAsWebResource(new StringAsset(
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"" +
+ " xmlns:h=\"http://java.sun.com/jsf/html\"" +
+ " xmlns:f=\"http://java.sun.com/jsf/core\"" +
+ " xmlns:ui=\"http://java.sun.com/jsf/facelets\">" +
+ "<h:head></h:head>" +
+ "<h:body>" +
+ "<h:form id='form'>" +
+ "<h:outputText value='Output: #{output}.'/>" +
+ "<h:commandButton id='foo' action='#{foo.foo}' value='foo' />" +
+ "<h:commandButton id='bar' action='#{bar.bar}' value='bar' />" +
+ "<h:commandButton id='nop' action='test' value='nop' />" +
+ "</h:form>" +
+ "</h:body>" +
+ "</html>"), "test.xhtml");
+ }
+
+ @Test
+ public void testJBSEAM4966() throws Exception {
+ HtmlPage page = client.getPage(contextPath + "test.seam");
+
+ page = page.getElementById("form:foo").click();
+ assertTrue(page.getBody().getTextContent().contains("Output: foo"));
+
+ page = page.getElementById("form:bar").click();
+ assertTrue(page.getBody().getTextContent().contains("Output: bar"));
+
+ page = page.getElementById("form:nop").click();
+ assertFalse("Output should stay 'bar' after a 'nop' operation.", page.getBody().getTextContent().contains("Output: foo"));
+ assertTrue(page.getBody().getTextContent().contains("Output: bar"));
+ }
+
+ @Scope(ScopeType.SESSION)
+ @Name("foo")
+ public static class Foo
+ {
+ @Out(scope=ScopeType.SESSION)
+ private String output;
+
+ public void foo()
+ {
+ output = "foo";
+ }
+ }
+
+ @Scope(ScopeType.EVENT)
+ @Name("bar")
+ public static class Bar
+ {
+ @Out(scope=ScopeType.SESSION)
+ private String output;
+
+ public void bar()
+ {
+ output = "bar";
+ }
+ }
+}
12 years, 4 months
Seam SVN: r15074 - in branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web: src/main/webapp and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-23 10:27:57 -0400 (Thu, 23 Aug 2012)
New Revision: 15074
Modified:
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml
Log:
JBSEAM-5019 upgraded to 3.1 icefaces
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml 2012-08-23 14:27:46 UTC (rev 15073)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml 2012-08-23 14:27:57 UTC (rev 15074)
@@ -76,7 +76,7 @@
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-compat</artifactId>
- <version>3.0.1</version>
+ <version>3.1.0</version>
<exclusions>
<exclusion>
<artifactId>javax.faces</artifactId>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml 2012-08-23 14:27:46 UTC (rev 15073)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml 2012-08-23 14:27:57 UTC (rev 15074)
@@ -10,7 +10,7 @@
<title>JBoss Suites: Seam Framework</title>
<link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>
-<body>
+<h:body>
<f:view>
<div id="document">
<div id="header">
@@ -79,5 +79,5 @@
<div id="footer">Created with JBoss EJB 3, Seam, JSF 2 and ICEFaces</div>
</div>
</f:view>
-</body>
+</h:body>
</html>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml 2012-08-23 14:27:46 UTC (rev 15073)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml 2012-08-23 14:27:57 UTC (rev 15074)
@@ -2,13 +2,15 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:s="http://jboss.org/schema/seam/taglib">
+ xmlns:s="http://jboss.org/schema/seam/taglib"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JBoss Suites: Seam Framework</title>
<link href="css/screen.css" rel="stylesheet" type="text/css" />
+ <ice:outputStyle href="./xmlhttp/css/xp/xp.css" />
</h:head>
-<body>
+<h:body>
<div id="document">
<div id="header">
@@ -31,5 +33,5 @@
</div>
<div id="footer">Created with JBoss EJB 3, Seam, JSF 2, ICEfaces</div>
</div>
-</body>
+</h:body>
</html>
12 years, 4 months
Seam SVN: r15073 - branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/resources.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-23 10:27:46 -0400 (Thu, 23 Aug 2012)
New Revision: 15073
Modified:
branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/resources/debug.xhtml
Log:
JBSEAM-5019 fixed debug.xhtml template to comply with JSF h:head and
h:body
Modified: branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/resources/debug.xhtml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/resources/debug.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/resources/debug.xhtml 2012-08-23 14:27:46 UTC (rev 15073)
@@ -5,7 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<f:view>
- <head>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JBoss Seam Debug Page</title>
<style type="text/css">
@@ -59,8 +59,8 @@
}
function foo() {}
</script>
- </head>
- <body>
+ </h:head>
+ <h:body>
<h1><h:outputLink value="#{facesContext.externalContext.request.requestURI}">JBoss Seam Debug Page</h:outputLink></h1>
<div>
This page allows you to browse and inspect components in any of the Seam
@@ -250,6 +250,6 @@
</div>
</f:subview>
- </body>
+ </h:body>
</f:view>
</html>
12 years, 4 months
Seam SVN: r15072 - in branches/community/Seam_2_3/examples-ee6/icefaces: icefaces-ear/src/main/application/META-INF and 6 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-23 10:27:35 -0400 (Thu, 23 Aug 2012)
New Revision: 15072
Removed:
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/faces-config.xml
Modified:
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/import.sql
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/book.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/main.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/password.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/register.xhtml
branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml
Log:
JBSEAM-5019 reworked icefaces example
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/pom.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/pom.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -26,6 +26,26 @@
<version>${project.version}</version>
<type>ejb</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <scope>runtime</scope>
+ <type>ejb</type>
+ <exclusions>
+ <exclusion>
+ <artifactId>testng</artifactId>
+ <groupId>org.testng</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>el-api</artifactId>
+ <groupId>javax.el</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
<build>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -5,11 +5,8 @@
<module name="org.dom4j" export="true"/>
<module name="org.apache.commons.logging" export="true"/>
<module name="org.apache.commons.collections" export="true"/>
- <module name="org.slf4j" export="true"/>
- <module name="org.hibernate" export="true"/>
- <module name="org.hibernate.validator" export="true"/>
<module name="javax.faces.api" export="true"/>
- <module name="com.sun.jsf-impl" export="true"/>
+ <module name="com.sun.jsf-impl" export="true"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/pom.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/pom.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -19,11 +19,22 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>testng</artifactId>
+ <groupId>org.testng</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
@@ -45,10 +56,10 @@
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jbpm</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>3.2.3</version>
- </dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.jbpm</groupId> -->
+<!-- <artifactId>jbpm-jpdl</artifactId> -->
+<!-- <version>3.2.3</version> -->
+<!-- </dependency> -->
</dependencies>
</project>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/META-INF/persistence.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/META-INF/persistence.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -10,7 +10,6 @@
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
<!-- These are the default for JBoss EJB3, but not for HEM: -->
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>
</persistence-unit>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/import.sql
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/import.sql 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-ejb/src/main/resources/import.sql 2012-08-23 14:27:35 UTC (rev 15072)
@@ -9,7 +9,7 @@
insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'MarriottDowntown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
+insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'Marriott Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
@@ -19,4 +19,4 @@
insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250, 'Meli� White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
\ No newline at end of file
+insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/pom.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -36,14 +36,34 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.el</groupId>
- <artifactId>jboss-el</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
@@ -55,19 +75,15 @@
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
- <artifactId>icefaces</artifactId>
+ <artifactId>icefaces-compat</artifactId>
<version>3.0.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>javax.faces</artifactId>
+ <groupId>org.glassfish</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
- <dependency>
- <groupId>org.icefaces</groupId>
- <artifactId>icefaces-ace</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.icefaces</groupId>
- <artifactId>icepush</artifactId>
- <version>3.0.1</version>
- </dependency>
</dependencies>
<build>
Deleted: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/faces-config.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/faces-config.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,21 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd"
- version="2.1">
- ...
-</faces-config>
- <!--<application>-->
- <!--<message-bundle>messages</message-bundle>-->
- <!--<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>-->
- <!--</application>-->
-
- <!--<managed-bean>-->
-
- <!--<managed-bean-name>highlight</managed-bean-name>-->
-
- <!--<managed-bean-class>com.icesoft.faces.context.effects.Highlight</managed-bean-class>-->
-
- <!--<managed-bean-scope>application</managed-bean-scope>-->
-
- <!--</managed-bean>-->
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/web.xml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/WEB-INF/web.xml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -11,10 +11,6 @@
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
- <!--<listener>-->
- <!--<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>-->
- <!--</listener>-->
-
<!-- filters -->
<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
@@ -44,7 +40,12 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
-
+
+ <context-param>
+ <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
@@ -55,78 +56,20 @@
<param-value>.xhtml</param-value>
</context-param>
- <!--<context-param>-->
- <!--<param-name>com.icesoft.faces.actionURLSuffix</param-name>-->
- <!--<param-value>.seam</param-value>-->
- <!--</context-param>-->
-
- <!--<context-param>-->
- <!--<param-name>com.icesoft.faces.synchronousUpdate</param-name>-->
- <!--<param-value>false</param-value>-->
- <!--</context-param>-->
-
- <!--<context-param> -->
- <!--<param-name>com.icesoft.faces.doJSFStateManagement</param-name>-->
- <!--<param-value>true</param-value>-->
- <!--</context-param> -->
-
- <!--<context-param>-->
- <!--<param-name>com.icesoft.faces.standardRequestScope</param-name>-->
- <!--<param-value>true</param-value>-->
- <!--</context-param>-->
- <!---->
- <!--<context-param>-->
- <!--<param-name>com.icesoft.faces.concurrentDOMViews</param-name>-->
- <!--<param-value>true</param-value>-->
- <!--</context-param>-->
-
- <!-- this is only for JBoss AS 6 - it contains JSF RI 2.0.2 which has a bug
- Remove this if you have upgraded to 2.0.3 -->
- <context-param>
- <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
- <param-value>Mojarra-1.2</param-value>
- </context-param>
-
- <!-- servlets -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <!--<servlet>-->
- <!--<servlet-name>Persistent Faces Servlet</servlet-name>-->
- <!--<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>-->
- <!--<load-on-startup> 1 </load-on-startup>-->
- <!--</servlet>-->
- <!--<servlet>-->
- <!--<servlet-name>Blocking Servlet</servlet-name>-->
- <!--<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>-->
- <!--<load-on-startup> 1 </load-on-startup>-->
- <!--</servlet> -->
- <!---->
-
-<!-- servlet mappings -->
- <!--<servlet-mapping>-->
- <!--<servlet-name>Persistent Faces Servlet</servlet-name>-->
- <!--<url-pattern>*.seam</url-pattern>-->
- <!--</servlet-mapping>-->
-
- <!--<servlet-mapping>-->
- <!--<servlet-name>Persistent Faces Servlet</servlet-name>-->
- <!--<url-pattern>/xmlhttp/*</url-pattern>-->
- <!--</servlet-mapping>-->
- <!---->
- <!--<!– Blocking Servlet Mapping –>-->
- <!--<servlet-mapping>-->
- <!--<servlet-name>Blocking Servlet</servlet-name>-->
- <!--<url-pattern>/block/*</url-pattern>-->
- <!--</servlet-mapping>-->
-
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
<session-config>
<session-timeout>10</session-timeout>
</session-config>
-
</web-app>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/book.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/book.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/book.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,4 +1,3 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/home.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,16 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<h:html xmlns="http://www.w3.org/1999/xhtml"
+<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:s="http://jboss.org/schema/seam/taglib">
<h:head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>JBoss Suites: Seam Framework</title>
- <link href="css/screen.css" rel="stylesheet" type="text/css" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>JBoss Suites: Seam Framework</title>
+ <link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>
-<h:body id="pgHome">
+<body>
<f:view>
<div id="document">
<div id="header">
@@ -30,7 +30,7 @@
<h:inputSecret id="password" value="#{identity.password}" style="width: 165px;"/>
</div>
<div class="errors"><h:messages globalOnly="true"/></div>
- <div class="buttonBox"><ice:commandButton id="login" action="#{identity.login}" value="Account Login"
+ <div class="buttonBox"><h:commandButton id="login" action="#{identity.login()}" value="Account Login"
styleClass="button"/></div>
<div class="notes"><s:link id="register" view="/register.xhtml" value="Register New User"/></div>
<div class="subnotes">
@@ -76,8 +76,8 @@
</div>
</div>
</div>
- <div id="footer">Created with JBoss EJB 3.0, Seam, ICEFaces, and Facelets</div>
+ <div id="footer">Created with JBoss EJB 3, Seam, JSF 2 and ICEFaces</div>
</div>
</f:view>
-</h:body>
-</h:html>
+</body>
+</html>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/main.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/main.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/main.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,4 +1,3 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -20,7 +19,7 @@
<h:form id="searchCriteria">
<fieldset>
- <ice:selectInputText id="searchString"
+ <ice:selectInputText id="searchString"
valueChangeListener="#{hotelSearch.handleSearchStringChange}"
value="#{hotelSearch.searchString}"/>
 
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/password.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/password.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/password.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,106 +1,68 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.org/schema/seam/taglib"
- xmlns:ice="http://www.icesoft.com/icefaces/component"
- template="template.xhtml">
-
-<!-- content -->
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.org/schema/seam/taglib"
+ xmlns:ice="http://www.icesoft.com/icefaces/component"
+ template="template.xhtml">
-<ui:define name="content">
+ <!-- content -->
+ <ui:define name="content">
+ <div class="section">
+ <h1>Change Your Password</h1>
+ </div>
-<div class="section">
+ <div class="section">
- <h1>Change Your Password</h1>
-
-</div>
-
-
-<div class="section">
-
-
- <div class="entry errors">
- <h:messages id="messages" globalOnly="true"/>
- </div>
-
- <h:form id="setpassword">
-
-
-
- <fieldset>
-
-
-
- <s:decorate id="PasswordDecorate" template="edit.xhtml">
-
- <ui:define name="label">Password:</ui:define>
-
- <ice:inputSecret id="password" value="#{user.password}"
- redisplay="true" required="true"/>
- </s:decorate>
-
-
-
- <s:decorate id="VerifyDecorate" template="edit.xhtml">
- <ui:define name="label">Verify:</ui:define>
- <ice:inputSecret id="verify" value="#{changePassword.verify}"
- redisplay="true" required="true"/>
- </s:decorate>
- <div class="buttonBox">
-
- <h:commandButton id="change" value="Change" action="#{changePassword.changePassword}"/>
-  
-
- <s:button id="cancel" value="Cancel" view="/main.xhtml"/>
-
+ <div class="entry errors">
+ <h:messages id="messages" globalOnly="true" />
</div>
+ <h:form id="setpassword">
+ <fieldset>
+ <s:decorate id="PasswordDecorate" template="edit.xhtml">
+ <ui:define name="label">Password:</ui:define>
+ <ice:inputSecret id="password" value="#{user.password}"
+ redisplay="true" required="true" />
+ </s:decorate>
-
+ <s:decorate id="VerifyDecorate" template="edit.xhtml">
+ <ui:define name="label">Verify:</ui:define>
+ <ice:inputSecret id="verify" value="#{changePassword.verify}"
+ redisplay="true" required="true" />
+ </s:decorate>
+ <div class="buttonBox">
- </fieldset>
+ <h:commandButton id="change" value="Change"
+ action="#{changePassword.changePassword}" />
+  
-
+ <s:button id="cancel" value="Cancel" view="/main.xhtml" />
- </h:form>
+ </div>
+ </fieldset>
-</div>
+ </h:form>
+ </div>
+ </ui:define>
-</ui:define>
+ <!-- sidebar -->
+ <ui:define name="sidebar">
+ <h1>Simple things should be easy</h1>
+ <p>(And so should some complex things.) You shouldn't have to
+ write four different classes just to change a password. Traditional
+ J2EE architectures require that developers spend more time writing
+ code to make the frameworks happy, than they ever get to spend
+ writing code to make the user happy. Seam lets you reduce the size of
+ your code dramatically. And that reduces bugs. And it makes
+ refactoring easier. And it makes delivering new functionality
+ quicker. Productivity matters. But with Seam, JSF, EJB 3.0 and jBPM,
+ you don't need to sacrifice the ability to handle complex problems
+ just to achieve great productivity.</p>
-<!-- sidebar -->
+ </ui:define>
-<ui:define name="sidebar">
-
-<h1>Simple things should be easy</h1>
-
-<p>
-
- (And so should some complex things.) You shouldn't have to write four different classes
-
- just to change a password. Traditional J2EE architectures require that developers spend
-
- more time writing code to make the frameworks happy, than they ever get to spend writing
-
- code to make the user happy. Seam lets you reduce the size of your code dramatically.
-
- And that reduces bugs. And it makes refactoring easier. And it makes delivering new
-
- functionality quicker. Productivity matters. But with Seam, JSF, EJB 3.0 and jBPM, you
-
- don't need to sacrifice the ability to handle complex problems just to achieve great
-
- productivity.
-
-</p>
-
-</ui:define>
-
-
-
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/register.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/register.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/register.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<h:html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.org/schema/seam/taglib"
- xmlns:ice="http://www.icesoft.com/icefaces/component" >
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.org/schema/seam/taglib"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -12,91 +12,97 @@
<link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>
-<h:body id="pgHome">
+<body id="pgHome">
-<ice:panelGroup id="document">
+ <ice:panelGroup id="document">
- <div id="header">
- <ice:panelGroup id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: ICEfaces-seam framework demo"/></ice:panelGroup>
- </div>
-
- <ice:panelGroup id="container">
-
- <div id="sidebar">
- <h1>Integrated multi-layer validation</h1>
- <p>
- Robust applications need data validation in several different places. Seam integrates Hibernate Validator,
- a set of annotations for expressing data model constraints in your domain model classes. Then, these
- constraints are applied almost completely transparently at three levels of the application: by Seam when
- the user first enters data, by EJB before persisting data to the database, and, if you use Hibernate to
- generate your database schema, by the database constraints themselves. Multi-layer validation hardens
- your application and protects your data. Even better, it's self-documenting, and easy to change when
- your business rules change.
- </p>
- <p>
- <a href="#" onclick="window.open('exp/registerExp.html','exp','width=752,height=500,scrollbars=yes');">
- What happens when I register?
- </a>
- </p>
+ <div id="header">
+ <ice:panelGroup id="title">
+ <img src="img/hdr.title.gif"
+ alt="JBoss Suites: ICEfaces-seam framework demo" />
+ </ice:panelGroup>
</div>
-
- <ice:panelGroup id="content">
-
- <div class="section">
- <h1>Register</h1>
+
+ <ice:panelGroup id="container">
+
+ <div id="sidebar">
+ <h1>Integrated multi-layer validation</h1>
+ <p>Robust applications need data validation in several different
+ places. Seam integrates Hibernate Validator, a set of annotations
+ for expressing data model constraints in your domain model classes.
+ Then, these constraints are applied almost completely transparently
+ at three levels of the application: by Seam when the user first
+ enters data, by EJB before persisting data to the database, and, if
+ you use Hibernate to generate your database schema, by the database
+ constraints themselves. Multi-layer validation hardens your
+ application and protects your data. Even better, it's
+ self-documenting, and easy to change when your business rules
+ change.</p>
+ <p>
+ <a href="#"
+ onclick="window.open('exp/registerExp.html','exp','width=752,height=500,scrollbars=yes');">
+ What happens when I register? </a>
+ </p>
</div>
-
- <div class="section" style="overflow:auto">
- <div class="entry errors">
- <h:messages id="messages" globalOnly="true"/>
+
+ <ice:panelGroup id="content">
+
+ <div class="section">
+ <h1>Register</h1>
</div>
- <h:form id="registration">
- <fieldset>
-
- <s:decorate id="usernameDecorate" template="edit.xhtml">
- <ui:define name="label">Username:</ui:define>
- <ice:inputText id="username" value="#{user.username}"
- required="true" partialSubmit="true"/>
- </s:decorate>
-
- <s:decorate id="nameDecorate" template="edit.xhtml">
- <ui:define name="label">Real Name:</ui:define>
- <ice:inputText id="name" value="#{user.name}"
- required="true" partialSubmit="true"/>
- </s:decorate>
-
- <s:decorate id="passwordDecorate" template="edit.xhtml">
- <ui:define name="label">Password:</ui:define>
- <ice:inputSecret id="password" value="#{user.password}"
- redisplay="true" partialSubmit="true" required="true"/>
- </s:decorate>
-
- <s:decorate id="verifyDecorate" template="edit.xhtml">
- <ui:define name="label">Verify Password:</ui:define>
- <ice:inputSecret id="verify" value="#{register.verify}"
- redisplay="true" partialSubmit="true" required="true"/>
- </s:decorate>
-
- <div class="buttonBox">
- <ice:commandButton id="register" value="Register" action="#{register.register}"/>
-  
- <s:button id="cancel" value="Cancel" view="/home.xhtml"/>
+ <div class="section" style="overflow: auto">
+ <div class="entry errors">
+ <h:messages id="messages" globalOnly="true" />
</div>
-
- </fieldset>
- </h:form>
-
- </div>
-
+
+ <h:form id="registration">
+ <fieldset>
+
+ <s:decorate id="usernameDecorate" template="edit.xhtml">
+ <ui:define name="label">Username:</ui:define>
+ <ice:inputText id="username" value="#{user.username}"
+ required="true" partialSubmit="true" />
+ </s:decorate>
+
+ <s:decorate id="nameDecorate" template="edit.xhtml">
+ <ui:define name="label">Real Name:</ui:define>
+ <ice:inputText id="name" value="#{user.name}" required="true"
+ partialSubmit="true" />
+ </s:decorate>
+
+ <s:decorate id="passwordDecorate" template="edit.xhtml">
+ <ui:define name="label">Password:</ui:define>
+ <ice:inputSecret id="password" value="#{user.password}"
+ redisplay="true" partialSubmit="true" required="true" />
+ </s:decorate>
+
+ <s:decorate id="verifyDecorate" template="edit.xhtml">
+ <ui:define name="label">Verify Password:</ui:define>
+ <ice:inputSecret id="verify" value="#{register.verify}"
+ redisplay="true" partialSubmit="true" required="true" />
+ </s:decorate>
+
+ <div class="buttonBox">
+ <ice:commandButton id="register" value="Register"
+ action="#{register.register}" />
+  
+ <s:button id="cancel" value="Cancel" view="/home.xhtml" />
+ </div>
+
+ </fieldset>
+ </h:form>
+
+ </div>
+
+ </ice:panelGroup>
+
</ice:panelGroup>
-
+
+ <div id="footer">Created with JBoss EJB 3, Seam, JSF 2 (Mojarra)</div>
+
</ice:panelGroup>
-
- <div id="footer">Created with JBoss EJB 3.0, Seam, JSF (Mojarra), and Facelets</div>
-
-</ice:panelGroup>
-</h:body>
+</body>
-</h:html>
+</html>
Modified: branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml 2012-08-23 14:27:11 UTC (rev 15071)
+++ branches/community/Seam_2_3/examples-ee6/icefaces/icefaces-web/src/main/webapp/template.xhtml 2012-08-23 14:27:35 UTC (rev 15072)
@@ -1,19 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<h:html xmlns="http://www.w3.org/1999/xhtml"
+<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:s="http://jboss.org/schema/seam/taglib"
- xmlns:ice="http://www.icesoft.com/icefaces/component">
+ xmlns:s="http://jboss.org/schema/seam/taglib">
<h:head>
- <ice:outputDeclaration doctypeRoot="HTML"
- doctypePublic="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctypeSystem="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JBoss Suites: Seam Framework</title>
- <link rel='stylesheet' type='text/css' href='./xmlhttp/css/xp/xp.css'/>
<link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>
-<h:body>
+<body>
<div id="document">
<div id="header">
@@ -34,7 +29,7 @@
<ui:include src="conversations.xhtml" />
</div>
</div>
- <div id="footer">Created with JBoss EJB 3.0, Seam, JSF (Mojarra), ICEfaces and Facelets</div>
+ <div id="footer">Created with JBoss EJB 3, Seam, JSF 2, ICEfaces</div>
</div>
-</h:body>
-</h:html>
+</body>
+</html>
12 years, 4 months
Seam SVN: r15071 - branches/community/Seam_2_3/examples-ee6/jee6/jee6-tests/src/test/java/org/jboss/seam/example/booking/test.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-23 10:27:11 -0400 (Thu, 23 Aug 2012)
New Revision: 15071
Modified:
branches/community/Seam_2_3/examples-ee6/jee6/jee6-tests/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
Log:
fixed jee6 integration test deployment JBSEAM-5003
Modified: branches/community/Seam_2_3/examples-ee6/jee6/jee6-tests/src/test/java/org/jboss/seam/example/booking/test/Deployments.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/jee6/jee6-tests/src/test/java/org/jboss/seam/example/booking/test/Deployments.java 2012-08-23 12:08:54 UTC (rev 15070)
+++ branches/community/Seam_2_3/examples-ee6/jee6/jee6-tests/src/test/java/org/jboss/seam/example/booking/test/Deployments.java 2012-08-23 14:27:11 UTC (rev 15071)
@@ -8,7 +8,7 @@
public class Deployments {
public static WebArchive bookingDeployment() {
- return ShrinkWrap.create(ZipImporter.class, "jboss-seam-booking-ee6.war").importFrom(new File("../booking-web/target/jboss-seam-booking-ee6.war"))
+ return ShrinkWrap.create(ZipImporter.class, "jboss-seam-jee6.war").importFrom(new File("../jee6-web/target/jboss-seam-jee6.war"))
.as(WebArchive.class);
}
}
12 years, 4 months
Seam SVN: r15070 - branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action.
by seam-commits@lists.jboss.org
Author: vdedik
Date: 2012-08-23 08:08:54 -0400 (Thu, 23 Aug 2012)
New Revision: 15070
Modified:
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy
Log:
Undoing last commit (15069), JBSEAM-5021 fixed with commit 15068
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy 2012-08-23 12:08:54 UTC (rev 15070)
@@ -19,6 +19,7 @@
import org.jboss.seam.annotations.security.Restrict
@Scope(ScopeType.SESSION)
+@Restrict("#{identity.loggedIn}")
@Name("bookingList")
class BookingListAction implements Serializable
{
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy 2012-08-23 12:08:54 UTC (rev 15070)
@@ -19,6 +19,7 @@
import org.jboss.seam.annotations.security.Restrict
@Name("hotelBooking")
+@Restrict("#{identity.loggedIn}")
class HotelBookingAction
{
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy 2012-08-23 12:08:54 UTC (rev 15070)
@@ -17,6 +17,7 @@
@Name("hotelSearch")
@Scope(ScopeType.SESSION)
+@Restrict("#{identity.loggedIn}")
class HotelSearchingAction
{
12 years, 4 months
Seam SVN: r15069 - branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action.
by seam-commits@lists.jboss.org
Author: vdedik
Date: 2012-08-23 07:49:56 -0400 (Thu, 23 Aug 2012)
New Revision: 15069
Modified:
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy
branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy
Log:
JBSEAM-5021
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy 2012-08-23 11:30:44 UTC (rev 15068)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/BookingListAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
@@ -20,7 +20,6 @@
@Scope(ScopeType.SESSION)
@Name("bookingList")
-@Restrict("#{identity.loggedIn}")
class BookingListAction implements Serializable
{
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy 2012-08-23 11:30:44 UTC (rev 15068)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelBookingAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
@@ -19,7 +19,6 @@
import org.jboss.seam.annotations.security.Restrict
@Name("hotelBooking")
-@Restrict("#{identity.loggedIn}")
class HotelBookingAction
{
Modified: branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy
===================================================================
--- branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy 2012-08-23 11:30:44 UTC (rev 15068)
+++ branches/community/Seam_2_3/examples-ee6/groovybooking/groovybooking-web/src/main/groovy/org/jboss/seam/example/groovy/action/HotelSearchingAction.groovy 2012-08-23 11:49:56 UTC (rev 15069)
@@ -17,7 +17,6 @@
@Name("hotelSearch")
@Scope(ScopeType.SESSION)
-@Restrict("#{identity.loggedIn}")
class HotelSearchingAction
{
12 years, 4 months
Seam SVN: r15068 - in branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration: synchronization and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 07:30:44 -0400 (Thu, 23 Aug 2012)
New Revision: 15068
Added:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestQueueListener.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestTopicListener.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockAction.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockLocal.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/SFSBSynchronizationTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestAction.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestLocal.java
Removed:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/FactoryLockTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/SFSBSynchronizationTest.java
Modified:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/MessagingTest.java
Log:
integration tests EJB cannot be inner classes.
Deleted: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/FactoryLockTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/FactoryLockTest.java 2012-08-23 11:03:43 UTC (rev 15067)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/FactoryLockTest.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -1,309 +0,0 @@
-package org.jboss.seam.test.integration;
-
-import java.io.Serializable;
-
-import javax.ejb.Local;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.OverProtocol;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.JndiName;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.mock.JUnitSeamTest;
-import org.jboss.shrinkwrap.api.Archive;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.assertEquals;
-
-(a)RunWith(Arquillian.class)
-public class FactoryLockTest extends JUnitSeamTest
-{
- private volatile boolean exceptionOccured = false;
-
- @Deployment(name="FactoryLockTest")
- @OverProtocol("Servlet 3.0")
- public static Archive<?> createDeployment()
- {
- return Deployments.defaultSeamDeployment()
- .addClasses(FactoryLockAction.class, FactoryLockLocal.class, TestProducer.class, SeamSynchronizedFactoryLockAction.class, KnitFactory.class, PurlFactory.class);
- }
-
- private abstract class TestThread extends Thread {
- public abstract void runTest() throws Exception;
-
- @Override
- public void run()
- {
- try
- {
- runTest();
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- FactoryLockTest.this.exceptionOccured = true;
- }
- }
- }
-
- private void multiThreadedTest(Thread... threads) throws InterruptedException {
- exceptionOccured = false;
-
- for (Thread thread : threads) {
- thread.start();
- }
-
- for (Thread thread : threads) {
- thread.join();
- }
-
- assertEquals(exceptionOccured,false);
- }
-
- // JBSEAM-4993
- // The test starts two threads, one evaluates #{factoryLock.test.testOtherFactory()} and the other #{factoryLock.testString} 200ms later
- @Test
- public void factoryLock()
- throws Exception
- {
- multiThreadedTest(new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- FactoryLockTest.this.invokeMethod("foo", "#{factoryLock.test.testOtherFactory()}");
- }
- },
-
- new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- Thread.sleep(200);
- FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
- }
- });
- }
-
- // This test is the same as factoryLock test, except it uses the same factory in both threads.
- @Test
- @Ignore // this is weird use case so we don't test it as we know it doesn't work due SFSB doesn't serve for multithread request from same client
- public void sameFactoryLock()
- throws Exception
- {
- multiThreadedTest(new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- FactoryLockTest.this.invokeMethod("testString", "#{factoryLock.test.testSameFactory()}");
- }
- },
-
- new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- Thread.sleep(200);
- FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
- }
- });
- }
-
- // This test is the same as sameFactoryLock test, except it uses a @Synchronized Seam component, instead of an SFSB
- @Test
- public void seamSynchronizedFactoryLock()
- throws Exception
- {
- multiThreadedTest(new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- FactoryLockTest.this.invokeMethod("testString", "#{seamSynchronizedFactoryLock.test.testFactory()}");
- }
- },
-
- new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- Thread.sleep(200);
- FactoryLockTest.this.getValue("testString", "#{seamSynchronizedFactoryLock.testString}");
- }
- });
- }
-
- // Test the behavior of two components using factories of each other.
- @Test
- // Skip the test, as it causes deadlock.
- //@Ignore
- public void interleavingFactories()
- throws Exception
- {
- multiThreadedTest(new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- FactoryLockTest.this.getValue("knit(purl)", "#{factoryLock.knitPurl}");
- }
- },
-
- new TestThread() {
- @Override
- public void runTest() throws Exception
- {
- Thread.sleep(200);
- FactoryLockTest.this.getValue("purl(knit)", "#{factoryLock.purlKnit}");
- }
- });
- }
-
- private void invokeMethod(final String expected, final String el) throws Exception {
- new ComponentTest() {
- @Override
- protected void testComponents() throws Exception {
- assertEquals(expected, invokeMethod(el));
- }
- }.run();
- }
-
- private void getValue(final String expected, final String el) throws Exception {
- new ComponentTest() {
- @Override
- protected void testComponents() throws Exception {
- assertEquals(expected, getValue(el));
- }
- }.run();
- }
-
- @Local
- public static interface FactoryLockLocal
- {
- public String getTestString();
- public String testOtherFactory();
- public String testSameFactory();
- public void remove();
- }
-
-
- @Stateful
- @Scope(ScopeType.SESSION)
- @Name("factoryLock.test")
- @JndiName("java:global/test/FactoryLockTest$FactoryLockAction")
- public static class FactoryLockAction implements FactoryLockLocal
- {
- public String testOtherFactory() {
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return (String)Component.getInstance("factoryLock.foo", true);
- }
-
- // gets instance produced by this component's factory
- public String testSameFactory() {
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return (String)Component.getInstance("factoryLock.testString", true);
- }
-
- @Factory(value="factoryLock.testString", scope=ScopeType.SESSION)
- public String getTestString() {
- return "testString";
- }
- @Remove
- public void remove() {}
- }
-
- // Mostly the same as FactoryLockAction, except not a SFSB
- @SuppressWarnings("serial")
- @Scope(ScopeType.SESSION)
- @Name("seamSynchronizedFactoryLock.test")
- @Synchronized(timeout=3000)
- public static class SeamSynchronizedFactoryLockAction implements Serializable
- {
- // gets instance produced by this component's factory
- public String testFactory() {
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return (String)Component.getInstance("seamSynchronizedFactoryLock.testString", true);
- }
-
- @Factory(value="seamSynchronizedFactoryLock.testString", scope=ScopeType.SESSION)
- public String getTestString() {
- return "testString";
- }
- @Remove
- public void remove() {}
- }
-
-
- @Name("factoryLock.testProducer")
- public static class TestProducer {
- @Factory(value="factoryLock.foo", scope=ScopeType.SESSION)
- public String getFoo() {
- return "foo";
- }
- }
-
- @Scope(ScopeType.APPLICATION)
- @Name("factoryLock.knitFactory")
- public static class KnitFactory
- {
- @Factory(value="factoryLock.knitPurl", scope=ScopeType.SESSION)
- public String getDoubleKnit() {
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return "knit(" + (String)Component.getInstance("factoryLock.purl") + ")";
- }
-
- @Factory(value="factoryLock.knit", scope=ScopeType.SESSION)
- public String getKnit() {
- return "knit";
- }
- }
-
- @Scope(ScopeType.APPLICATION)
- @Name("factoryLock.purlFactory")
- public static class PurlFactory
- {
- @Factory(value="factoryLock.purlKnit", scope=ScopeType.SESSION)
- public String getDoublePurl() {
- return "purl(" + (String)Component.getInstance("factoryLock.knit") + ")";
- }
-
- @Factory(value="factoryLock.purl", scope=ScopeType.SESSION)
- public String getPurl() {
- return "purl";
- }
- }
-}
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/MessagingTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/MessagingTest.java 2012-08-23 11:03:43 UTC (rev 15067)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/MessagingTest.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -1,13 +1,8 @@
package org.jboss.seam.test.integration;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
-import javax.jms.TextMessage;
import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
@@ -30,7 +25,7 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- return Deployments.defaultSeamDeployment();
+ return Deployments.defaultSeamDeployment().addClasses(TestQueueListener.class, TestTopicListener.class);
}
@Test
@@ -47,7 +42,7 @@
Contexts.getApplicationContext().set("testMessage", messageText);
invokeAction("#{testTopic.publish}");
}
- }.run();
+ }.run();
// need to delay a bit to make sure the message is delivered
// might need
@@ -70,7 +65,7 @@
Contexts.getApplicationContext().set("testMessage", messageText);
invokeAction("#{testQueue.send}");
}
- }.run();
+ }.run();
// need to delay a bit to make sure the message is delivered
// might need
@@ -90,9 +85,9 @@
public void publish()
throws JMSException
- {
+ {
testPublisher.publish(topicSession.createTextMessage("message for topic"));
- }
+ }
}
@Name("testQueue")
@@ -107,53 +102,11 @@
testSender.send(queueSession.createTextMessage("message for queue"));
}
}
-
- @MessageDriven(activationConfig={
- @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
- @ActivationConfigProperty(propertyName="destination", propertyValue="topic/seamTest")
- })
- @Name("testTopicListener")
- static public class TestTopicListener
- implements MessageListener
- {
- @In
- private SimpleReference<String> testMessage;
- public void onMessage(Message msg)
- {
- try {
- testMessage.setValue(((TextMessage) msg).getText());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- @MessageDriven(activationConfig={
- @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
- @ActivationConfigProperty(propertyName="destination", propertyValue="queue/seamTest")
- })
- @Name("testQueueListener")
- static public class TestQueueListener
- implements MessageListener
- {
- @In
- private SimpleReference<String> testMessage;
- public void onMessage(Message msg)
- {
- try {
- testMessage.setValue(((TextMessage) msg).getText());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
-
static class SimpleReference<T> {
T value;
- public SimpleReference() {
+ public SimpleReference() {
}
public SimpleReference(T value) {
setValue(value);
Deleted: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/SFSBSynchronizationTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/SFSBSynchronizationTest.java 2012-08-23 11:03:43 UTC (rev 15067)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/SFSBSynchronizationTest.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -1,161 +0,0 @@
-package org.jboss.seam.test.integration;
-
-import java.net.URL;
-import java.net.URLConnection;
-
-import javax.ejb.Local;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-import org.apache.commons.io.IOUtils;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.OverProtocol;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.JndiName;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Synchronized;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunAsClient
-(a)RunWith(Arquillian.class)
-public class SFSBSynchronizationTest
-{
- @Deployment(name="SFSBSynchronizationTest")
- @OverProtocol("Servlet 3.0")
- public static Archive<?> createDeployment()
- {
- // This is a client test, use a real (non-mocked) Seam deployment
- return Deployments.realSeamDeployment()
- .addClasses(TestAction.class, TestLocal.class)
- .addAsWebResource(new StringAsset(
- "<html xmlns=\"http://www.w3.org/1999/xhtml\"" +
- " xmlns:s=\"http://jboss.org/schema/seam/taglib\"" +
- " xmlns:h=\"http://java.sun.com/jsf/html\"" +
- " xmlns:f=\"http://java.sun.com/jsf/core\">" +
- "<h:head></h:head>" +
- "<h:body>" +
- "<h:outputText value=\"#{test.test1()} \" /><h:outputText value=\"#{test.test2()}\" />" +
- "</h:body>" +
- "</html>"), "test.xhtml");
- }
-
- @ArquillianResource
- private URL deploymentUrl;
-
- private volatile boolean exceptionOccured = false;
-
- private class ClientThread extends Thread {
-
- private String cookie;
- private URL url;
-
- private ClientThread(URL url, String cookie) {
- this.url = url;
- this.cookie = cookie;
- }
-
- @Override
- public void run()
- {
- try
- {
- // 10 iterations are enough to be very likely to reproduce the lock and takes only 2 seconds
- for (int i = 0; i < 10; ++i) {
- URLConnection urlConn;
- urlConn = url.openConnection();
- urlConn.setRequestProperty("Cookie", cookie);
- urlConn.connect();
-
- String content = IOUtils.toString(urlConn.getInputStream());
- assert content.contains("test1 test2");
- }
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- exceptionOccured = true;
- }
- }
- }
-
- // JBPAPP-8869 (JBSEAM-4943)
- @Test
- public void synchronizationInterceptor()
- throws Exception
- {
- System.out.println(deploymentUrl.toString());
-
- // Initial request to get the session
- URL testUrl = new URL(deploymentUrl.toString() + "/test.seam");
- URLConnection urlConn = testUrl.openConnection();
- urlConn.connect();
-
- String cookie = urlConn.getHeaderField("Set-Cookie");
- assert cookie != null;
- assert cookie.startsWith("JSESSIONID=");
-
- Thread thread1 = new ClientThread(testUrl, cookie);
- Thread thread2 = new ClientThread(testUrl, cookie);
-
- thread1.start();
- thread2.start();
-
- thread1.join();
- thread2.join();
-
- assert !exceptionOccured;
- }
-
- @Local
- public static interface TestLocal
- {
- public String test1();
- public String test2();
- public void remove();
- }
-
-
- @Stateful
- @Scope(ScopeType.SESSION)
- @Name("test")
- @JndiName("java:global/test/SFSBSynchronizationTest$TestAction")
- @Synchronized(timeout=10000)
- public static class TestAction implements TestLocal
- {
- public String test1() {
- try
- {
- Thread.sleep(100);
- }
-
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return "test1";
- }
-
- public String test2() {
- try
- {
- Thread.sleep(100);
- }
-
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- return "test2";
- }
-
- @Remove
- public void remove() {}
- }
-}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestQueueListener.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestQueueListener.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestQueueListener.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,35 @@
+package org.jboss.seam.test.integration;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.TextMessage;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.test.integration.MessagingTest.SimpleReference;
+
+@MessageDriven(activationConfig =
+{
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/seamTest")
+})
+@Name("testQueueListener")
+public class TestQueueListener implements MessageListener
+{
+ @In
+ private SimpleReference<String> testMessage;
+
+ public void onMessage(Message msg)
+ {
+ try
+ {
+ testMessage.setValue(((TextMessage) msg).getText());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestTopicListener.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestTopicListener.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/TestTopicListener.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,35 @@
+package org.jboss.seam.test.integration;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.TextMessage;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.test.integration.MessagingTest.SimpleReference;
+
+@MessageDriven(activationConfig =
+{
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/seamTest")
+})
+@Name("testTopicListener")
+public class TestTopicListener implements MessageListener
+{
+ @In
+ private SimpleReference<String> testMessage;
+
+ public void onMessage(Message msg)
+ {
+ try
+ {
+ testMessage.setValue(((TextMessage) msg).getText());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockAction.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockAction.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockAction.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,50 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.JndiName;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Stateful
+(a)Scope(ScopeType.SESSION)
+@Name("factoryLock.test")
+@JndiName("java:global/test/FactoryLockAction")
+public class FactoryLockAction implements FactoryLockLocal
+{
+ public String testOtherFactory() {
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return (String)Component.getInstance("factoryLock.foo", true);
+ }
+
+ // gets instance produced by this component's factory
+ public String testSameFactory() {
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return (String)Component.getInstance("factoryLock.testString", true);
+ }
+
+ @Factory(value="factoryLock.testString", scope=ScopeType.SESSION)
+ public String getTestString() {
+ return "testString";
+ }
+ @Remove
+ public void remove() {}
+}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockLocal.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockLocal.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockLocal.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,12 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import javax.ejb.Local;
+
+@Local
+public interface FactoryLockLocal
+{
+ public String getTestString();
+ public String testOtherFactory();
+ public String testSameFactory();
+ public void remove();
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockTest.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/FactoryLockTest.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,254 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import java.io.Serializable;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Synchronized;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.seam.test.integration.Deployments;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertEquals;
+
+(a)RunWith(Arquillian.class)
+public class FactoryLockTest extends JUnitSeamTest
+{
+ private volatile boolean exceptionOccured = false;
+
+ @Deployment(name="FactoryLockTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ return Deployments.defaultSeamDeployment()
+ .addClasses(FactoryLockAction.class, FactoryLockLocal.class, TestProducer.class, SeamSynchronizedFactoryLockAction.class, KnitFactory.class, PurlFactory.class);
+ }
+
+ private abstract class TestThread extends Thread {
+ public abstract void runTest() throws Exception;
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ runTest();
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ FactoryLockTest.this.exceptionOccured = true;
+ }
+ }
+ }
+
+ private void multiThreadedTest(Thread... threads) throws InterruptedException {
+ exceptionOccured = false;
+
+ for (Thread thread : threads) {
+ thread.start();
+ }
+
+ for (Thread thread : threads) {
+ thread.join();
+ }
+
+ assertEquals(exceptionOccured,false);
+ }
+
+ // JBSEAM-4993
+ // The test starts two threads, one evaluates #{factoryLock.test.testOtherFactory()} and the other #{factoryLock.testString} 200ms later
+ @Test
+ public void factoryLock()
+ throws Exception
+ {
+ multiThreadedTest(new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ FactoryLockTest.this.invokeMethod("foo", "#{factoryLock.test.testOtherFactory()}");
+ }
+ },
+
+ new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ Thread.sleep(200);
+ FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
+ }
+ });
+ }
+
+ // This test is the same as factoryLock test, except it uses the same factory in both threads.
+ @Test
+ @Ignore // this is weird use case so we don't test it as we know it doesn't work due SFSB doesn't serve for multithread request from same client
+ public void sameFactoryLock()
+ throws Exception
+ {
+ multiThreadedTest(new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ FactoryLockTest.this.invokeMethod("testString", "#{factoryLock.test.testSameFactory()}");
+ }
+ },
+
+ new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ Thread.sleep(200);
+ FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
+ }
+ });
+ }
+
+ // This test is the same as sameFactoryLock test, except it uses a @Synchronized Seam component, instead of an SFSB
+ @Test
+ public void seamSynchronizedFactoryLock()
+ throws Exception
+ {
+ multiThreadedTest(new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ FactoryLockTest.this.invokeMethod("testString", "#{seamSynchronizedFactoryLock.test.testFactory()}");
+ }
+ },
+
+ new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ Thread.sleep(200);
+ FactoryLockTest.this.getValue("testString", "#{seamSynchronizedFactoryLock.testString}");
+ }
+ });
+ }
+
+ // Test the behavior of two components using factories of each other.
+ @Test
+ // Skip the test, as it causes deadlock.
+ //@Ignore
+ public void interleavingFactories()
+ throws Exception
+ {
+ multiThreadedTest(new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ FactoryLockTest.this.getValue("knit(purl)", "#{factoryLock.knitPurl}");
+ }
+ },
+
+ new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ Thread.sleep(200);
+ FactoryLockTest.this.getValue("purl(knit)", "#{factoryLock.purlKnit}");
+ }
+ });
+ }
+
+ private void invokeMethod(final String expected, final String el) throws Exception {
+ new ComponentTest() {
+ @Override
+ protected void testComponents() throws Exception {
+ assertEquals(expected, invokeMethod(el));
+ }
+ }.run();
+ }
+
+ private void getValue(final String expected, final String el) throws Exception {
+ new ComponentTest() {
+ @Override
+ protected void testComponents() throws Exception {
+ assertEquals(expected, getValue(el));
+ }
+ }.run();
+ }
+
+ // Mostly the same as FactoryLockAction, except not a SFSB
+ @SuppressWarnings("serial")
+ @Scope(ScopeType.SESSION)
+ @Name("seamSynchronizedFactoryLock.test")
+ @Synchronized(timeout=3000)
+ public static class SeamSynchronizedFactoryLockAction implements Serializable
+ {
+ // gets instance produced by this component's factory
+ public String testFactory() {
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return (String)Component.getInstance("seamSynchronizedFactoryLock.testString", true);
+ }
+
+ @Factory(value="seamSynchronizedFactoryLock.testString", scope=ScopeType.SESSION)
+ public String getTestString() {
+ return "testString";
+ }
+ }
+
+
+ @Name("factoryLock.testProducer")
+ public static class TestProducer {
+ @Factory(value="factoryLock.foo", scope=ScopeType.SESSION)
+ public String getFoo() {
+ return "foo";
+ }
+ }
+
+ @Scope(ScopeType.APPLICATION)
+ @Name("factoryLock.knitFactory")
+ public static class KnitFactory
+ {
+ @Factory(value="factoryLock.knitPurl", scope=ScopeType.SESSION)
+ public String getDoubleKnit() {
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return "knit(" + (String)Component.getInstance("factoryLock.purl") + ")";
+ }
+
+ @Factory(value="factoryLock.knit", scope=ScopeType.SESSION)
+ public String getKnit() {
+ return "knit";
+ }
+ }
+
+ @Scope(ScopeType.APPLICATION)
+ @Name("factoryLock.purlFactory")
+ public static class PurlFactory
+ {
+ @Factory(value="factoryLock.purlKnit", scope=ScopeType.SESSION)
+ public String getDoublePurl() {
+ return "purl(" + (String)Component.getInstance("factoryLock.knit") + ")";
+ }
+
+ @Factory(value="factoryLock.purl", scope=ScopeType.SESSION)
+ public String getPurl() {
+ return "purl";
+ }
+ }
+}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/SFSBSynchronizationTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/SFSBSynchronizationTest.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/SFSBSynchronizationTest.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,107 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.apache.commons.io.IOUtils;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.seam.test.integration.Deployments;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunAsClient
+(a)RunWith(Arquillian.class)
+public class SFSBSynchronizationTest
+{
+ @Deployment(name="SFSBSynchronizationTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ // This is a client test, use a real (non-mocked) Seam deployment
+ return Deployments.realSeamDeployment()
+ .addClasses(TestAction.class, TestLocal.class)
+ .addAsWebResource(new StringAsset(
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"" +
+ " xmlns:s=\"http://jboss.org/schema/seam/taglib\"" +
+ " xmlns:h=\"http://java.sun.com/jsf/html\"" +
+ " xmlns:f=\"http://java.sun.com/jsf/core\">" +
+ "<h:head></h:head>" +
+ "<h:body>" +
+ "<h:outputText value=\"#{test.test1()} \" /><h:outputText value=\"#{test.test2()}\" />" +
+ "</h:body>" +
+ "</html>"), "test.xhtml");
+ }
+
+ @ArquillianResource
+ private URL deploymentUrl;
+
+ private volatile boolean exceptionOccured = false;
+
+ private class ClientThread extends Thread {
+
+ private String cookie;
+ private URL url;
+
+ private ClientThread(URL url, String cookie) {
+ this.url = url;
+ this.cookie = cookie;
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ // 10 iterations are enough to be very likely to reproduce the lock and takes only 2 seconds
+ for (int i = 0; i < 10; ++i) {
+ URLConnection urlConn;
+ urlConn = url.openConnection();
+ urlConn.setRequestProperty("Cookie", cookie);
+ urlConn.connect();
+
+ String content = IOUtils.toString(urlConn.getInputStream());
+ assert content.contains("test1 test2");
+ }
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ exceptionOccured = true;
+ }
+ }
+ }
+
+ // JBPAPP-8869 (JBSEAM-4943)
+ @Test
+ public void synchronizationInterceptor()
+ throws Exception
+ {
+ System.out.println(deploymentUrl.toString());
+
+ // Initial request to get the session
+ URL testUrl = new URL(deploymentUrl.toString() + "/test.seam");
+ URLConnection urlConn = testUrl.openConnection();
+ urlConn.connect();
+
+ String cookie = urlConn.getHeaderField("Set-Cookie");
+ assert cookie != null;
+ assert cookie.startsWith("JSESSIONID=");
+
+ Thread thread1 = new ClientThread(testUrl, cookie);
+ Thread thread2 = new ClientThread(testUrl, cookie);
+
+ thread1.start();
+ thread2.start();
+
+ thread1.join();
+ thread2.join();
+
+ assert !exceptionOccured;
+ }
+}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestAction.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestAction.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestAction.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,47 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.JndiName;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Synchronized;
+
+@Stateful
+(a)Scope(ScopeType.SESSION)
+@Name("test")
+@JndiName("java:global/test/TestAction")
+@Synchronized(timeout=10000)
+public class TestAction implements TestLocal
+{
+ public String test1() {
+ try
+ {
+ Thread.sleep(100);
+ }
+
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return "test1";
+ }
+
+ public String test2() {
+ try
+ {
+ Thread.sleep(100);
+ }
+
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ return "test2";
+ }
+
+ @Remove
+ public void remove() {}
+}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestLocal.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestLocal.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/synchronization/TestLocal.java 2012-08-23 11:30:44 UTC (rev 15068)
@@ -0,0 +1,11 @@
+package org.jboss.seam.test.integration.synchronization;
+
+import javax.ejb.Local;
+
+@Local
+public interface TestLocal
+{
+ public String test1();
+ public String test2();
+ public void remove();
+}
\ No newline at end of file
12 years, 4 months
Seam SVN: r15067 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 07:03:43 -0400 (Thu, 23 Aug 2012)
New Revision: 15067
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
Log:
JBSEAM-4966 don't let calling equals on ourselves make us dirty
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java 2012-08-23 10:07:12 UTC (rev 15066)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/intercept/JavaBeanInterceptor.java 2012-08-23 11:03:43 UTC (rev 15067)
@@ -81,16 +81,10 @@
}
}
- if ( markDirty(method) )
- {
- //mark it dirty each time it gets called
- //this flag will be ignored if the bean
- //implements Mutable
- dirty = true;
- }
-
//make default equals() method return true when called on itself
//by unwrapping the proxy
+ //We don't let calling this equals make us dirty, as we assume it is without side effects
+ //this assumption is required, as Mojarra 2.0 calls equals during SessionMap.put, see JBSEAM-4966
if ( method.getName().equals("equals")
&& method.getParameterTypes().length == 1
&& method.getParameterTypes()[0] == Object.class
@@ -99,7 +93,14 @@
return interceptInvocation(method, new Object[]{bean});
}
-
+ if ( markDirty(method) )
+ {
+ //mark it dirty each time it gets called
+ //this flag will be ignored if the bean
+ //implements Mutable
+ dirty = true;
+ }
+
Object result = interceptInvocation(method, params);
return result==bean ? proxy : result;
12 years, 4 months