Seam SVN: r15010 - branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-31 09:37:28 -0400 (Tue, 31 Jul 2012)
New Revision: 15010
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java
Log:
JBPAPP-9391 enabled interleavingFactories test and disabled sameFactoryLock test
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java 2012-07-31 13:24:28 UTC (rev 15009)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java 2012-07-31 13:37:28 UTC (rev 15010)
@@ -46,7 +46,7 @@
thread.join();
}
- assert !exceptionOccured;
+ Assert.assertEquals(exceptionOccured, false);
}
@@ -75,7 +75,8 @@
}
// This test is the same as factoryLock test, except it uses the same factory in both threads.
- @Test
+ // This is more like incorrect usage, EJB spec says that concurrent client access is invalid.
+ @Test(enabled=false)
public void sameFactoryLock()
throws Exception
{
@@ -99,7 +100,8 @@
// Test the behavior of two components using factories of each other.
// Skip the test, as it causes deadlock.
- @Test(enabled=false)
+ //@Test(enabled=false)
+ @Test
public void interleavingFactories()
throws Exception
{
12 years, 4 months
Seam SVN: r15009 - branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-31 09:24:28 -0400 (Tue, 31 Jul 2012)
New Revision: 15009
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/Component.java
Log:
JBPAPP-9391 locking on factoryMethod to reduce deadlock possibility
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/Component.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/Component.java 2012-07-30 15:18:02 UTC (rev 15008)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/Component.java 2012-07-31 13:24:28 UTC (rev 15009)
@@ -2076,7 +2076,6 @@
else if (factoryMethod != null && getOutScope(factoryMethod.getScope(), factoryMethod.getComponent()).isContextActive())
{
Object factory = Component.getInstance(factoryMethod.getComponent().getName(), true);
- Component component = factoryMethod.getComponent();
ScopeType scopeResult = getOutScope(factoryMethod.getScope(), factoryMethod.getComponent());
ScopeType scopeFactory = factoryMethod.getComponent().getScope();
// we need this lock in the following cases: (1) the target scope is
@@ -2099,23 +2098,12 @@
// synchronize all instances of this component as they might
// outject to the same scope (i.e. component factory in EVENT scope,
// outjecting to APPLICATION scope).
- if (scopeResult == ScopeType.CONVERSATION || scopeResult == ScopeType.EVENT || scopeResult == ScopeType.PAGE)
+ //System.out.println("^^^^^ factoryMethod " + factoryMethod);
+ synchronized (factoryMethod)
{
- synchronized (factory)
- {
- return createInstanceFromFactory(name, scope, factoryMethod, factory);
- }
+ //System.out.println("^^^^^ factoryMethod locked");
+ return createInstanceFromFactory(name, scope, factoryMethod, factory);
}
- // synchronize all instances of this factory as they might
- // outject to the same scope (i.e. factory in EVENT scope,
- // outjecting to APPLICATION scope).
- else
- {
- synchronized (component)
- {
- return createInstanceFromFactory(name, scope, factoryMethod, factory);
- }
- }
}
else
{
12 years, 4 months
Seam SVN: r15008 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-30 11:18:02 -0400 (Mon, 30 Jul 2012)
New Revision: 15008
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3138 fixed for updated integration test
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-30 12:46:34 UTC (rev 15007)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/init/Initialization.java 2012-07-30 15:18:02 UTC (rev 15008)
@@ -16,6 +16,7 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -502,7 +503,31 @@
{
throw new IllegalArgumentException("must specify either class or name in <component/> declaration");
}
-
+
+ // if there is the same component with highest precedence do not set properties for it
+ ComponentDescriptor highestPriorityComponent = getHighestPriorityDescriptor(name);
+
+ if (highestPriorityComponent != null)
+ {
+ if (precedence < highestPriorityComponent.getPrecedence())
+ {
+ return;
+ }
+ else
+ {
+ // have to remove all properties for lower priority component
+ Iterator<String> iterator = properties.keySet().iterator();
+ while (iterator.hasNext())
+ {
+ String qualifiedPropName = iterator.next();
+ if (qualifiedPropName.startsWith(name+"."))
+ {
+ iterator.remove();
+ }
+ }
+ }
+ }
+
for ( Element prop : (List<Element>) component.elements() )
{
String propName = prop.attributeValue("name");
@@ -530,7 +555,6 @@
if (isProperty(prop.getNamespaceURI(),attributeName))
{
String qualifiedPropName = name + '.' + toCamelCase( prop.getQName().getName(), false );
- log.info("qualifiedPropName " + qualifiedPropName);
Conversions.PropertyValue propValue = null;
try
{
@@ -551,16 +575,29 @@
}
}
- private boolean isSetProperties(String name, int precedence)
+ /**
+ * Get the highest priority component for the component name
+ * @param componentName
+ * @return
+ */
+ private ComponentDescriptor getHighestPriorityDescriptor(String componentName)
{
- TreeSet<ComponentDescriptor> currentSet = (TreeSet<ComponentDescriptor>) componentDescriptors.get(name);
+ TreeSet<ComponentDescriptor> currentSet = (TreeSet<ComponentDescriptor>) componentDescriptors.get(componentName);
if (currentSet != null)
{
- ComponentDescriptor highestPriorityDescriptor = currentSet.first();
- if (highestPriorityDescriptor == null)
- {
- return true;
- }
+ return currentSet.first();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private boolean isSetProperties(String name, int precedence)
+ {
+ ComponentDescriptor highestPriorityDescriptor = getHighestPriorityDescriptor(name);
+ if ( highestPriorityDescriptor != null)
+ {
return precedence >= highestPriorityDescriptor.getPrecedence();
}
else
12 years, 5 months
Seam SVN: r15007 - branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-30 08:46:34 -0400 (Mon, 30 Jul 2012)
New Revision: 15007
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java
Log:
JBPAPP-8159 second fixing attempt after extended testcase
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java 2012-07-27 14:49:01 UTC (rev 15006)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java 2012-07-30 12:46:34 UTC (rev 15007)
@@ -16,6 +16,7 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -503,6 +504,30 @@
throw new IllegalArgumentException("must specify either class or name in <component/> declaration");
}
+ // if there is the same component with highest precedence do not set properties for it
+ ComponentDescriptor highestPriorityComponent = getHighestPriorityDescriptor(name);
+
+ if (highestPriorityComponent != null)
+ {
+ if (precedence < highestPriorityComponent.getPrecedence())
+ {
+ return;
+ }
+ else
+ {
+ // have to remove all properties for lower priority component
+ Iterator<String> iterator = properties.keySet().iterator();
+ while (iterator.hasNext())
+ {
+ String qualifiedPropName = iterator.next();
+ if (qualifiedPropName.startsWith(name+"."))
+ {
+ iterator.remove();
+ }
+ }
+ }
+ }
+
for ( Element prop : (List<Element>) component.elements() )
{
String propName = prop.attributeValue("name");
@@ -511,12 +536,11 @@
propName = prop.getQName().getName();
}
String qualifiedPropName = name + '.' + toCamelCase(propName, false);
- log.info("qualifiedPropName " + qualifiedPropName);
- //properties.put( qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements) );
if (properties.containsKey(qualifiedPropName))
{
if (isSetProperties(name, precedence))
{
+
properties.put(qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements));
}
}
@@ -536,7 +560,6 @@
try
{
propValue = getPropertyValue(prop, replacements);
-// properties.put( qualifiedPropName, propValue );
if (isSetProperties(name, precedence))
{
properties.put(qualifiedPropName, propValue);
@@ -553,21 +576,33 @@
}
}
- private boolean isSetProperties(String name, int precedence)
+ /**
+ * Get the highest priority component for the component name
+ * @param componentName
+ * @return
+ */
+ private ComponentDescriptor getHighestPriorityDescriptor(String componentName)
{
- TreeSet<ComponentDescriptor> currentSet = (TreeSet<ComponentDescriptor>) componentDescriptors.get(name);
+ TreeSet<ComponentDescriptor> currentSet = (TreeSet<ComponentDescriptor>) componentDescriptors.get(componentName);
if (currentSet != null)
{
- ComponentDescriptor highestPriorityDescriptor = currentSet.first();
- if (highestPriorityDescriptor == null)
- {
- return true;
- }
+ return currentSet.first();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private boolean isSetProperties(String name, int precedence)
+ {
+ ComponentDescriptor highestPriorityDescriptor = getHighestPriorityDescriptor(name);
+ if ( highestPriorityDescriptor != null)
+ {
return precedence >= highestPriorityDescriptor.getPrecedence();
}
else
{
- log.info("Component is not in componentDescriptory " + name + " precedence " + precedence);
return true;
}
}
12 years, 5 months
Seam SVN: r15006 - branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-27 10:49:01 -0400 (Fri, 27 Jul 2012)
New Revision: 15006
Modified:
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/ClusteringAndEJBPassivation.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Conversations.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Dependencies.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Groovy.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Hsearch.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Jbpm.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Persistence.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Preface.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Tutorial.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Validation.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/master.xml
Log:
JBSEAM-4987 second attempt to fix doc issues
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/ClusteringAndEJBPassivation.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/ClusteringAndEJBPassivation.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/ClusteringAndEJBPassivation.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -91,6 +91,10 @@
<sect2>
<title>Deploying a Seam application to a JBoss AS cluster with session replication</title>
+ <warning>
+ <para>This section needs to be updated for JBoss AS 7.x</para>
+ </warning>
+
<para>
The procedure outlined in this tutorial has been validated with an seam-gen application and the Seam
booking example.
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -763,9 +763,9 @@
annotation. But most applications will just use Seam managed transactions when using Hibernate with
JavaBeans. </para>
- <para> The Seam distribution includes a version of the booking example application that uses Hibernate3 and
- JavaBeans instead of EJB3, and another version that uses JPA and JavaBeans. These example applications are
- ready to deploy into any J2EE application server. </para>
+ <para> The Seam distribution includes a version of the booking example application that uses Hibernate and
+ JavaBeans instead of EJB, and another version that uses JPA and JavaBeans. These example applications are
+ ready to deploy into any Java EE application server. </para>
<sect2>
<title>Boostrapping Hibernate in Seam</title>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Conversations.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Conversations.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Conversations.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -343,7 +343,7 @@
</para>
<programlisting role="XML"><![CDATA[<pages>
- <page view-id="/messageList.jsp" action="#{messageManager.list}"/>
+ <page view-id="/messageList.xhtml" action="#{messageManager.list}"/>
...
</pages>]]></programlisting>
@@ -362,7 +362,7 @@
</para>
<programlisting role="XML"><![CDATA[<pages>
- <page view-id="/messageList.jsp" action="#{conversation.begin}"/>
+ <page view-id="/messageList.xhtml" action="#{conversation.begin}"/>
...
</pages>]]></programlisting>
@@ -380,7 +380,7 @@
</para>
<programlisting role="XML"><![CDATA[<pages>
- <page view-id="/messageList.jsp">
+ <page view-id="/messageList.xhtml">
<begin-conversation nested="true" pageflow="AddItem"/>
<page>
...
@@ -392,7 +392,7 @@
</para>
<programlisting role="XML"><![CDATA[<pages>
- <page view-id="/home.jsp">
+ <page view-id="/home.xhtml">
<end-conversation/>
<page>
...
@@ -835,8 +835,8 @@
</listitem>
<listitem>
<para>
- Include one or more of the standard workspace switcher JSP
- or facelets fragments in your pages. The standard fragments
+ Include one or more of the standard workspace switcher JSF
+ or Facelets fragments in your pages. The standard fragments
support workspace management via a drop down menu, a list
of conversations, or breadcrumbs.
</para>
@@ -920,7 +920,7 @@
<title>The conversation switcher</title>
<para>
- Include the following fragment in your JSP or facelets page
+ Include the following fragment in your JSF page
to get a drop-down menu that lets you switch to any
current conversation, or to any other page of the application:
</para>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Dependencies.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Dependencies.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Dependencies.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -22,19 +22,7 @@
directory. Sun's JDK6 Update 4 release upgraded to JAXB 2.1 and
removed this requirement. When building, testing, or executing be
sure to use this version or higher.
- </para>
-
- <para>
- Seam used JBoss Embedded in its unit and integration testing. This
- has an additional requirement when using JDK 6. In order to run
- JBoss Embedded with JDK 6 you need to set the following JVM argument:
-
- <programlisting>-Dsun.lang.ClassLoader.allowArraySyntax=true</programlisting>
-
- Seam's internal build system is setting this by default when it
- executes Seam's test suite. However if you are also using JBoss
- Embedded for your testing you will need to set this value.
- </para>
+ </para>
</section>
</section>
@@ -48,7 +36,7 @@
type is listed as <literal>war</literal>, the library should be placed in
the <literal>/WEB-INF/lib</literal> directory of your application's war
file. The scope of the dependency is either all, runtime or provided (by
- JBoss AS 4.2 or 5.0).
+ JBoss AS 7.1.x).
</para>
<para>
@@ -241,21 +229,6 @@
<row>
<entry>
- <para><literal>jsf-facelets.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>war</para>
- </entry>
- <entry>
- <para>Facelets</para>
- </entry>
- </row>
-
- <row>
- <entry>
<para><literal>urlrewrite.jar</literal></para>
</entry>
<entry align="center">
@@ -323,7 +296,7 @@
<row>
<entry>
- <para><literal>richfaces-api.jar</literal></para>
+ <para><literal>richfaces-core-api.jar</literal></para>
</entry>
<entry align="center">
<para>all</para>
@@ -333,7 +306,7 @@
</entry>
<entry>
<para>
- Required to use RichFaces. Provides API classes that you may
+ Required to use RichFaces. Provides Core API classes that you may
wish to use from your application e.g. to create a tree
</para>
</entry>
@@ -341,7 +314,7 @@
<row>
<entry>
- <para><literal>richfaces-impl.jar</literal></para>
+ <para><literal>richfaces-core-impl.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -350,13 +323,13 @@
<para>war</para>
</entry>
<entry>
- <para>Required to use RichFaces.</para>
+ <para>Required to use RichFaces Core implementations.</para>
</entry>
</row>
<row>
<entry>
- <para><literal>richfaces-ui.jar</literal></para>
+ <para><literal>richfaces-components-ui.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -365,10 +338,25 @@
<para>war</para>
</entry>
<entry>
- <para>Required to use RichFaces. Provides all the UI components.</para>
+ <para>Required to use RichFaces. Provides all the Components UI components.</para>
</entry>
- </row>
+ </row>
+ <row>
+ <entry>
+ <para><literal>richfaces-components-api.jar</literal></para>
+ </entry>
+ <entry align="center">
+ <para>runtime</para>
+ </entry>
+ <entry align="center">
+ <para>war</para>
+ </entry>
+ <entry>
+ <para>Required to use RichFaces. Provides all the API for UI components.</para>
+ </entry>
+ </row>
+
</tbody>
</tgroup>
</table>
@@ -405,23 +393,8 @@
<tbody>
- <row>
+ <row>
<entry>
- <para><literal>activation.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>ear</para>
- </entry>
- <entry>
- <para>Required for attachment support</para>
- </entry>
- </row>
-
- <row>
- <entry>
<para><literal>mail.jar</literal></para>
</entry>
<entry align="center">
@@ -792,14 +765,14 @@
<section>
- <title>JBoss Rules</title>
+ <title>Drools</title>
<para>
- The JBoss Rules libraries can be found in the <literal>drools/lib</literal> directory in Seam.
+ The Drools libraries can be found in the <literal>lib</literal> directory in Seam.
</para>
<table>
- <title>JBoss Rules Dependencies</title>
+ <title>Drools Dependencies</title>
<tgroup cols="4">
<colspec colnum="1" colwidth="4*" />
@@ -843,7 +816,7 @@
<row>
<entry>
- <para><literal>core.jar</literal></para>
+ <para><literal>ecj.jar</literal></para>
</entry>
<entry align="center">
<para>runtime</para>
@@ -852,7 +825,7 @@
<para>ear</para>
</entry>
<entry>
- <para>Eclipse JDT</para>
+ <para>Eclipse Compiler for Java</para>
</entry>
</row>
@@ -882,7 +855,7 @@
<para>ear</para>
</entry>
<entry>
- <para></para>
+ <para>Drools compiler</para>
</entry>
</row>
@@ -930,24 +903,10 @@
<para></para>
</entry>
</row>
+
<row>
<entry>
- <para><literal>janino.jar</literal></para>
- </entry>
- <entry align="center">
- <para>runtime</para>
- </entry>
- <entry align="center">
- <para>ear</para>
- </entry>
- <entry>
- <para></para>
- </entry>
- </row>
-
- <row>
- <entry>
<para><literal>mvel2.jar</literal></para>
</entry>
<entry align="center">
@@ -1187,25 +1146,15 @@
<section>
<title>Dependency Management using Maven</title>
-
<para>
- Maven offers support for transitive dependency management and can be used
- to manage the dependencies of your Seam project. You can use Maven Ant
- Tasks to integrate Maven into your Ant build, or can use Maven to build and
- deploy your project.
- </para>
-
- <para>
We aren't actually going to discuss how to use Maven here, but just run
- over some basic POMs you could use.
+ over some Seam usage from user/application point of view you could use.
</para>
<para>
- Released versions of Seam are available in <ulink url="http://repository.jboss.org/maven2">
- http://repository.jboss.org/maven2</ulink>
- and nightly snapshots are available in <ulink url="http://snapshots.jboss.org/maven2">
- http://snapshots.jboss.org/maven2</ulink>.
+ Released versions of Seam are available in <ulink url="http://repository.jboss.org/nexus/content/groups/public">
+ http://repository.jboss.org/nexus/content/groups/public</ulink>.
</para>
<para>
@@ -1229,6 +1178,16 @@
<programlisting role="XML"><![CDATA[<dependency>
<groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-mail</artifactId>
+</dependency>]]></programlisting>
+
+<programlisting role="XML"><![CDATA[<dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+</dependency>]]></programlisting>
+
+<programlisting role="XML"><![CDATA[<dependency>
+ <groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-remoting</artifactId>
</dependency>]]></programlisting>
@@ -1239,10 +1198,26 @@
<programlisting role="XML"><![CDATA[<dependency>
<groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ioc</artifactId>
+ <artifactId>jboss-seam-excel</artifactId>
</dependency>]]></programlisting>
+<programlisting role="XML"><![CDATA[<dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-resteasy</artifactId>
+</dependency>]]></programlisting>
+
+<programlisting role="XML"><![CDATA[<dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-rss</artifactId>
+</dependency>]]></programlisting>
+
+<programlisting role="XML"><![CDATA[<dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-wicket</artifactId>
+</dependency>]]></programlisting>
<para>
+
+
This sample POM will give you Seam, JPA (provided by Hibernate),
Hibernate Validator and Hibernate Search:
</para>
@@ -1260,41 +1235,43 @@
<repositories>
<repository>
<id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
+ <name>JBoss Public Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>bom</artifactId>
+ <version>2.3.0.Final</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
- <version>3.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.4.0.GA</version>
- </dependency>
-
- <dependency>
- <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
- <version>3.4.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
- <version>3.1.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
- <version>2.2.0.GA</version>
</dependency>
</dependencies>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Groovy.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Groovy.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Groovy.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -61,22 +61,22 @@
@Id @GeneratedValue
Long id
- @Length(max=50) @NotNull
+ @Size(max=50) @NotNull
String name
- @Length(max=100) @NotNull
+ @Size(max=100) @NotNull
String address
- @Length(max=40) @NotNull
+ @Size(max=40) @NotNull
String city
- @Length(min=2, max=10) @NotNull
+ @Size(min=2, max=10) @NotNull
String state
- @Length(min=4, max=6) @NotNull
+ @Size(min=4, max=6) @NotNull
String zip
- @Length(min=2, max=40) @NotNull
+ @Size(min=2, max=40) @NotNull
String country
@Column(precision=6, scale=2)
@@ -163,8 +163,8 @@
<para>A Groovy class <emphasis>is</emphasis> a Java class, with a bytecode representation just like a Java
class. To deploy, a Groovy entity, a Groovy Session bean or a Groovy Seam component, a compilation step
- is necessary. A common approach is to use the <literal>groovyc</literal> ant task. Once compiles, a
- Groovy class is in no way different than a Java class and the application server will treat them
+ is necessary. A common approach is to use the <ulink url="http://docs.codehaus.org/display/GMAVEN/Home">gmaven-plugin</ulink>
+ maven plugin. Once compiles, a Groovy class is in no way different than a Java class and the application server will treat them
equally. Note that this allow a seamless mix of Groovy and Java code.</para>
</section>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Hsearch.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Hsearch.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Hsearch.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -41,7 +41,7 @@
to get started.</para>
<programlisting role="XML"><![CDATA[<persistence-unit name="sample">
- <jta-data-source>java:/DefaultDS</jta-data-source>
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
[...]
<!-- use a file system based index -->
@@ -52,62 +52,41 @@
value="/Users/prod/apps/dvdstore/dvdindexes"/>
</properties>
</persistence-unit>]]></programlisting>
-
- <para>If you plan to target Hibernate Annotations or EntityManager 3.2.x
- (embedded into JBoss AS 4.2.x and later), you also need to configure the
- appropriate event listeners.</para>
-
- <programlisting role="XML"><![CDATA[<persistence-unit name="sample">
- <jta-data-source>java:/DefaultDS</jta-data-source>
- <properties>
- [...]
- <!-- use a file system based index -->
- <property name="hibernate.search.default.directory_provider"
- value="org.hibernate.search.store.FSDirectoryProvider"/>
- <!-- directory where the indexes will be stored -->
- <property name="hibernate.search.default.indexBase"
- value="/Users/prod/apps/dvdstore/dvdindexes"/>
-
- <property name="hibernate.ejb.event.post-insert"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-update"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
- <property name="hibernate.ejb.event.post-delete"
- value="org.hibernate.search.event.FullTextIndexEventListener"/>
-
- </properties>
-</persistence-unit>]]></programlisting>
-
- <note>
- <para>It is not longer necessary the register the event listeners if
- Hibernate Annotations or EntityManager 3.3.x are used.
- When using Hibernate Search 3.1.x more eventlisteners are needed, but
- these are registered automatically by Hibernate Annotations; refer
- to the Hibernate Search reference for configuring it without
- EntityManager and Annotations.</para>
- </note>
-
+
<para>In addition to the configuration file, the following jars have to be
deployed:</para>
<itemizedlist>
<listitem>
<para>hibernate-search.jar</para>
+ </listitem>
+
+ <listitem>
+ <para>hibernate-search-orm.jar</para>
</listitem>
<listitem>
- <para>hibernate-commons-annotations.jar</para>
+ <para>hibernate-search-engine.jar</para>
</listitem>
-
+
<listitem>
<para>lucene-core.jar</para>
</listitem>
</itemizedlist>
- <para><filename>hibernate-commons-annotations.jar</filename> is not needed
- in JBossAS6. Some Hibernate Search extensions require additional dependencies,
+ <para>Maven coordinates for using from Hibernate Search:
+ <programlisting role="XML"><![CDATA[
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <version>4.1.1.Final</version>
+ </dependency>
+ ]]></programlisting>
+ </para>
+
+ <para>Some Hibernate Search extensions require additional dependencies,
a commonly used is <filename>hibernate-search-analyzers.jar</filename>.
- For details, see the <ulink url="http://www.hibernate.org/subprojects/search/docs">
+ For details, see the <ulink url="http://docs.jboss.org/hibernate/search/4.1/reference/en-US/html_single">
Hibernate Search documentation</ulink> for details.
</para>
@@ -122,7 +101,7 @@
<para>Hibernate Search uses annotations to map entities to a Lucene index,
check the <ulink
- url="http://www.hibernate.org/subprojects/search/docs">reference
+ url="http://docs.jboss.org/hibernate/search/4.1/reference/en-US/html_single">reference
documentation</ulink> for more informations.</para>
<para>Hibernate Search is fully integrated with the API and semantic of
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Jbpm.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Jbpm.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Jbpm.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -101,23 +101,23 @@
</para>
<programlisting role="XML"><![CDATA[<navigation-rule>
- <from-view-id>/numberGuess.jsp</from-view-id>
+ <from-view-id>/numberGuess.xhtml</from-view-id>
<navigation-case>
<from-outcome>guess</from-outcome>
- <to-view-id>/numberGuess.jsp</to-view-id>
+ <to-view-id>/numberGuess.xhtml</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>win</from-outcome>
- <to-view-id>/win.jsp</to-view-id>
+ <to-view-id>/win.xhtml</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>lose</from-outcome>
- <to-view-id>/lose.jsp</to-view-id>
+ <to-view-id>/lose.xhtml</to-view-id>
<redirect/>
</navigation-case>
@@ -128,17 +128,17 @@
rules:
</para>
- <programlisting role="XML"><![CDATA[<page view-id="/numberGuess.jsp">
+ <programlisting role="XML"><![CDATA[<page view-id="/numberGuess.xhtml">
<navigation>
<rule if-outcome="guess">
- <redirect view-id="/numberGuess.jsp"/>
+ <redirect view-id="/numberGuess.xhtml"/>
</rule>
<rule if-outcome="win">
- <redirect view-id="/win.jsp"/>
+ <redirect view-id="/win.xhtml"/>
</rule>
<rule if-outcome="lose">
- <redirect view-id="/lose.jsp"/>
+ <redirect view-id="/lose.xhtml"/>
</rule>
</navigation>
@@ -150,8 +150,8 @@
</para>
<programlisting role="JAVA"><![CDATA[public String guess() {
- if (guess==randomNumber) return "/win.jsp";
- if (++guessCount==maxGuesses) return "/lose.jsp";
+ if (guess==randomNumber) return "/win.xhtml";
+ if (++guessCount==maxGuesses) return "/lose.xhtml";
return null;
}]]></programlisting>
@@ -161,7 +161,7 @@
</para>
<programlisting role="JAVA"><![CDATA[public String search() {
- return "/searchResults.jsp?searchPattern=#{searchAction.searchPattern}";
+ return "/searchResults.xhtml?searchPattern=#{searchAction.searchPattern}";
}]]></programlisting>
<para>
@@ -178,7 +178,7 @@
<programlisting role="XML"><![CDATA[<pageflow-definition name="numberGuess">
- <start-page name="displayGuess" view-id="/numberGuess.jsp">
+ <start-page name="displayGuess" view-id="/numberGuess.xhtml">
<redirect/>
<transition name="guess" to="evaluateGuess">
<action expression="#{numberGuess.guess}" />
@@ -195,12 +195,12 @@
<transition name="false" to="displayGuess"/>
</decision>
- <page name="win" view-id="/win.jsp">
+ <page name="win" view-id="/win.xhtml">
<redirect/>
<end-conversation />
</page>
- <page name="lose" view-id="/lose.jsp">
+ <page name="lose" view-id="/lose.xhtml">
<redirect/>
<end-conversation />
</page>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Persistence.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Persistence.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Persistence.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -3,8 +3,8 @@
<para>
Seam provides extensive support for the two most popular persistence
- architectures for Java: Hibernate3, and the Java Persistence API
- introduced with EJB 3.0. Seam's unique state-management architecture
+ architectures for Java: Hibernate, and the Java Persistence API
+ introduced with EJB 3.1. Seam's unique state-management architecture
allows the most sophisticated ORM integration of any web application
framework.
</para>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Preface.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Preface.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Preface.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -30,10 +30,10 @@
frameworks you're using today.
</para>
<para>
- Unlike plain Java EE or J2EE components, Seam components may <emphasis>simultaneously</emphasis>
+ Unlike plain Java EE or Java EE components, Seam components may <emphasis>simultaneously</emphasis>
access state associated with the web request and state held in transactional resources (without
the need to propagate web request state manually via method parameters). You might object
- that the application layering imposed upon you by the old J2EE platform was a Good Thing.
+ that the application layering imposed upon you by the old Java EE platform was a Good Thing.
Well, nothing stops you creating an equivalent layered architecture using Seam — the difference
is that <emphasis>you</emphasis> get to architect your own application and decide what the
layers are and how they work together.
@@ -45,7 +45,7 @@
<term><emphasis>Integrate JSF with EJB 3.0</emphasis></term>
<listitem>
<para>
- JSF and EJB 3.0 are two of the best new features of Java EE 5. EJB3 is a brand new
+ JSF and EJB 3 are two of the best new features of Java EE 5. EJB3 is a brand new
component model for server side business and persistence logic. Meanwhile, JSF is a
great component model for the presentation tier. Unfortunately, neither component
model is able to solve all problems in computing by itself. Indeed, JSF and EJB3
@@ -55,7 +55,7 @@
and integration with other frameworks.
</para>
<para>
- Seam unifies the component models of JSF and EJB3, eliminating glue code, and letting
+ Seam unifies the component models of JSF and EJB 3, eliminating glue code, and letting
the developer think about the business problem.
</para>
<para>
@@ -74,12 +74,28 @@
</para>
</listitem>
</varlistentry>
-
+
+<varlistentry>
+ <term><emphasis>Integrated with Java EE6</emphasis></term>
+ <listitem>
+ <para>
+ While Seam 2 was targeted Java EE 5 mainly, you can use some Java EE 6 technologies
+ also on Seam 2.
+ </para>
+ <para>
+ Seam 2 and its extensions was added a little re-factored into Java EE 6 as CDI technology.
+ So this should be a current focus of majority users. But for previous Seam 2 users who
+ doesn't want or can't use that, we bring some new features from the Java EE 6 set like JSF 2,
+ JPA 2 and Bean Validation integrations into Seam 2.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><emphasis>Integrated AJAX</emphasis></term>
<listitem>
<para>
- Seam supports the best open source JSF-based AJAX solutions: JBoss RichFaces and
+ Seam supports the best open source JSF-based AJAX solutions: RichFaces and
ICEfaces. These solutions let you add AJAX capability to your user interface without
the need to write any JavaScript code.
</para>
@@ -127,7 +143,7 @@
associated with a particular <emphasis>context</emphasis>, while ensuring that all needed
cleanup occurs when the context ends. Seam takes the concept of declarative state
management much further and applies it to <emphasis>application state</emphasis>.
- Traditionally, J2EE applications implement state management manually, by getting
+ Traditionally, Java EE applications implement state management manually, by getting
and setting servlet session and request attributes. This approach to state management is the
source of many bugs and memory leaks when applications fail to clean up session attributes,
or when session data associated with different workflows collides in a multi-window
@@ -195,7 +211,7 @@
<listitem>
<para>
Traditionally, the Java community has been in a state of deep confusion about precisely
- what kinds of meta-information counts as configuration. J2EE and popular "lightweight"
+ what kinds of meta-information counts as configuration. Java EE and popular "lightweight"
containers have provided XML-based deployment descriptors both for things which are
truly configurable between different deployments of the system, and for any other kinds
or declaration which can not easily be expressed in Java. Java 5 annotations changed
@@ -222,8 +238,8 @@
difficult task for Java web applications. Therefore, Seam provides for testability of Seam
applications as a core feature of the framework. You can easily write JUnit or TestNG tests
that reproduce a whole interaction with a user, exercising all components of the system
- apart from the view (the JSP or Facelets page). You can run these tests directly inside your
- IDE, where Seam will automatically deploy EJB components using JBoss Embedded.
+ apart from the view. You can run these tests directly inside your
+ IDE, where Seam will automatically deploy EJB components using Arquillian.
</para>
</listitem>
</varlistentry>
@@ -253,7 +269,7 @@
be amazed at how many problems become simpler...
</para>
<para>
- Seam integrates JPA and Hibernate3 for persistence, the EJB Timer Service and Quartz
+ Seam integrates JPA and Hibernate for persistence, the EJB Timer Service and Quartz
for lightweight asychronicity, jBPM for workflow, JBoss Rules for business rules, Meldware
Mail for email, Hibernate Search and Lucene for full text search, JMS for messaging and JBoss
Cache for page fragment caching. Seam layers an innovative rule-based security framework over
@@ -268,10 +284,9 @@
<term><emphasis>Get started now!</emphasis></term>
<listitem>
<para>
- Seam works in any Java EE application server, and even works in Tomcat. If your environment
- supports EJB 3.0, great! If it doesn't, no problem, you can use Seam's built-in transaction
- management with JPA or Hibernate3 for persistence. Or, you can deploy JBoss Embedded in
- Tomcat, and get full support for EJB 3.0.
+ Seam should work in any Java EE application server, and even works in Tomcat. If your environment
+ supports EJB 3.0 or 3.1, great! If it doesn't, no problem, you can use Seam's built-in transaction
+ management with JPA or Hibernate for persistence.
</para>
</listitem>
</varlistentry>
@@ -284,7 +299,7 @@
</mediaobject>
<para>
- It turns out that the combination of Seam, JSF and EJB3 is <emphasis>the</emphasis> simplest way
+ It turns out that the combination of Seam, JSF and EJB is <emphasis>the</emphasis> simplest way
to write a complex web application in Java. You won't believe how little code is required!
</para>
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Tutorial.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Tutorial.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Tutorial.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -668,8 +668,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
+ http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+ version="2.0">
<persistence-unit name="userDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
@@ -1113,7 +1113,7 @@
<section>
<title>Understanding the code</title>
- <para> The center of this example is the jBPM process definition. There are also two JSPs and two trivial
+ <para> The center of this example is the jBPM process definition. There are also two JSFs and two trivial
JavaBeans (There was no reason to use session beans, since they do not access the database, or have any
other transactional behavior). Let's start with the process definition: </para>
<!-- Can't use code hightlighting with callouts -->
@@ -2311,18 +2311,18 @@
]]></programlisting>
<calloutlist>
<callout arearefs="booking-support-element">
- <para> The RichFaces Ajax <literal><a:ajax></literal> tag allows a JSF action
+ <para> The RichFaces <literal><a:ajax></literal> tag allows a JSF action
event listener to be called by asynchronous <literal>XMLHttpRequest</literal> when a
JavaScript event like <literal>onkeyup</literal> occurs. Even better, the
<literal>reRender</literal> attribute lets us render a fragment of the JSF page and
perform a partial page update when the asynchronous response is received. </para>
</callout>
<callout arearefs="booking-status-element">
- <para> The RichFaces Ajax <literal><a:status></literal> tag lets us display an
+ <para> The RichFaces <literal><a:status></literal> tag lets us display an
animated image while we wait for asynchronous requests to return. </para>
</callout>
<callout arearefs="booking-outputpanel-element">
- <para> The RichFaces Ajax <literal><a:outputPanel></literal> tag defines a region of
+ <para> The RichFaces <literal><a:outputPanel></literal> tag defines a region of
the page which can be re-rendered by an asynchronous request. </para>
</callout>
<callout arearefs="booking-link-element">
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Validation.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Validation.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Validation.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -42,12 +42,12 @@
private String zip;
@NotNull
- @Length(max=30)
+ @Size(max=30)
public String getCountry() { return country; }
public void setCountry(String c) { country = c; }
@NotNull
- @Length(max=6)
+ @Size(max=6)
@Pattern("^\d*$")
public String getZip() { return zip; }
public void setZip(String z) { zip = z; }
@@ -307,7 +307,7 @@
// Getters and setters for name
@NotNull
- @Length(max=6)
+ @Size(max=6)
@ZipCode(message="#{messages['location.zipCode.invalid']}")
public String getZip() { return zip; }
public void setZip(String z) { zip = z; }
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/master.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/master.xml 2012-07-27 11:32:28 UTC (rev 15005)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/master.xml 2012-07-27 14:49:01 UTC (rev 15006)
@@ -41,9 +41,9 @@
<xi:include href="ClusteringAndEJBPassivation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Performance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Testing.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tools.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Weblogic.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Websphere.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Glassfish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<!-- <xi:include href="Tools.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
+<!-- <xi:include href="Weblogic.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
+<!-- <xi:include href="Websphere.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
+<!-- <xi:include href="Glassfish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
<xi:include href="Dependencies.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
12 years, 5 months
Seam SVN: r15005 - in branches/enterprise/JBPAPP_5_0/src/test/integration: src/org/jboss/seam/test/integration and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-07-27 07:32:28 -0400 (Fri, 27 Jul 2012)
New Revision: 15005
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java
Log:
JBPAPP-8159 update PrecedenceComponentTest to verify default values behavior
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml 2012-07-27 11:14:27 UTC (rev 15004)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml 2012-07-27 11:32:28 UTC (rev 15005)
@@ -59,5 +59,6 @@
</component>
<component name="component1" class="org.jboss.seam.test.integration.Component1" precedence="10">
<property name="name">Component1Low</property>
+ <property name="defaultValue">Component1override</property>
</component>
</components>
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java 2012-07-27 11:14:27 UTC (rev 15004)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java 2012-07-27 11:32:28 UTC (rev 15005)
@@ -4,6 +4,7 @@
{
private String name;
+ private String defaultValue = "Component1default";
public String getName()
{
@@ -14,5 +15,15 @@
{
this.name = name;
}
-
+
+ public String getDefaultValue()
+ {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ this.defaultValue = defaultValue;
+ }
+
}
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java 2012-07-27 11:14:27 UTC (rev 15004)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java 2012-07-27 11:32:28 UTC (rev 15005)
@@ -4,6 +4,7 @@
{
private String name;
+ private String defaultValue = "Component2default";
public String getName()
{
@@ -14,5 +15,15 @@
{
this.name = name;
}
-
+
+ public String getDefaultValue()
+ {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ this.defaultValue = defaultValue;
+ }
+
}
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-27 11:14:27 UTC (rev 15004)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-27 11:32:28 UTC (rev 15005)
@@ -34,8 +34,9 @@
}
Component2 myPrecedenceComponent = (Component2) component;
Assert.assertEquals(myPrecedenceComponent.getName(), "Component1High");
+ Assert.assertEquals(myPrecedenceComponent.getDefaultValue(), "Component2default");
}
}.run();
}
-}
\ No newline at end of file
+}
12 years, 5 months
Seam SVN: r15004 - in branches/community/Seam_2_3/seam-integration-tests/src/test: resources/WEB-INF and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-07-27 07:14:27 -0400 (Fri, 27 Jul 2012)
New Revision: 15004
Modified:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.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-precedence.xml
Log:
JBSEAM-3138 update PrecedenceComponentTest to verify default values behavior
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java 2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java 2012-07-27 11:14:27 UTC (rev 15004)
@@ -5,7 +5,8 @@
{
private String name;
-
+ private String defaultValue = "Component1default";
+
public String getName()
{
return name;
@@ -15,5 +16,14 @@
{
this.name = name;
}
-
+
+ public String getDefaultValue()
+ {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ this.defaultValue = defaultValue;
+ }
}
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java 2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java 2012-07-27 11:14:27 UTC (rev 15004)
@@ -4,6 +4,7 @@
{
private String name;
+ private String defaultValue = "Component2default";
public String getName()
{
@@ -14,5 +15,15 @@
{
this.name = name;
}
+
+ public String getDefaultValue()
+ {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue)
+ {
+ this.defaultValue = defaultValue;
+ }
}
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-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-27 11:14:27 UTC (rev 15004)
@@ -47,7 +47,8 @@
Assert.fail("component is not expected Component2.class");
}
Component2 myPrecedenceComponent = (Component2) component;
- Assert.assertEquals(myPrecedenceComponent.getName(), "Component1High");
+ Assert.assertEquals("Component1High", myPrecedenceComponent.getName());
+ Assert.assertEquals("Component2default", myPrecedenceComponent.getDefaultValue());
}
}.run();
}
Modified: 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 2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml 2012-07-27 11:14:27 UTC (rev 15004)
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.org/schema/seam/components"
- xmlns:core="http://jboss.org/schema/seam/core"
+ 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>
+ <property name="defaultValue">Component1override</property>
+ </component>
</components>
12 years, 5 months
Seam SVN: r15003 - branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-07-26 03:24:17 -0400 (Thu, 26 Jul 2012)
New Revision: 15003
Modified:
branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java
Log:
FactoryLockTest update with test for JBSEAM-5001
Modified: branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java 2012-07-25 08:29:07 UTC (rev 15002)
+++ branches/community/Seam_2_2/src/test/integration/src/org/jboss/seam/test/integration/FactoryLockTest.java 2012-07-26 07:24:17 UTC (rev 15003)
@@ -7,7 +7,6 @@
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.mock.SeamTest;
@@ -36,37 +35,43 @@
}
}
+ private void multiThreadedTest(Thread... threads) throws InterruptedException {
+ exceptionOccured = false;
+
+ for (Thread thread : threads) {
+ thread.start();
+ }
+
+ for (Thread thread : threads) {
+ thread.join();
+ }
+
+ assert !exceptionOccured;
+ }
+
+
// 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
{
- exceptionOccured = false;
- Thread thread1 = new TestThread() {
+ multiThreadedTest(new TestThread() {
@Override
public void runTest() throws Exception
{
FactoryLockTest.this.invokeMethod("foo", "#{factoryLock.test.testOtherFactory()}");
}
- };
-
- Thread thread2 = new TestThread() {
+ },
+
+ new TestThread() {
@Override
public void runTest() throws Exception
{
Thread.sleep(200);
FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
}
- };
-
- thread1.start();
- thread2.start();
-
- thread1.join();
- thread2.join();
-
- assert !exceptionOccured;
+ });
}
// This test is the same as factoryLock test, except it uses the same factory in both threads.
@@ -74,31 +79,46 @@
public void sameFactoryLock()
throws Exception
{
- exceptionOccured = false;
- Thread thread1 = new TestThread() {
+ multiThreadedTest(new TestThread() {
@Override
public void runTest() throws Exception
{
FactoryLockTest.this.invokeMethod("testString", "#{factoryLock.test.testSameFactory()}");
}
- };
+ },
- Thread thread2 = new TestThread() {
+ new TestThread() {
@Override
public void runTest() throws Exception
{
Thread.sleep(200);
FactoryLockTest.this.getValue("testString", "#{factoryLock.testString}");
}
- };
+ });
+ }
+
+ // Test the behavior of two components using factories of each other.
+ // Skip the test, as it causes deadlock.
+ @Test(enabled=false)
+ public void interleavingFactories()
+ throws Exception
+ {
+ multiThreadedTest(new TestThread() {
+ @Override
+ public void runTest() throws Exception
+ {
+ FactoryLockTest.this.getValue("knit(purl)", "#{factoryLock.knitPurl}");
+ }
+ },
- thread1.start();
- thread2.start();
-
- thread1.join();
- thread2.join();
-
- assert !exceptionOccured;
+ 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 {
@@ -132,7 +152,6 @@
@Stateful
@Scope(ScopeType.SESSION)
@Name("factoryLock.test")
- //@JndiName("java:global/test/FactoryLockTest$FactoryLockAction")
public static class FactoryLockAction implements FactoryLockLocal
{
public String testOtherFactory() {
@@ -160,7 +179,7 @@
return (String)Component.getInstance("factoryLock.testString", true);
}
- @Factory(value="factoryLock.testString", scope=ScopeType.EVENT)
+ @Factory(value="factoryLock.testString", scope=ScopeType.SESSION)
public String getTestString() {
return "testString";
}
@@ -170,9 +189,47 @@
@Name("factoryLock.testProducer")
public static class TestProducer {
- @Factory(value="factoryLock.foo", scope=ScopeType.EVENT)
+ @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";
+ }
+ }
}
12 years, 5 months
Seam SVN: r15002 - branches/enterprise/JBPAPP_5_0/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-25 04:29:07 -0400 (Wed, 25 Jul 2012)
New Revision: 15002
Modified:
branches/enterprise/JBPAPP_5_0/build/root.pom.xml
Log:
JBPAPP-8042 - upgraded jbpm-jpdl to the latest 3.2.11.SP2
Modified: branches/enterprise/JBPAPP_5_0/build/root.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2012-07-24 15:24:10 UTC (rev 15001)
+++ branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2012-07-25 08:29:07 UTC (rev 15002)
@@ -217,7 +217,7 @@
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-jpdl</artifactId>
- <version>3.2.10</version>
+ <version>3.2.11.SP2</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
12 years, 5 months
Seam SVN: r15001 - in branches/enterprise/JBPAPP_5_0/src: test/integration/resources/WEB-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-24 11:24:10 -0400 (Tue, 24 Jul 2012)
New Revision: 15001
Added:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/testng.xml
Log:
JBPAPP-8159 fixed Component precedence init
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java 2012-07-24 15:11:55 UTC (rev 15000)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/init/Initialization.java 2012-07-24 15:24:10 UTC (rev 15001)
@@ -511,7 +511,19 @@
propName = prop.getQName().getName();
}
String qualifiedPropName = name + '.' + toCamelCase(propName, false);
- properties.put( qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements) );
+ log.info("qualifiedPropName " + qualifiedPropName);
+ //properties.put( qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements) );
+ if (properties.containsKey(qualifiedPropName))
+ {
+ if (isSetProperties(name, precedence))
+ {
+ properties.put(qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements));
+ }
+ }
+ else
+ {
+ properties.put(qualifiedPropName, getPropertyValue(prop, qualifiedPropName, replacements));
+ }
}
for ( Attribute prop: (List<Attribute>) component.attributes() )
@@ -524,7 +536,11 @@
try
{
propValue = getPropertyValue(prop, replacements);
- properties.put( qualifiedPropName, propValue );
+// properties.put( qualifiedPropName, propValue );
+ if (isSetProperties(name, precedence))
+ {
+ properties.put(qualifiedPropName, propValue);
+ }
}
catch (Exception ex)
{
@@ -537,6 +553,25 @@
}
}
+ private boolean isSetProperties(String name, int precedence)
+ {
+ TreeSet<ComponentDescriptor> currentSet = (TreeSet<ComponentDescriptor>) componentDescriptors.get(name);
+ if (currentSet != null)
+ {
+ ComponentDescriptor highestPriorityDescriptor = currentSet.first();
+ if (highestPriorityDescriptor == null)
+ {
+ return true;
+ }
+ return precedence >= highestPriorityDescriptor.getPrecedence();
+ }
+ else
+ {
+ log.info("Component is not in componentDescriptory " + name + " precedence " + precedence);
+ return true;
+ }
+ }
+
/**
* component properties are non-namespaced and not in the reserved attribute list
*/
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml 2012-07-24 15:11:55 UTC (rev 15000)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/resources/WEB-INF/components.xml 2012-07-24 15:24:10 UTC (rev 15001)
@@ -53,6 +53,11 @@
<jms:managed-queue-sender name="testSender"
auto-create="true"
queue-jndi-name="/queue/testQueue" />
-
-
+
+ <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>
Added: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component1.java 2012-07-24 15:24:10 UTC (rev 15001)
@@ -0,0 +1,18 @@
+package org.jboss.seam.test.integration;
+
+public class Component1
+{
+
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+}
Added: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/Component2.java 2012-07-24 15:24:10 UTC (rev 15001)
@@ -0,0 +1,18 @@
+package org.jboss.seam.test.integration;
+
+public class Component2
+{
+
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+}
Added: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/PrecedenceComponentTest.java 2012-07-24 15:24:10 UTC (rev 15001)
@@ -0,0 +1,41 @@
+package org.jboss.seam.test.integration;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.mock.SeamTest;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class PrecedenceComponentTest extends SeamTest
+{
+
+ /**
+ * Test if precedence of component is working correctly
+ * components.xml specifies component1 with 2 possible
+ * configuration - first has got higher precedence than
+ * second and the first should set component1.name property
+ * to Componen1High. Result should be that even last component1
+ * is set the higher precedence configuration has to be set and
+ * remain as the only one available.
+ * JBPAPP-8159 and JBSEAM-3138
+ * @throws Exception
+ */
+ @Test
+ public void testPrecedenceComponents() throws Exception
+ {
+
+ new FacesRequest()
+ {
+ @Override
+ protected void invokeApplication() throws Exception {
+ Object component = Component.getInstance("component1");
+ if (!(component instanceof Component2))
+ {
+ Assert.fail("component is not expected Component2.class");
+ }
+ Component2 myPrecedenceComponent = (Component2) component;
+ Assert.assertEquals(myPrecedenceComponent.getName(), "Component1High");
+ }
+ }.run();
+ }
+
+}
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/testng.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/testng.xml 2012-07-24 15:11:55 UTC (rev 15000)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/testng.xml 2012-07-24 15:24:10 UTC (rev 15001)
@@ -11,6 +11,7 @@
<class name="org.jboss.seam.test.integration.NamespaceResolverTest" />
<class name="org.jboss.seam.test.integration.ConcurrentFactoryTest" />
<class name="org.jboss.seam.test.integration.FactoryLockTest" />
+ <class name="org.jboss.seam.test.integration.PrecedenceComponentTest" />
</classes>
</test>
<test name="Seam Integration Tests - Persistence">
12 years, 5 months