Seam SVN: r9535 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-11-10 01:24:00 -0500 (Mon, 10 Nov 2008)
New Revision: 9535
Added:
trunk/doc/Seam_Reference_Guide/en-US/Performance.xml
Modified:
trunk/doc/Seam_Reference_Guide/en-US/master.xml
Log:
JBSEAM-2704
Added: trunk/doc/Seam_Reference_Guide/en-US/Performance.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Performance.xml (rev 0)
+++ trunk/doc/Seam_Reference_Guide/en-US/Performance.xml 2008-11-10 06:24:00 UTC (rev 9535)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<chapter id="performance">
+ <title>Performance Tuning</title>
+
+ <para>
+ This chapter is an attempt to document in one place all the tips for getting the best performance from
+ your Seam application.
+ </para>
+
+ <section>
+ <title>Bypassing Interceptors</title>
+
+ <para>
+ For repetitive value bindings such as those found in a JSF dataTable or other iterative control
+ (like <literal>ui:repeat</literal>), the full interceptor stack will be invoked for every invocation of
+ the referenced Seam component. The effect of this can result in a substantial performance hit, especially
+ if the component is accessed many times. A significant performance gain can be achieved by disabling the
+ interceptor stack for the Seam component being invoked. To disable interceptors for the component, add the
+ <literal>@BypassInterceptors</literal> annotation to the component class.
+ </para>
+
+ <warning>
+ <para>
+ It is very important to be aware of the implications of disabling interceptors for a Seam component.
+ Features such as bijection, annotated security restrictions, synchronization and others are
+ unavailable for a component marked with <literal>@BypassInterceptors</literal>. While in most cases
+ it is possible to compensate for the loss of these features (e.g. instead of injecting a component
+ using <literal>@In</literal>, you can use <literal>Component.getInstance()</literal> instead) it is
+ important to be aware of the consequences.
+ </para>
+ </warning>
+
+ <para>
+ The following code listing demonstrates a Seam component with its interceptors disabled:
+ </para>
+
+ <programlisting><![CDATA[@Name("foo")
+@Scope(EVENT)
+@BypassInterceptors
+public class Foo
+{
+ public String getRowActions()
+ {
+ // Role-based security check performed inline instead of using @Restrict or other security annotation
+ Identity.instance().checkRole("user");
+
+ // Inline code to lookup component instead of using @In
+ Bar bar = (Bar) Component.getInstance("bar");
+
+ String actions;
+ // some code here that does something
+ return actions;
+ }
+}]]></programlisting>
+
+
+
+ </section>
+
+
+</chapter>
\ No newline at end of file
Modified: trunk/doc/Seam_Reference_Guide/en-US/master.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/master.xml 2008-11-09 23:21:43 UTC (rev 9534)
+++ trunk/doc/Seam_Reference_Guide/en-US/master.xml 2008-11-10 06:24:00 UTC (rev 9535)
@@ -37,6 +37,7 @@
<xi:include href= "Components.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href= "Controls.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href= "Elenhancements.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= "Oc4j.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
16 years
Seam SVN: r9534 - trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-09 18:21:43 -0500 (Sun, 09 Nov 2008)
New Revision: 9534
Modified:
trunk/seam2migration.txt
Log:
merge in updates from 2.0.x branch that were prepared for FP01 release
Modified: trunk/seam2migration.txt
===================================================================
--- trunk/seam2migration.txt 2008-11-08 05:24:53 UTC (rev 9533)
+++ trunk/seam2migration.txt 2008-11-09 23:21:43 UTC (rev 9534)
@@ -1,6 +1,6 @@
Seam 2.0 Migration Guide
========================
-Before you get started with Seam2, you'll need to make a few changes to
+Before you get started with Seam 2, you'll need to make a few changes to
your existing code and configuration. This process should not be too
painful - if you get stuck, just refer back to the updated Seam examples.
@@ -8,7 +8,7 @@
--------------------------------
Seam 2.0 has been tested on the following containers:
-* JBoss 4.2 (it is possible to run Seam2 on JBoss 4.0.5 by upgrading JSF)
+* JBoss 4.2 (it's possible to run Seam 2 on JBoss 4.0.5 by upgrading JSF to 1.2)
* Tomcat 6.0 (Tomcat 5.5 is not compatible with JSF 1.2)
* GlassFish V2
* OC4J 11g Technology Preview
@@ -21,23 +21,49 @@
you'll need to make some changes to web.xml:
* remove the MyFaces StartupServletContextListener
-* remove the Ajax4JSF filter and mappings
+* remove the Ajax4JSF filter, mappings, and
+ org.ajax4jsf.VIEW_HANDLERS context parameter
* rename org.jboss.seam.web.SeamFilter to
org.jboss.seam.servlet.SeamFilter
+* rename org.jboss.seam.servlet.ResourceServlet to
+ org.jboss.seam.servlet.SeamResourceServlet
+* change the web-app version from 2.4 to 2.5
+ also change j2ee to javaee in namespace URL
+<web-app 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-app_2_5.xsd"
+ version="2.5">
+ ...
+</web-app>
-Also note that for the JSF RI, client-side state saving is not required.
+Since Seam 1.2, you didn't need any declarations of SeamExceptionFilter
+or SeamRedirectFilter in web.xml, just a single declaration of SeamFilter.
+Make sure you've already made that change.
+Also note that for the JSF RI, client-side state saving, defined by
+the context param javax.faces.STATE_SAVING_METHOD, is not required
+and can be removed (server is the default).
+
You'll also need to make some changes to faces-config.xml:
-* Remove the (Tranactional)SeamPhaseListener declaration
+* Remove the TranactionalSeamPhaseListener or SeamPhaseListener declaration,
+ whichever is currently in use
* Remove the SeamELResolver declaration, if you have one
* Change the declaration of SeamFaceletViewHandler to the standard
- com.sun.facelets.FaceletViewHandler
+ com.sun.facelets.FaceletViewHandler (and make sure it's enabled)
+* Remove the DTD on the document and add the XML Schema declarations to the
+ root tag (<faces-config>)
+<faces-config version="1.2"
+ 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_1_2.xsd">
+ ...
+</faces-config>
-Since Seam 1.2, you didn't need any declarations of SeamExceptionFilter
-or SeamRedirectFilter in web.xml, just a single declaration of SeamFilter.
-Make sure you've already made that change.
-
Code migration
--------------
Seam's built-in components have undergone a major reorganization designed
@@ -47,6 +73,7 @@
* Persistence-related components moved to org.jboss.seam.persistence
* jBPM related components moved to org.jboss.seam.bpm
* JSF-related components moved org.jboss.seam.faces
+ most significantly org.jboss.seam.faces.FacesMessages
* Servlet-related components have moved to org.jboss.seam.web
* Components related to asynchronicity moved to org.jboss.seam.async
* i18n-related components moved to org.jboss.seam.international
@@ -88,39 +115,53 @@
You'll need to update your components.xml file to reflect the new schemas
and namespaces. Take a look at the Seam examples if you're unsure of
-exactly what you need to do.
+exactly what you need to do. Specifically, you are changing the namespace
+URLs to match the Seam version (i.e., 2.0 or 2.1).
-Finally, some declarations must be removed completely:
+Some declarations have moved or must be removed completely:
-* remove <conversation-is-long-running-parameter> from <core:init/>
+* replace <core:managed-persistence-context> and <core:entity-manager-factory> with
+ <persistence:managed-persistence-context> and
+ <persistence:entity-manager-factory>, respectively
+* remove conversation-is-long-running-parameter attribute from <core:manager/>
* remove <core:ejb/>
* remove <core:microcontainer/>
-* replace <core:transaction-listener/> with
- <transaction:ejb-transaction/>
+* replace <core:transaction-listener/> with <transaction:ejb-transaction/>
* replace <core:resource-bundle/> with <core:resource-loader/>
-Note: Seam transaction management is now enabled by default. If you want
- to disable use of Seam-managed transactions, use the following:
+Note: Seam transaction management is now enabled by default. It's now
+ controlled in components.xml rather than by a JSF phase listener
+ declaration in faces-config.xml. If you want to disable use of
+ Seam-managed transactions, use the following:
- <core:init transaction-management-enabled="false"/>
+ <core:init transaction-management-enabled="false"/>
-Note: The expression attribute on event action's has been deprecated in favor of
- execute e.g.:
+Note: The expression attribute on event action's has been deprecated in favor
+ of execute, e.g.
- <event type="org.jboss.seam.notLoggedIn">
+ <event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
+ <event type="org.jboss.seam.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+In 2.1 the security events use the prefix org.jboss.seam.security instead of
+just org.jboss.seam (e.g. org.jboss.seam.security.notLoggedIn). Note that the
+event org.jboss.seam.security.loginSuccessful event should be used in place of
+org.jboss.seam.postAuthenticate for returning to the captured view.
+
Migration to JBoss Embedded
---------------------------
Support for deployment to JBoss Embeddable EJB3 and JBoss Microcontainer
has been removed. Instead, the new JBoss Embedded distribution gives you
a full set of EE-compatible APIs with simplified deployment.
-For testing, you need the jars in Seam's lib/ directory, together with the
-bootstrap/ directory in your classpath. SeamTest will automatically start
-the container. Refer to the Seam examples, or seam-gen, if you have
-trouble.
+For testing, you need the jars in Seam's lib/ directory, together with the
+bootstrap/ directory in your classpath. SeamTest will automatically start
+the container. You can remove any references or artifacts related to the
+JBoss Embeddable EJB3 (e.g., embedded-ejb folder and jboss-beans.xml). Refer
+to the Seam examples or seam-gen if you have trouble.
For Tomcat deployment, follow the instructions in the user guide. You no
longer need any special configuration or packaging for Tomcat deployments.
@@ -137,12 +178,13 @@
Migration to RichFaces 3.1
--------------------------
If you are using RichFaces or Ajax4jsf, a major reorganisation of the codebase
-has occurred. ajax4jsf.jar and richfaces.jar have been replaced by
+has occurred. The JARs ajax4jsf.jar and richfaces.jar have been replaced by
richfaces-api.jar (which should go in your ear lib/ directory) and
richfaces-impl.jar and richfaces-ui.jar (both of which go in WEB-INF/lib).
-s:selectDate has been deprecated in favor of rich:calendar. No more
-development will be done on s:selectDate.
+<s:selectDate> has been deprecated in favor of <rich:calendar>. No more
+development will be done on <s:selectDate>. You can remove the styles related
+to the data picker from your stylesheet to save on unnecessary bandwidth use.
You should check the RichFaces documentation for more information on parameter
name changes and namespace changes.
@@ -156,10 +198,16 @@
Changes to Seam UI
------------------
-* s:decorate has become a naming container. Therefore client ids have changed
- from fooForm:fooInput to fooForm:foo:fooInput (assuming your s:decorate has
- foo as an id.
+* <s:decorate> has become a naming container. Therefore client ids have changed
+ from fooForm:fooInput to fooForm:foo:fooInput, assuming the following declaration
+<h:form id="fooForm">
+ <s:decorate id="foo">
+ <h:inputText id="fooInput" value="#{bean.property}"/>
+ </s:decorate>
+</h:form>
+If you don't provide an id to <s:decorate>, one will be generated by JSF.
+
Changes to seam-gen
-------------------
@@ -181,7 +229,32 @@
Home and Query objects are "action" components, not "model" components
and are therefore placed in the action package. This change makes the
-convensions followed by generate-entities consistent with the convensions
+conventions followed by generate-entities consistent with the convensions
used in the new-entity command.
Remember, model classes are kept separate because they cannot be hot reloaded.
+
+Due to the change from JBoss Embeddable EJB3 to JBoss Embedded for testing,
+it is recommended that you generate a project using seam-gen from Seam 2
+and borrow the build.xml file from that project. If you have made
+significant changes to the build.xml in your project, you may want to focus
+on just migrating the test-related targets.
+
+In order for tests to work under JBoss Embedded, you need to change the
+value of the <datasource> element in resources/META-INF/persistence-test.xml
+(or persistence-test-war.xml) to java:/DefaultDS. The alternative is to
+deploy a -ds.xml file to the bootstrap/deploy folder and use the JNDI name
+defined by that file.
+
+If you use the build.xml from a Seam 2 seam-gen project, you will also need
+the deployed-*.list file(s). These files define which JAR files are packaged
+in the EAR or WAR. They were introduced to externalize this set of JARS from
+the build.xml file.
+
+To accomodate a change in the RichFaces panel, you need to add the following
+style to your stylesheet. Otherwise, you're search criteria block in pages
+created by generate-entities will bleed into the table of results.
+
+.rich-stglpanel-body {
+ overflow: auto;
+}
16 years
Seam SVN: r9533 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-08 00:24:53 -0500 (Sat, 08 Nov 2008)
New Revision: 9533
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
Log:
fix syntax error
Modified: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 04:20:14 UTC (rev 9532)
+++ trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 05:24:53 UTC (rev 9533)
@@ -60,7 +60,7 @@
<literal>http://localhost:8080/seam-space/</literal></ulink>.</para>
<para>If, on the other hand, the example gets packaged as a WAR, then it deploys to a URL like
- <literal>/jboss-seam-<replaceable>example</replaceable>. Most of the examples can be deployed as a WAR
+ <literal>/jboss-seam-<replaceable>example</replaceable></literal>. Most of the examples can be deployed as a WAR
to Tomcat with Embedded JBoss by typing <literal>ant tomcat.deploy</literal>. Several of the examples
can only be deployed as a WAR. Those examples are groovybooking, hibernate, jpa, and spring.
</para>
16 years
Seam SVN: r9532 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 23:20:14 -0500 (Fri, 07 Nov 2008)
New Revision: 9532
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
Log:
mention exception for examples that begin with seam
Modified: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 01:23:43 UTC (rev 9531)
+++ trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 04:20:14 UTC (rev 9532)
@@ -49,18 +49,20 @@
installation, to the location of your JBoss AS installation.</para>
<para>Once you've set the location of JBoss AS and started the application server, you can build and deploy
- any example by typing <literal>ant deploy</literal> in the the directory for that example. Any example
+ any example by typing <literal>ant explode</literal> in the the directory for that example. Any example
that is packaged as an EAR deploys to a URL like
<literal>/seam-<replaceable>example</replaceable></literal>, where <replaceable>example</replaceable> is
- the name of the example folder. For the registration example, the URL would be <ulink
- url="http://localhost:8080/seam-registration/">
- <literal>http://localhost:8080/seam-registration/</literal></ulink>.</para>
+ the name of the example folder, with one exception. If the example folder begins with seam, the prefix
+ "seam" is ommitted. For instance, if JBoss AS is running on port 8080, the URL for the registration
+ example is <ulink url="http://localhost:8080/seam-registration/">
+ <literal>http://localhost:8080/seam-registration/</literal></ulink>, whereas the URL for the seamspace
+ example is <ulink url="http://localhost:8080/seam-space/">
+ <literal>http://localhost:8080/seam-space/</literal></ulink>.</para>
- <para>If, on the other hand, the example
- gets packaged as a WAR, then it deploys to a URL like
+ <para>If, on the other hand, the example gets packaged as a WAR, then it deploys to a URL like
<literal>/jboss-seam-<replaceable>example</replaceable>. Most of the examples can be deployed as a WAR
- to Tomcat with Embedded JBoss. Several of the examples only deploy as a WAR. Those examples are
- groovybooking, hibernate, jpa, and spring.
+ to Tomcat with Embedded JBoss by typing <literal>ant tomcat.deploy</literal>. Several of the examples
+ can only be deployed as a WAR. Those examples are groovybooking, hibernate, jpa, and spring.
</para>
</section>
@@ -90,7 +92,6 @@
example the URL would be <ulink url="http://localhost:8080/jboss-seam-registration/">
<literal>http://localhost:8080/jboss-seam-registration/</literal></ulink>. The same is true
for examples that deploy as a WAR, as mentioned in the previous section.
-
</para>
</section>
@@ -98,10 +99,10 @@
<section>
<title>Running the example tests</title>
<para>
- Most of the examples come with a suite of TestNG integration tests. The easiest way to
- run the tests
- is to run <literal>ant test</literal>. It is also possible
- to run the tests inside your IDE using the TestNG plugin.
+ Most of the examples come with a suite of TestNG integration tests. The easiest way to run the tests is
+ to run <literal>ant test</literal>. It is also possible to run the tests inside your IDE using the
+ TestNG plugin. Consult the readme.txt in the examples directory of the Seam distribution for more
+ information.
</para>
</section>
16 years
Seam SVN: r9531 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 20:23:43 -0500 (Fri, 07 Nov 2008)
New Revision: 9531
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
Log:
correct instructions for how to set the JAVA_OPTS environment variable
cleanup formatting
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-11-08 01:22:59 UTC (rev 9530)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-11-08 01:23:43 UTC (rev 9531)
@@ -49,23 +49,23 @@
<param-value>client</param-value>
</context-param>]]></programlisting>
- <para>
- There is a minor gray area in the JSF specification regarding the mutability of view state values. Since
- Seam uses the JSF view state to back its PAGE scope this can become an issue in some cases. If you're
- using server side state saving with the JSF-RI and you want a PAGE scoped bean to keep its exact value
- for a given view of a page you will need to specify the following context-param. Otherwise if a user
- uses the "back" button a PAGE scoped component will have the latest value if it has changed not the
- value of the "back" page. (see
- <ulink url="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=295">
- Spec Issue
- </ulink>
- ). This setting is not enabled by default because of the performance hit of serializing the JSF view
- with every request.
- </para>
+ <para>
+ There is a minor gray area in the JSF specification regarding the mutability of view state values. Since
+ Seam uses the JSF view state to back its PAGE scope this can become an issue in some cases. If you're
+ using server side state saving with the JSF-RI and you want a PAGE scoped bean to keep its exact value
+ for a given view of a page you will need to specify the following context-param. Otherwise if a user
+ uses the "back" button a PAGE scoped component will have the latest value if it has changed not the
+ value of the "back" page. (see
+ <ulink url="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=295">
+ Spec Issue
+ </ulink>
+ ). This setting is not enabled by default because of the performance hit of serializing the JSF view
+ with every request.
+ </para>
- <programlisting role="XML"><![CDATA[<context-param>
- <param-name>com.sun.faces.serializeServerState</param-name>
- <param-value>true</param-value>
+ <programlisting role="XML"><![CDATA[<context-param>
+ <param-name>com.sun.faces.serializeServerState</param-name>
+ <param-value>true</param-value>
</context-param>]]></programlisting>
</sect2>
@@ -798,9 +798,9 @@
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>]]></programlisting>
- <programlisting role="XML"><![CDATA[<!-- Add this listener -->
- <Listener className="org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener"/>]]></programlisting>
+ <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener" />]]></programlisting>
+ <programlisting role="XML"><![CDATA[ <!-- Add this listener -->
+ <Listener className="org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener" />]]></programlisting>
</listitem>
<listitem>
@@ -810,22 +810,32 @@
<programlisting role="XML"><![CDATA[<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
-
+
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->]]></programlisting>
- <programlisting role="XML"><![CDATA[<!-- Add this listener -->
- <Listener className="org.jboss.embedded.tomcat.WebinfScanner"/>]]></programlisting>
+ <programlisting role="XML"><![CDATA[ <!-- Add this listener -->
+ <Listener className="org.jboss.embedded.tomcat.WebinfScanner" />]]></programlisting>
<programlisting role="XML"><![CDATA[</Context>]]></programlisting>
</listitem>
<listitem>
- <para>If you are using JDK 6, you must set the Java option <literal>sun.lang.ClassLoader.allowArraySyntax</literal> to
- <literal>true</literal> in Tomcat's startup script (either catalina.bat or catalina.sh):
- </para>
-
- <programlisting><![CDATA[set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" -Dsun.lang.ClassLoader.allowArraySyntax=true]]></programlisting>
+ <para>If you are using Sun JDK 6, you need to set the Java option
+ <literal>sun.lang.ClassLoader.allowArraySyntax</literal> to <literal>true</literal> in the
+ JAVA_OPTS environment variable used by the Catalina startup script (catalina.bat on Windows or
+ catalina.sh on Unix).</para>
+
+ <para>Open the script appropriate for your operating system in a text editor. Add a new line
+ immediately below the comments at the top of the file where you will define the JAVA_OPTS
+ environment variable. On Windows, use the following syntax:</para>
+
+ <programlisting><![CDATA[set JAVA_OPTS=%JAVA_OPTS% -Dsun.lang.ClassLoader.allowArraySyntax=true]]></programlisting>
+
+ <para>On Unix, use this syntax instead:</para>
+
+ <programlisting><![CDATA[JAVA_OPTS="$JAVA_OPTS -Dsun.lang.ClassLoader.allowArraySyntax=true"]]></programlisting>
+
</listitem>
</itemizedlist>
16 years
Seam SVN: r9530 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 20:22:59 -0500 (Fri, 07 Nov 2008)
New Revision: 9530
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
Log:
JBSEAM-3553
Modified: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 01:14:45 UTC (rev 9529)
+++ trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2008-11-08 01:22:59 UTC (rev 9530)
@@ -46,14 +46,22 @@
<para>The examples are configured for use on JBoss 4.2. You'll need to set <literal>jboss.home</literal>,
in the shared <literal>build.properties</literal> file in the root folder of your Seam
- installation, to the location of your JBoss AS installation . </para>
+ installation, to the location of your JBoss AS installation.</para>
- <para> Once you've done that and started the application server, you can build
- and deploy any example by typing <literal>ant deploy</literal> in the
- the directory for that example. The examples all deploy to a URL
- like <literal>/seam-<replaceable>example</replaceable></literal>.
- For the registration example, the URL would be <ulink url="http://localhost:8080/seam-registration/">
- <literal>http://localhost:8080/seam-registration/</literal></ulink>. </para>
+ <para>Once you've set the location of JBoss AS and started the application server, you can build and deploy
+ any example by typing <literal>ant deploy</literal> in the the directory for that example. Any example
+ that is packaged as an EAR deploys to a URL like
+ <literal>/seam-<replaceable>example</replaceable></literal>, where <replaceable>example</replaceable> is
+ the name of the example folder. For the registration example, the URL would be <ulink
+ url="http://localhost:8080/seam-registration/">
+ <literal>http://localhost:8080/seam-registration/</literal></ulink>.</para>
+
+ <para>If, on the other hand, the example
+ gets packaged as a WAR, then it deploys to a URL like
+ <literal>/jboss-seam-<replaceable>example</replaceable>. Most of the examples can be deployed as a WAR
+ to Tomcat with Embedded JBoss. Several of the examples only deploy as a WAR. Those examples are
+ groovybooking, hibernate, jpa, and spring.
+ </para>
</section>
@@ -77,10 +85,12 @@
any example for Tomcat.
</para>
- <para>On Tomcat, the examples deploy to URLs like
+ <para>On Tomcat, the examples deploy to URLs like
<literal>/jboss-seam-<replaceable>example</replaceable></literal>, so for the registration
example the URL would be <ulink url="http://localhost:8080/jboss-seam-registration/">
- <literal>http://localhost:8080/jboss-seam-registration/</literal></ulink>.
+ <literal>http://localhost:8080/jboss-seam-registration/</literal></ulink>. The same is true
+ for examples that deploy as a WAR, as mentioned in the previous section.
+
</para>
</section>
16 years
Seam SVN: r9529 - in trunk/examples: booking and 8 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 20:14:45 -0500 (Fri, 07 Nov 2008)
New Revision: 9529
Removed:
trunk/examples/spring/resources/WEB-INF/jboss-web.xml
Modified:
trunk/examples/booking/readme.txt
trunk/examples/groovybooking/readme.txt
trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml
trunk/examples/hibernate/readme.txt
trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml
trunk/examples/jpa/readme.txt
trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml
trunk/examples/readme.txt
trunk/examples/spring/readme.txt
Log:
JBSEAM-3553
Modified: trunk/examples/booking/readme.txt
===================================================================
--- trunk/examples/booking/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/booking/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -1,5 +1,6 @@
Seam Booking Example
====================
+
This example demonstrates the use of Seam in a Java EE 5 environment.
Transaction and persistence context management is handled by the
EJB container.
Modified: trunk/examples/groovybooking/readme.txt
===================================================================
--- trunk/examples/groovybooking/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/groovybooking/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -10,4 +10,4 @@
"jbosswar.explode" to see your changes take effect. When editing Groovy files
from src/model, you need to run "ant jbosswar.explode jbosswar.restart"
-Access the application at http://localhost:8080/seam-groovybooking
+Access the application at http://localhost:8080/jboss-seam-groovybooking
Modified: trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml 2008-11-08 01:14:45 UTC (rev 9529)
@@ -1,9 +1,8 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=seam-groovybooking
+ seam.jboss.org:loader=jboss-seam-groovybooking
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
- <context-root>/seam-groovybooking</context-root>
</jboss-web>
Modified: trunk/examples/hibernate/readme.txt
===================================================================
--- trunk/examples/hibernate/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/hibernate/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -9,7 +9,7 @@
* Install JBoss AS with the default profile
* ant jboss
* Start JBoss AS
- * Access the app at http://localhost:8080/seam-hibernate/
+ * Access the app at http://localhost:8080/jboss-seam-hibernate/
* ant jboss.undeploy
JBoss AS 4.0.5.GA:
@@ -17,7 +17,7 @@
* ant jboss405
* Deploy dist-jboss/jboss-seam-hibernate.war
* Start JBoss AS
- * Access the app at http://localhost:8080/seam-hibernate/
+ * Access the app at http://localhost:8080/jboss-seam-hibernate/
WebLogic 9.2:
* Install WebLogic 9.2
Modified: trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 01:14:45 UTC (rev 9529)
@@ -1,9 +1,8 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=seam-hibernate
+ seam.jboss.org:loader=jboss-seam-hibernate
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
- <context-root>/seam-hibernate</context-root>
</jboss-web>
Modified: trunk/examples/jpa/readme.txt
===================================================================
--- trunk/examples/jpa/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/jpa/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -9,7 +9,7 @@
* Install JBoss AS 4.2.0 GA
* ant jboss
* Start JBoss AS
- * Access the app at http://localhost:8080/seam-jpa/
+ * Access the app at http://localhost:8080/jboss-seam-jpa/
* ant jboss.undeploy
JBoss AS 4.0.5 (with or without EJB3):
@@ -17,7 +17,7 @@
* ant jboss405
* Deploy dist-jboss405/jboss-seam-jpa.war
* Start JBoss AS
- * Access the app at http://localhost:8080/seam-jpa/
+ * Access the app at http://localhost:8080/jboss-seam-jpa/
WebLogic 9.2:
* Install WebLogic 9.2
Modified: trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 01:14:45 UTC (rev 9529)
@@ -1,9 +1,8 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=seam-jpa
+ seam.jboss.org:loader=jboss-seam-jpa
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
- <context-root>/seam-jpa</context-root>
</jboss-web>
Modified: trunk/examples/readme.txt
===================================================================
--- trunk/examples/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -137,9 +137,15 @@
Recall that ${example.name} is the name of the example folder unless the
folder begins with seam, in which the prefix "seam" is omitted. The
- context path is set in META-INF/application.xml for EAR deployments and
- WEB-INF/jboss-web.xml for WAR deployments.
+ context path is set in META-INF/application.xml for EAR deployments.
+ However, WAR deployments use a different naming convention for the context
+ path. If you deploy a WAR example, point your web browser to:
+
+ http://localhost:8080/jboss-seam-${example.name}
+
+ The WAR examples are groovybooking, jpa, hibernate, and spring
+
NOTE: The examples use the HSQL database embedded in JBoss AS
Modified: trunk/examples/spring/readme.txt
===================================================================
--- trunk/examples/spring/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/spring/readme.txt 2008-11-08 01:14:45 UTC (rev 9529)
@@ -5,4 +5,4 @@
as a WAR. It is deployed using the command "ant jbosswar" and undeployed using
the command "ant jbosswar.undeploy".
-Visit http://localhost:8080/seam-spring
+Visit http://localhost:8080/jboss-seam-spring
Deleted: trunk/examples/spring/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/spring/resources/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
+++ trunk/examples/spring/resources/WEB-INF/jboss-web.xml 2008-11-08 01:14:45 UTC (rev 9529)
@@ -1,3 +0,0 @@
-<jboss-web>
- <context-root>/seam-spring</context-root>
-</jboss-web>
16 years
Seam SVN: r9528 - in trunk/examples: blog and 37 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 19:59:54 -0500 (Fri, 07 Nov 2008)
New Revision: 9528
Added:
trunk/examples/dvdstore/resources/jboss-seam-dvdstore-ds.xml
trunk/examples/nestedbooking/resources/jboss-seam-nestedbooking-ds.xml
trunk/examples/spring/resources/WEB-INF/jboss-web.xml
Removed:
trunk/examples/dvdstore/resources/jboss-seam-dvd-ds.xml
trunk/examples/nestedbooking/resources/jboss-seam-nested-booking-ds.xml
Modified:
trunk/examples/blog/readme.txt
trunk/examples/booking/readme.txt
trunk/examples/contactlist/readme.txt
trunk/examples/contactlist/resources/import.sql
trunk/examples/drools/readme.txt
trunk/examples/dvdstore/build.xml
trunk/examples/dvdstore/pom.xml
trunk/examples/dvdstore/readme.txt
trunk/examples/dvdstore/resources/META-INF/application.xml
trunk/examples/dvdstore/resources/META-INF/persistence.xml
trunk/examples/dvdstore/resources/WEB-INF/components.xml
trunk/examples/dvdstore/resources/hibernate.cfg.xml
trunk/examples/excel/readme.txt
trunk/examples/groovybooking/build.xml
trunk/examples/groovybooking/readme.txt
trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml
trunk/examples/hibernate/readme.txt
trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml
trunk/examples/itext/readme.txt
trunk/examples/jpa/readme.txt
trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml
trunk/examples/mail/readme.txt
trunk/examples/messages/readme.txt
trunk/examples/nestedbooking/build.xml
trunk/examples/nestedbooking/resources/META-INF/application.xml
trunk/examples/nestedbooking/resources/META-INF/jboss-app.xml
trunk/examples/numberguess/readme.txt
trunk/examples/quartz/readme.txt
trunk/examples/readme.txt
trunk/examples/registration/readme.txt
trunk/examples/remoting/chatroom/readme.txt
trunk/examples/remoting/helloworld/readme.txt
trunk/examples/remoting/progressbar/readme.txt
trunk/examples/rss/readme.txt
trunk/examples/seambay/readme.txt
trunk/examples/seamdiscs/readme.txt
trunk/examples/seampay/readme.txt
trunk/examples/seamspace/readme.txt
trunk/examples/spring/readme.txt
trunk/examples/todo/readme.txt
trunk/examples/ui/readme.txt
trunk/examples/wicket/readme.txt
Log:
JBSEAM-3553
Modified: trunk/examples/blog/readme.txt
===================================================================
--- trunk/examples/blog/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/blog/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -4,6 +4,6 @@
Transaction and persistence context management is handled by the
EJB container.
-This example can also run in Tomcat with JBoss Embedded.
+This example runs on JBoss AS as an EAR or Tomcat with JBoss Embedded as a WAR.
-example.name=blog
\ No newline at end of file
+example.name=blog
Modified: trunk/examples/booking/readme.txt
===================================================================
--- trunk/examples/booking/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/booking/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -4,6 +4,6 @@
Transaction and persistence context management is handled by the
EJB container.
-This example can also run in Tomcat with JBoss Embedded.
+This example runs on JBoss AS as an EAR or Tomcat with JBoss Embedded as a WAR.
-example.name=booking
\ No newline at end of file
+example.name=booking
Modified: trunk/examples/contactlist/readme.txt
===================================================================
--- trunk/examples/contactlist/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/contactlist/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Contact List Example
=========================
-This example demonstrates the Seam CRUD framework. It runs on both JBoss AS and Tomcat.
-example.name=contactlist
\ No newline at end of file
+This example demonstrates the Seam CRUD framework. It runs on JBoss AS as an
+EAR and Tomcat with JBoss Embedded as a WAR.
+
+example.name=contactlist
Modified: trunk/examples/contactlist/resources/import.sql
===================================================================
--- trunk/examples/contactlist/resources/import.sql 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/contactlist/resources/import.sql 2008-11-08 00:59:54 UTC (rev 9528)
@@ -9,3 +9,4 @@
insert into Contact ( firstName, lastName, cellPhone, address, city, state, zip, country, version ) values ( 'Emmanuel', 'Bernard', null, null, 'Atlanta', 'GA', null, 'USA', 1 )
insert into Contact ( firstName, lastName, cellPhone, address, city, state, zip, country, version ) values ( 'Michael', 'Youngstrom', null, null, 'Salt Lake City', 'UT', null, 'USA', 1 )
insert into Contact ( firstName, lastName, cellPhone, address, city, state, zip, country, version ) values ( 'Jacob', 'Hookom', null, null, 'Minneapolis', 'MN', null, 'USA', 1 )
+insert into Contact ( firstName, lastName, cellPhone, address, city, state, zip, country, version ) values ( 'Dan', 'Allen', null, null, 'Laurel', 'MD', 20724, 'USA', 1 )
Modified: trunk/examples/drools/readme.txt
===================================================================
--- trunk/examples/drools/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/drools/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Drools Example
===================
+
This is a simple example for the Seam tutorial, demonstrating the
-use of jBPM with Drools. It runs on JBoss AS
+use of jBPM with Drools. It runs on JBoss AS as an EAR.
-example.name=drools
\ No newline at end of file
+example.name=drools
Modified: trunk/examples/dvdstore/build.xml
===================================================================
--- trunk/examples/dvdstore/build.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/build.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -4,7 +4,7 @@
<!-- Naming -->
<property name="Name" value="Seam DVD Store Example" />
- <property name="example.name" value="jboss-seam-dvd" />
+ <property name="example.name" value="jboss-seam-dvdstore" />
<!-- Libraries -->
<property name="seam.ui.lib" value="yes" />
@@ -15,7 +15,7 @@
<property name="urlrewrite.lib" value="yes"/>
<!-- Datasource -->
- <property name="example.ds" value="jboss-seam-dvd-ds.xml" />
+ <property name="example.ds" value="jboss-seam-dvdstore-ds.xml" />
<import file="../build.xml" />
Modified: trunk/examples/dvdstore/pom.xml
===================================================================
--- trunk/examples/dvdstore/pom.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/pom.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.examples</groupId>
- <artifactId>jboss-seam-dvd</artifactId>
+ <artifactId>jboss-seam-dvdstore</artifactId>
<parent>
<groupId>org.jboss.seam</groupId>
<artifactId>parent</artifactId>
@@ -12,4 +12,4 @@
</parent>
<packaging>ear</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/examples/dvdstore/readme.txt
===================================================================
--- trunk/examples/dvdstore/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,7 +1,8 @@
Seam DVD Store Example
======================
-This example demonstrates the use of Seam with jBPM pageflow and
-business process management. It runs on JBoss AS and Tomcat
-with embedded JBoss.
-example.name=dvd
+This example demonstrates the use of Seam with jBPM pageflow and business
+process management. It runs on JBoss AS as an EAR and Tomcat with Embedded
+JBoss as a WAR.
+
+example.name=dvdstore
Modified: trunk/examples/dvdstore/resources/META-INF/application.xml
===================================================================
--- trunk/examples/dvdstore/resources/META-INF/application.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/resources/META-INF/application.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -7,13 +7,13 @@
<display-name>DVD Store</display-name>
<module>
- <ejb>jboss-seam-dvd.jar</ejb>
+ <ejb>jboss-seam-dvdstore.jar</ejb>
</module>
<module>
<web>
- <web-uri>jboss-seam-dvd.war</web-uri>
- <context-root>/seam-dvd</context-root>
+ <web-uri>jboss-seam-dvdstore.war</web-uri>
+ <context-root>/seam-dvdstore</context-root>
</web>
</module>
Modified: trunk/examples/dvdstore/resources/META-INF/persistence.xml
===================================================================
--- trunk/examples/dvdstore/resources/META-INF/persistence.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/resources/META-INF/persistence.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -3,9 +3,9 @@
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">
- <persistence-unit name="dvdDatabase">
+ <persistence-unit name="dvdstoreDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>java:/dvdDatasource</jta-data-source>
+ <jta-data-source>java:/dvdstoreDatasource</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
@@ -25,7 +25,7 @@
<property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="jboss.entity.manager.factory.jndi.name"
- value="java:/dvdEntityManagerFactory" />
+ value="java:/dvdstoreEntityManagerFactory" />
</properties>
</persistence-unit>
</persistence>
Modified: trunk/examples/dvdstore/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -29,7 +29,7 @@
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
- persistence-unit-jndi-name="java:/dvdEntityManagerFactory" />
+ persistence-unit-jndi-name="java:/dvdstoreEntityManagerFactory" />
<factory name="order"
value="#{orderHome.instance}"
Modified: trunk/examples/dvdstore/resources/hibernate.cfg.xml
===================================================================
--- trunk/examples/dvdstore/resources/hibernate.cfg.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/resources/hibernate.cfg.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -8,7 +8,7 @@
<session-factory>
<property name="show_sql">false</property>
- <property name="connection.datasource">java:/dvdDatasource</property>
+ <property name="connection.datasource">java:/dvdstoreDatasource</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
Deleted: trunk/examples/dvdstore/resources/jboss-seam-dvd-ds.xml
===================================================================
--- trunk/examples/dvdstore/resources/jboss-seam-dvd-ds.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/dvdstore/resources/jboss-seam-dvd-ds.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE datasources
- PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-
-<datasources>
- <local-tx-datasource>
- <jndi-name>dvdDatasource</jndi-name>
- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}dvd</connection-url>
- <!-- <connection-url>jdbc:hsqldb:.</connection-url> -->
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- </local-tx-datasource>
-
- <mbean code="org.jboss.jdbc.HypersonicDatabase"
- name="jboss:service=Hypersonic,database=dvd">
- <attribute name="Database">dvd</attribute>
- <attribute name="InProcessMode">true</attribute>
- </mbean>
-
- <!-- -->
-<!--
- <local-tx-datasource>
- <jndi-name>dvdDatasource</jndi-name>
- <connection-url>jdbc:mysql://localhost:3306/dvdstore</connection-url>
- <driver-class>com.mysql.jdbc.Driver</driver-class>
- <user-name>gavin</user-name>
- <password></password>
- <exception-sorter-class-name>
- org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
- </exception-sorter-class-name>
-
- <metadata>
- <type-mapping>mySQL</type-mapping>
- </metadata>
- </local-tx-datasource>
--->
-</datasources>
-
Copied: trunk/examples/dvdstore/resources/jboss-seam-dvdstore-ds.xml (from rev 9526, trunk/examples/dvdstore/resources/jboss-seam-dvd-ds.xml)
===================================================================
--- trunk/examples/dvdstore/resources/jboss-seam-dvdstore-ds.xml (rev 0)
+++ trunk/examples/dvdstore/resources/jboss-seam-dvdstore-ds.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>dvdstoreDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}dvdstore</connection-url>
+ <!-- <connection-url>jdbc:hsqldb:.</connection-url> -->
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ </local-tx-datasource>
+
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic,database=dvdstore">
+ <attribute name="Database">dvdstore</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean>
+
+ <!-- -->
+<!--
+ <local-tx-datasource>
+ <jndi-name>dvdstoreDatasource</jndi-name>
+ <connection-url>jdbc:mysql://localhost:3306/dvdstore</connection-url>
+ <driver-class>com.mysql.jdbc.Driver</driver-class>
+ <user-name>gavin</user-name>
+ <password></password>
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+ </local-tx-datasource>
+-->
+</datasources>
+
Property changes on: trunk/examples/dvdstore/resources/jboss-seam-dvdstore-ds.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Modified: trunk/examples/excel/readme.txt
===================================================================
--- trunk/examples/excel/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/excel/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Excel Example
==================
-This example demonstrates the Seam Excel functionality. It runs on both JBoss AS and Tomcat.
-example.name=excel
\ No newline at end of file
+This example demonstrates the Seam Excel functionality. It runs on JBoss AS as
+an EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=excel
Modified: trunk/examples/groovybooking/build.xml
===================================================================
--- trunk/examples/groovybooking/build.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/groovybooking/build.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -24,6 +24,18 @@
<property name="example.ds" value="groovybooking-${profile}-ds.xml" />
<import file="../build.xml" />
+
+ <target name="explode">
+ <fail>Please use the target jbosswar.explode to deploy this application.</fail>
+ </target>
+
+ <target name="restart">
+ <fail>Please use the target jbosswar.restart to restart this application.</fail>
+ </target>
+
+ <target name="unexplode">
+ <fail>Please use the target jbosswar.unexplode to undeploy this application.</fail>
+ </target>
<property name="classes.model.dir" value="${war.dir}/WEB-INF/classes" />
<property name="classes.action.dir" value="${war.dir}/WEB-INF/dev" />
Modified: trunk/examples/groovybooking/readme.txt
===================================================================
--- trunk/examples/groovybooking/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/groovybooking/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -2,9 +2,12 @@
==========================
This is the Hotel Booking example implemented in Groovy Beans and Hibernate JPA.
-It runs on JBoss AS.
+This application runs on JBoss AS, but is deployed as a WAR rather than an EAR.
+Thus, you prefix all the typical targets (explode, restart, unexplode) with
+"jbosswar." (e.g., jbosswar.explode, jbosswar.restart, jbosswar.unexplode).
-When editing Groovy files from action, a simple ant jbosswar.explode is enough
-When editing Groovy files from model, ant explode jbosswar.restart is necessary
+When editing Groovy files from the src/action directory, you can run ant
+"jbosswar.explode" to see your changes take effect. When editing Groovy files
+from src/model, you need to run "ant jbosswar.explode jbosswar.restart"
-Access it at http://localhost:8080/jboss-seam-groovy
\ No newline at end of file
+Access the application at http://localhost:8080/seam-groovybooking
Modified: trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/groovybooking/resources/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,8 +1,9 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=groovybooking
+ seam.jboss.org:loader=seam-groovybooking
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
+ <context-root>/seam-groovybooking</context-root>
</jboss-web>
Modified: trunk/examples/hibernate/readme.txt
===================================================================
--- trunk/examples/hibernate/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/hibernate/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -9,14 +9,15 @@
* Install JBoss AS with the default profile
* ant jboss
* Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
+ * Access the app at http://localhost:8080/seam-hibernate/
+ * ant jboss.undeploy
JBoss AS 4.0.5.GA:
* Install JBoss AS with the default profile (with or without EJB3)
* ant jboss405
* Deploy dist-jboss/jboss-seam-hibernate.war
* Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-hibernate/
+ * Access the app at http://localhost:8080/seam-hibernate/
WebLogic 9.2:
* Install WebLogic 9.2
@@ -68,3 +69,4 @@
WEB/classes/GlassfishDerbyDialect.class is a special hack to get around
a Derby bug in Glassfish TM. You must use it as your Hibernate dialect
if you are using Derby with Glassfish.
+
Modified: trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/hibernate/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,8 +1,9 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=jboss-seam-hibernate
+ seam.jboss.org:loader=seam-hibernate
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
+ <context-root>/seam-hibernate</context-root>
</jboss-web>
Modified: trunk/examples/itext/readme.txt
===================================================================
--- trunk/examples/itext/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/itext/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam iText Example
==================
-This example demonstrates the Seam PDF functionality. It runs on both JBoss AS and Tomcat.
-example.name=itext
\ No newline at end of file
+This example demonstrates the Seam PDF functionality. It runs on JBoss AS as an
+EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=itext
Modified: trunk/examples/jpa/readme.txt
===================================================================
--- trunk/examples/jpa/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/jpa/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -9,14 +9,15 @@
* Install JBoss AS 4.2.0 GA
* ant jboss
* Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-jpa/
+ * Access the app at http://localhost:8080/seam-jpa/
+ * ant jboss.undeploy
JBoss AS 4.0.5 (with or without EJB3):
* Install JBoss AS 4.0.5 with the default J2EE profile
* ant jboss405
* Deploy dist-jboss405/jboss-seam-jpa.war
* Start JBoss AS
- * Access the app at http://localhost:8080/jboss-seam-jpa/
+ * Access the app at http://localhost:8080/seam-jpa/
WebLogic 9.2:
* Install WebLogic 9.2
Modified: trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/jpa/resources-jboss/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,8 +1,9 @@
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
- seam.jboss.org:loader=jboss-seam-jpa
+ seam.jboss.org:loader=seam-jpa
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
+ <context-root>/seam-jpa</context-root>
</jboss-web>
Modified: trunk/examples/mail/readme.txt
===================================================================
--- trunk/examples/mail/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/mail/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Mail Example
==================
-This example demonstrates the Seam Mail functionality. It runs on JBoss AS.
-example.name=mail
\ No newline at end of file
+This example demonstrates the Seam Mail functionality. It runs on JBoss AS as
+an EAR.
+
+example.name=mail
Modified: trunk/examples/messages/readme.txt
===================================================================
--- trunk/examples/messages/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/messages/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Message List Example
=========================
-This is a simple example of the use of @DataModel for the Seam tutorial.
-example.name=messages
\ No newline at end of file
+This is a simple example of the use of @DataModel for the Seam tutorial. It
+runs on JBoss AS as an EAR.
+
+example.name=messages
Modified: trunk/examples/nestedbooking/build.xml
===================================================================
--- trunk/examples/nestedbooking/build.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/nestedbooking/build.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -4,7 +4,7 @@
<!-- Naming -->
<property name="Name" value="Seam on JBoss Nested Booking Example"/>
- <property name="example.name" value="jboss-seam-nested-booking"/>
+ <property name="example.name" value="jboss-seam-nestedbooking"/>
<!-- Libraries to include -->
<property name="seam.ui.lib" value="yes"/>
@@ -13,7 +13,7 @@
<property name="richfaces.lib" value="yes"/>
<!-- Datasource -->
- <property name="example.ds" value="jboss-seam-nested-booking-ds.xml"/>
+ <property name="example.ds" value="jboss-seam-nestedbooking-ds.xml"/>
<import file="../build.xml"/>
</project>
Modified: trunk/examples/nestedbooking/resources/META-INF/application.xml
===================================================================
--- trunk/examples/nestedbooking/resources/META-INF/application.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/nestedbooking/resources/META-INF/application.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -8,13 +8,13 @@
<module>
<web>
- <web-uri>jboss-seam-nested-booking.war</web-uri>
- <context-root>/seam-nested-booking</context-root>
+ <web-uri>jboss-seam-nestedbooking.war</web-uri>
+ <context-root>/seam-nestedbooking</context-root>
</web>
</module>
<module>
- <ejb>jboss-seam-nested-booking.jar</ejb>
+ <ejb>jboss-seam-nestedbooking.jar</ejb>
</module>
<module>
Modified: trunk/examples/nestedbooking/resources/META-INF/jboss-app.xml
===================================================================
--- trunk/examples/nestedbooking/resources/META-INF/jboss-app.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/nestedbooking/resources/META-INF/jboss-app.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,5 @@
<jboss-app>
<loader-repository>
- seam.jboss.org:loader=seam-nested-booking
+ seam.jboss.org:loader=seam-nestedbooking
</loader-repository>
-</jboss-app>
\ No newline at end of file
+</jboss-app>
Deleted: trunk/examples/nestedbooking/resources/jboss-seam-nested-booking-ds.xml
===================================================================
--- trunk/examples/nestedbooking/resources/jboss-seam-nested-booking-ds.xml 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/nestedbooking/resources/jboss-seam-nested-booking-ds.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<datasources>
- <local-tx-datasource>
- <jndi-name>nestedBookingDatasource</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- </local-tx-datasource>
-</datasources>
-
Copied: trunk/examples/nestedbooking/resources/jboss-seam-nestedbooking-ds.xml (from rev 9526, trunk/examples/nestedbooking/resources/jboss-seam-nested-booking-ds.xml)
===================================================================
--- trunk/examples/nestedbooking/resources/jboss-seam-nestedbooking-ds.xml (rev 0)
+++ trunk/examples/nestedbooking/resources/jboss-seam-nestedbooking-ds.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>nestedBookingDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ </local-tx-datasource>
+</datasources>
+
Property changes on: trunk/examples/nestedbooking/resources/jboss-seam-nestedbooking-ds.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Modified: trunk/examples/numberguess/readme.txt
===================================================================
--- trunk/examples/numberguess/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/numberguess/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,8 @@
Seam Number Guess Example
=========================
-This is a simple example for the Seam tutorial, demonstrating the
-use of jBPM-based page flow. It runs on both JBoss AS and Tomcat.
-example.name=numberguess
\ No newline at end of file
+This is a simple example for the Seam tutorial, demonstrating the use of
+jBPM-based page flow. It runs on both JBoss AS as an EAR and Tomcat with
+Embedded JBoss as an EAR.
+
+example.name=numberguess
Modified: trunk/examples/quartz/readme.txt
===================================================================
--- trunk/examples/quartz/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/quartz/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Quartz Example
==================
-This example demonstrates the Seam Quartz Timer functionality. It runs on JBoss AS.
-example.name=quartz
\ No newline at end of file
+This example demonstrates the Seam Quartz Timer functionality. It runs on JBoss
+AS as an EAR.
+
+example.name=quartz
Modified: trunk/examples/readme.txt
===================================================================
--- trunk/examples/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,92 +1,94 @@
Seam Example Applications
=========================
-This directory contains the Seam example applications, which have
-all been tested in the latest release of JBoss 4.2. Most examples have also been
-tested on Tomcat (running JDK 1.5), and some have been tested with other
-application servers.
+This directory contains the Seam example applications, which have all been
+tested on the latest release of JBoss 4.2. All but a few examples have been
+tested on Tomcat (running JDK 1.5), and some have been tested on other
+application servers. Consult the readme.txt file in each of the examples to
+see which additional servers the example supports.
+Below is a list of examples with a brief description. The name of the example,
+refered to later as ${example.name}, is equivalent to the name of the folder
+unless the folder name begins with seam, in which case the prefix "seam" is
+omitted (i.e. seamspace -> space).
blog/ The Seam blog example, showing how to write
- RESTful applications using Seam
+ RESTful applications using Seam.
-booking/ The Seam Booking demo application for EJB 3.0
+booking/ The Seam Booking demo application for EJB 3.0.
contactlist/ The Seam Contact List demo demonstrating use
- of the Seam application framework
+ of the Seam application framework.
drools/ A version of the number guessing example that
- uses Drools with jBPM
+ uses Drools with jBPM.
dvdstore/ The Seam DVD Store demo demonstrating jBPM
- support in Seam
+ support in Seam.
excel/ Demo of excel export support.
-groovybooking/ The Seam Booking demo ported to Groovy
+groovybooking/ The Seam Booking demo ported to Groovy.
-hibernate/ The Seam Booking demo ported to Hibernate3
+hibernate/ The Seam Booking demo ported to Hibernate3.
icefaces/ The Seam Booking demo with ICEfaces, instead of
- Ajax4JSF
+ Ajax4JSF.
-itext/ A demo of the Seam iText integration for generating pdfs
+itext/ A demo of the Seam iText integration for generating PDFs.
-jee5/booking The Seam Booking demo ported to the Java EE 5
- platforms
+jee5/booking The Seam Booking demo ported to the Java EE 5 platforms.
jee5/remoting The Seam remoting helloworld demo ported to the Java EE 5
- platforms
+ platforms.
jpa/ An example of the use of JPA (provided by Hibernate), runs
on many platforms, including non-EE 5 platforms (including
- plain Tomcat)
+ plain Tomcat).
mail/ The Seam mail example demonstrating use of
- facelets-based email templating
+ facelets-based email templating.
messages/ The Seam message list example demonstrating use
- of the @DataModel annotation
+ of the @DataModel annotation.
nestedbooking/ The booking example modified to show the use of nested
- conversations
+ conversations.
numberguess/ The Seam number guessing example, demonstrating
- jBPM pageflow
+ jBPM pageflow.
-quartz/ A port of the Seampay example to use the Quartz dispatcher
+quartz/ A port of the Seampay example to use the Quartz dispatcher.
-registration/ A trivial example for the tutorial
+registration/ A trivial example for the tutorial.
-remoting/chatroom/ The Seam Chat Room example, demostrating Seam
- Remoting
+remoting/chatroom/ The Seam Chat Room example, demostrating Seam remoting.
-remoting/gwt/ An example of using GWT with Seam remoting
+remoting/gwt/ An example of using GWT with Seam remoting.
-remoting/helloworld/ A trivial example using Ajax
+remoting/helloworld/ A trivial example using Ajax.
-remoting/progressbar/ An example of an Ajax progress bar
+remoting/progressbar/ An example of an Ajax progress bar.
-seambay/ An example of using Seam with Web Services
+seambay/ An example of using Seam with Web Services.
-seamdiscs/ Demonstrates Seam, Trinidad, Ajax4jsf and Richfaces
+seamdiscs/ Demonstrates Seam, Trinidad, Ajax4jsf and Richfaces.
seampay/ The Seam Payments demo demonstrating the use of
- asynchronous methods
+ asynchronous methods.
-seamspace/ The Seam Spaces demo demonstrating Seam
- Security
+seamspace/ The Seam Spaces demo demonstrating Seam security.
-spring/ Demonstrates Spring framework integration
+spring/ Demonstrates Spring framework integration.
todo/ The Seam todo list example demonstrating
- jBPM business process management
+ jBPM business process management.
-ui/ Demonstrates some Seam JSF controls
+ui/ Demonstrates some Seam JSF controls.
-wiki/ A fully featured wiki system based on Seam, please
- read wiki/README.txt for installation instructions
-
+wiki/ A fully featured wiki system based on Seam which
+ is used by seamframework.org. Please read
+ wiki/README.txt for installation instructions.
Deploying and Testing an Example Application
@@ -106,21 +108,38 @@
http://seamframework.org/Download
-3. Edit the "build.properties" file and change jboss.home to your
- JBoss AS directory (Seam uses the default profile)
+3. Open the "build.properties" file at the root of the Seam distribution in
+ your editor and change jboss.home to point to your JBoss AS directory
+ (the examples are deployed to the default profile)
4. (Optional) Build Seam by running "ant" the Seam root directory
+ Only required if you are working from an SVN checkout.
-5. Build and deploy the example by running "ant" in the Seam
- "examples/${example.name}" directory
+5. Build and deploy the example by running the following command from the Seam
+ "examples/${example.name}" directory:
+
+ ant explode
+
+ To undeploy the example, run:
+ ant unexplode
+
+ To restart the deployed application, run:
+
+ ant restart
+
6. Start JBoss AS by typing "./run.sh" (on Linux/Unix) or "run" (on Windows)
in the jboss-4.2.3.GA/bin directory
7. Point your web browser to:
- http://localhost:8080/seam-${example.name}/
+ http://localhost:8080/seam-${example.name}
+ Recall that ${example.name} is the name of the example folder unless the
+ folder begins with seam, in which the prefix "seam" is omitted. The
+ context path is set in META-INF/application.xml for EAR deployments and
+ WEB-INF/jboss-web.xml for WAR deployments.
+
NOTE: The examples use the HSQL database embedded in JBoss AS
@@ -140,20 +159,34 @@
http://seamframework.org/Download
-4. Edit the "build.properties" file and change tomcat.home to your
- Tomcat directory
+4. Open the "build.properties" file at the root of the Seam distribution in
+ your editor and change tomcat.home to point to your Tomcat directory
5. (Optional) Build Seam by running "ant" the Seam root directory
+ Only required if you are working from an SVN checkout.
-6. Build and deploy the example by running "ant tomcat.deploy"
- in the Seam "examples/${example.name}" directory
+6. Build and deploy the example by running the following command from the Seam
+ "examples/${example.name}" directory:
+
+ ant tomcat.deploy
+
+ To undeploy the example, run:
+ ant tomcat.undeploy
+
+ To redeploy/restart the deployed application, run:
+
+ ant tomcat.deploy
+
7. Start Tomcat
8. Point your web browser to:
http://localhost:8080/jboss-seam-${example.name}
+ Note that examples deployed to Tomcat use the context path prefix
+ jboss-seam- rather than seam- like with the JBoss AS deployment.
+
Running The TestNG Tests
------------------------
@@ -180,3 +213,4 @@
Make sure all these come before the referenced libraries
3. Locate and run the testng.xml file using the TestNG plugin
+
Modified: trunk/examples/registration/readme.txt
===================================================================
--- trunk/examples/registration/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/registration/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam Registration Example
=========================
-This is a trivial example for the Seam tutorial. It runs on both JBoss AS and Tomcat
-example.name=registration
\ No newline at end of file
+This is a trivial example for the Seam tutorial. It runs on both JBoss AS as an
+EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=registration
Modified: trunk/examples/remoting/chatroom/readme.txt
===================================================================
--- trunk/examples/remoting/chatroom/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/remoting/chatroom/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Remoting/Chatroom Example
==============================
+
This example shows using Seam Remoting to subscribe and publish messages to JMS.
-It runs on both JBoss AS and Tomcat
+It runs on JBoss AS as an EAR and Tomcat with Embedded JBoss as a WAR.
-example.name=chatroom
\ No newline at end of file
+example.name=chatroom
Modified: trunk/examples/remoting/helloworld/readme.txt
===================================================================
--- trunk/examples/remoting/helloworld/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/remoting/helloworld/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Remoting/HelloWorld Example
================================
-This example is a trivial example of Seam Remoting.
-It runs on both JBoss AS and Tomcat
-example.name=helloworld
\ No newline at end of file
+This example is a trivial example of Seam Remoting. It runs on JBoss AS as an
+EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=helloworld
Modified: trunk/examples/remoting/progressbar/readme.txt
===================================================================
--- trunk/examples/remoting/progressbar/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/remoting/progressbar/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Remoting/ProgressBar Example
=================================
-This example shows how to create a progress bar using Seam Remoting.
-It runs on both JBoss AS and Tomcat
-example.name=progressbar
\ No newline at end of file
+This example shows how to create a progress bar using Seam Remoting. It runs
+on JBoss AS as an EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=progressbar
Modified: trunk/examples/rss/readme.txt
===================================================================
--- trunk/examples/rss/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/rss/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,7 @@
Seam RSS Example
==================
-This example demonstrates the Seam RSS functionality. It runs on both JBoss AS and Tomcat.
-example.name=rss
\ No newline at end of file
+This example demonstrates the Seam RSS functionality. It runs on both JBoss AS
+as an EAR and Tomcat with Embedded JBoss as a WAR.
+
+example.name=rss
Modified: trunk/examples/seambay/readme.txt
===================================================================
--- trunk/examples/seambay/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/seambay/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,7 +1,8 @@
SeamBay Example
===============
-This example shows Seam/WS integration.
-It runs on both JBoss AS
+This example shows Seam/WS integration. It runs on JBoss AS as an EAR and
+JBoss with Embedded JBoss as a WAR.
+
Visit http://localhost:8080/seam-bay on JBoss AS
-Visit http://localhost:8080/jboss-seam-bay on Tomcat
\ No newline at end of file
+Visit http://localhost:8080/jboss-seam-bay on Tomcat
Modified: trunk/examples/seamdiscs/readme.txt
===================================================================
--- trunk/examples/seamdiscs/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/seamdiscs/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,7 +1,9 @@
SeamDiscs Example
=================================
-This example runs on JBoss AS 4.2.2.GA or later and Tomcat with Embedded JBoss.
+This example runs on JBoss AS 4.2.2.GA or later as an EAR and Tomcat with
+Embedded JBoss as a WAR.
+
Visit http://localhost:8080/seam-discs (on JBoss AS) or
http://localhost:8080/jboss-seam-discs (on Tomcat).
@@ -26,4 +28,4 @@
<tr:column>
...
</tr:column
-</tr:table>
\ No newline at end of file
+</tr:table>
Modified: trunk/examples/seampay/readme.txt
===================================================================
--- trunk/examples/seampay/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/seampay/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,7 +1,8 @@
SeamPay Example
===============
-This example shows Seam's EJB3 timer support.
-It runs on JBoss AS and Tomcat
+This example shows Seam's EJB3 timer support. It runs on JBoss AS as an EAR
+and Tomcat with Embedded JBoss as a WAR.
+
Visit http://localhost:8080/seam-pay on JBoss AS
-Visit http://localhost:8080/jboss-seam-pay on Tomcat
\ No newline at end of file
+Visit http://localhost:8080/jboss-seam-pay on Tomcat
Modified: trunk/examples/seamspace/readme.txt
===================================================================
--- trunk/examples/seamspace/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/seamspace/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,7 +1,8 @@
SeamSpace Example
===============
-This example demonstrates Seam Security.
-It runs on both JBoss AS and Tomcat
+This example demonstrates Seam Security. It runs on JBoss AS as an EAR and
+Tomcat with Embedded JBoss as a WAR.
+
Visit http://localhost:8080/seam-space on JBoss AS
-Visit http://localhost:8080/jboss-seam-space on Tomcat
\ No newline at end of file
+Visit http://localhost:8080/jboss-seam-space on Tomcat
Modified: trunk/examples/spring/readme.txt
===================================================================
--- trunk/examples/spring/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/spring/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,8 @@
Spring Example
===============
-This example shows Seam/Spring integration.
-Currently it runs on JBoss AS 4.2 only.
-Visit http://localhost:8080/jboss-seam-spring
\ No newline at end of file
+This example shows Seam/Spring integration. Currently it runs on JBoss AS 4.2
+as a WAR. It is deployed using the command "ant jbosswar" and undeployed using
+the command "ant jbosswar.undeploy".
+
+Visit http://localhost:8080/seam-spring
Added: trunk/examples/spring/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/examples/spring/resources/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/examples/spring/resources/WEB-INF/jboss-web.xml 2008-11-08 00:59:54 UTC (rev 9528)
@@ -0,0 +1,3 @@
+<jboss-web>
+ <context-root>/seam-spring</context-root>
+</jboss-web>
Modified: trunk/examples/todo/readme.txt
===================================================================
--- trunk/examples/todo/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/todo/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Todo List Example
======================
+
This is a simple example for the Seam tutorial, demonstrating the
use of jBPM-based business process management.
-example.name=todo
\ No newline at end of file
+example.name=todo
Modified: trunk/examples/ui/readme.txt
===================================================================
--- trunk/examples/ui/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/ui/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,5 +1,6 @@
Seam UI Example
===============
+
This is a simple example demonstrating Seam UI.
-example.name=ui
\ No newline at end of file
+example.name=ui
Modified: trunk/examples/wicket/readme.txt
===================================================================
--- trunk/examples/wicket/readme.txt 2008-11-07 20:45:15 UTC (rev 9527)
+++ trunk/examples/wicket/readme.txt 2008-11-08 00:59:54 UTC (rev 9528)
@@ -1,6 +1,7 @@
Seam Wicket Example
===============
+
This is a port of the Booking example to Wicket.
By default it uses build time instrumentation, but you can use runtime
-instrumentation by specifying -DinstrumentAtBuildTime=false
\ No newline at end of file
+instrumentation by specifying -DinstrumentAtBuildTime=false
16 years
Seam SVN: r9527 - in trunk: src/gen/org/jboss/seam/tool and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-07 15:45:15 -0500 (Fri, 07 Nov 2008)
New Revision: 9527
Added:
trunk/src/gen/org/jboss/seam/tool/CapitalizePropertyTask.java
trunk/src/gen/org/jboss/seam/tool/UncapitalizePropertyTask.java
Removed:
trunk/src/gen/org/jboss/seam/tool/LowercasePropertyTask.java
Modified:
trunk/seam-gen/build.xml
trunk/src/gen/org/jboss/seam/tool/UppercasePropertyTask.java
Log:
JBSEAM-1738
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2008-11-07 13:15:03 UTC (rev 9526)
+++ trunk/seam-gen/build.xml 2008-11-07 20:45:15 UTC (rev 9527)
@@ -41,14 +41,18 @@
classname="org.jboss.seam.tool.PathFilenameTask"
classpathref="seam-gen.lib.path"/>
- <taskdef name="lowercaseProperty"
- classname="org.jboss.seam.tool.LowercasePropertyTask"
- classpathref="seam-gen.lib.path"/>
-
<taskdef name="uppercaseProperty"
classname="org.jboss.seam.tool.UppercasePropertyTask"
classpathref="seam-gen.lib.path"/>
+ <taskdef name="uncapitalizeProperty"
+ classname="org.jboss.seam.tool.UncapitalizePropertyTask"
+ classpathref="seam-gen.lib.path"/>
+
+ <taskdef name="capitalizeProperty"
+ classname="org.jboss.seam.tool.CapitalizePropertyTask"
+ classpathref="seam-gen.lib.path"/>
+
<taskdef name="print"
classname="org.jboss.seam.tool.PrintTask"
classpathref="seam-gen.lib.path"/>
@@ -386,14 +390,21 @@
defaultvalue="${old.hibernate.connection.password}"/>
<property name="old.hibernate.default_schema" value=""/>
- <condition property="hibernate.default_schema.new" value="">
+ <condition property="hibernate.default_schema.entered" value="">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
- <input addproperty="hibernate.default_schema.new"
+ <input addproperty="hibernate.default_schema.entered"
message="Enter the database schema name (it is OK to leave this blank) [${old.hibernate.default_schema}]"
defaultvalue="${old.hibernate.default_schema}"/>
+ <uppercaseProperty name="hibernate.default_schema.uppercase" value="${hibernate.default_schema.entered}"/>
+ <condition property="hibernate.default_schema.new" value="${hibernate.default_schema.uppercase}" else="${hibernate.default_schema.entered}">
+ <equals arg1="${database.type.new}" arg2="oracle"/>
+ </condition>
<property name="old.hibernate.default_catalog" value=""/>
+ <condition property="hibernate.default_catalog.new" value="">
+ <equals arg1="${database.type.new}" arg2="oracle"/>
+ </condition>
<input addproperty="hibernate.default_catalog.new"
message="Enter the database catalog name (it is OK to leave this blank) [${old.hibernate.default_catalog}]"
defaultvalue="${old.hibernate.default_catalog}"/>
@@ -488,7 +499,7 @@
<input addproperty="component.name" message="Enter the Seam component name"/>
- <uppercaseProperty name="interface.name.default" value="${component.name}"/>
+ <capitalizeProperty name="interface.name.default" value="${component.name}"/>
<condition property="interface.name.prompt" value="local interface">
<isset property="project.ear"/>
</condition>
@@ -499,7 +510,7 @@
addproperty="interface.name"
defaultvalue="${interface.name.default}"/>
- <uppercaseProperty name="bean.name.default" value="${component.name}Bean"/>
+ <capitalizeProperty name="bean.name.default" value="${component.name}Bean"/>
<condition property="bean.name" value="${interface.name}">
<isset property="project.war"/>
</condition>
@@ -507,12 +518,12 @@
addproperty="bean.name"
defaultvalue="${bean.name.default}"/>
- <lowercaseProperty name="method.name.default" value="${component.name}"/>
+ <uncapitalizeProperty name="method.name.default" value="${component.name}"/>
<input message="Enter the action method name [${method.name.default}]"
addproperty="method.name"
defaultvalue="${method.name.default}"/>
- <lowercaseProperty name="page.name.default" value="${component.name}"/>
+ <uncapitalizeProperty name="page.name.default" value="${component.name}"/>
<input message="Enter the page name [${page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>
@@ -528,14 +539,14 @@
<target name="entity-input" depends="init">
<input addproperty="entity.name" message="Enter the entity class name"/>
- <lowercaseProperty name="component.name" value="${entity.name}"/>
+ <uncapitalizeProperty name="component.name" value="${entity.name}"/>
- <lowercaseProperty name="masterPage.name.default" value="${component.name}List"/>
+ <uncapitalizeProperty name="masterPage.name.default" value="${component.name}List"/>
<input message="Enter the master page name [${masterPage.name.default}]"
addproperty="masterPage.name"
defaultvalue="${masterPage.name.default}"/>
- <lowercaseProperty name="page.name.default" value="${component.name}"/>
+ <uncapitalizeProperty name="page.name.default" value="${component.name}"/>
<input message="Enter the detail page name [${page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>
@@ -561,12 +572,12 @@
</fail>
- <lowercaseProperty name="component.name.default" value="${entity.name}Query"/>
+ <uncapitalizeProperty name="component.name.default" value="${entity.name}Query"/>
<input addproperty="component.name"
message="Enter the Seam query component name [${component.name.default}]"
defaultvalue="${component.name.default}"/>
- <uppercaseProperty name="bean.name.default" value="${component.name}"/>
+ <capitalizeProperty name="bean.name.default" value="${component.name}"/>
<input message="Enter the query class name [${bean.name.default}]"
addproperty="bean.name"
defaultvalue="${bean.name.default}"/>
@@ -577,7 +588,7 @@
addproperty="query.text"
defaultvalue="${query.default}"/>
- <lowercaseProperty name="page.name.default" value="${component.name}"/>
+ <uncapitalizeProperty name="page.name.default" value="${component.name}"/>
<input message="Enter the query resuls page name [${page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>
Copied: trunk/src/gen/org/jboss/seam/tool/CapitalizePropertyTask.java (from rev 9526, trunk/src/gen/org/jboss/seam/tool/UppercasePropertyTask.java)
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/CapitalizePropertyTask.java (rev 0)
+++ trunk/src/gen/org/jboss/seam/tool/CapitalizePropertyTask.java 2008-11-07 20:45:15 UTC (rev 9527)
@@ -0,0 +1,34 @@
+package org.jboss.seam.tool;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class CapitalizePropertyTask extends Task
+{
+ private String value;
+ private String name;
+
+ @Override
+ public void execute() throws BuildException
+ {
+ if ( value!=null && !"".equals(value) )
+ {
+ getProject().setProperty( name, capitalize(value) );
+ }
+ }
+
+ protected String capitalize(String name)
+ {
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
+ public void setValue(String packageName)
+ {
+ this.value = packageName;
+ }
+
+ public void setName(String propertyName)
+ {
+ this.name = propertyName;
+ }
+}
Property changes on: trunk/src/gen/org/jboss/seam/tool/CapitalizePropertyTask.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: trunk/src/gen/org/jboss/seam/tool/LowercasePropertyTask.java
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/LowercasePropertyTask.java 2008-11-07 13:15:03 UTC (rev 9526)
+++ trunk/src/gen/org/jboss/seam/tool/LowercasePropertyTask.java 2008-11-07 20:45:15 UTC (rev 9527)
@@ -1,34 +0,0 @@
-package org.jboss.seam.tool;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-public class LowercasePropertyTask extends Task
-{
- private String value;
- private String name;
-
- @Override
- public void execute() throws BuildException
- {
- if ( value!=null && !"".equals(value) )
- {
- getProject().setProperty( name, lower(value) );
- }
- }
-
- protected String lower(String name)
- {
- return name.substring(0, 1).toLowerCase() + name.substring(1);
- }
-
- public void setValue(String packageName)
- {
- this.value = packageName;
- }
-
- public void setName(String propertyName)
- {
- this.name = propertyName;
- }
-}
Copied: trunk/src/gen/org/jboss/seam/tool/UncapitalizePropertyTask.java (from rev 9526, trunk/src/gen/org/jboss/seam/tool/LowercasePropertyTask.java)
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/UncapitalizePropertyTask.java (rev 0)
+++ trunk/src/gen/org/jboss/seam/tool/UncapitalizePropertyTask.java 2008-11-07 20:45:15 UTC (rev 9527)
@@ -0,0 +1,34 @@
+package org.jboss.seam.tool;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class UncapitalizePropertyTask extends Task
+{
+ private String value;
+ private String name;
+
+ @Override
+ public void execute() throws BuildException
+ {
+ if ( value!=null && !"".equals(value) )
+ {
+ getProject().setProperty( name, uncapitalize(value) );
+ }
+ }
+
+ protected String uncapitalize(String name)
+ {
+ return name.substring(0, 1).toLowerCase() + name.substring(1);
+ }
+
+ public void setValue(String packageName)
+ {
+ this.value = packageName;
+ }
+
+ public void setName(String propertyName)
+ {
+ this.name = propertyName;
+ }
+}
Property changes on: trunk/src/gen/org/jboss/seam/tool/UncapitalizePropertyTask.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Modified: trunk/src/gen/org/jboss/seam/tool/UppercasePropertyTask.java
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/UppercasePropertyTask.java 2008-11-07 13:15:03 UTC (rev 9526)
+++ trunk/src/gen/org/jboss/seam/tool/UppercasePropertyTask.java 2008-11-07 20:45:15 UTC (rev 9527)
@@ -3,28 +3,34 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
+/**
+ * Defines a new property name with the value converted to uppercase.
+ *
+ * @author Dan Allen
+ */
public class UppercasePropertyTask extends Task
{
+ private String name;
+
private String value;
- private String name;
-
+
@Override
public void execute() throws BuildException
{
- if ( value!=null && !"".equals(value) )
+ if (value != null && !"".equals(value))
{
- getProject().setProperty( name, upper(value) );
+ getProject().setProperty(name, upper(value));
}
}
- protected String upper(String name)
+ protected String upper(String value)
{
- return name.substring(0, 1).toUpperCase() + name.substring(1);
+ return value.toUpperCase();
}
- public void setValue(String packageName)
+ public void setValue(String value)
{
- this.value = packageName;
+ this.value = value;
}
public void setName(String propertyName)
16 years
Seam SVN: r9526 - in branches/enterprise/JBPAPP_4_3_FP01: doc/Seam_Reference_Guide/en-US and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-11-07 08:15:03 -0500 (Fri, 07 Nov 2008)
New Revision: 9526
Modified:
branches/enterprise/JBPAPP_4_3_FP01/doc/Seam_Reference_Guide/en-US/Migration.xml
branches/enterprise/JBPAPP_4_3_FP01/seam2migration.txt
Log:
JBPAPP-1166
Modified: branches/enterprise/JBPAPP_4_3_FP01/doc/Seam_Reference_Guide/en-US/Migration.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/doc/Seam_Reference_Guide/en-US/Migration.xml 2008-11-07 11:53:51 UTC (rev 9525)
+++ branches/enterprise/JBPAPP_4_3_FP01/doc/Seam_Reference_Guide/en-US/Migration.xml 2008-11-07 13:15:03 UTC (rev 9526)
@@ -94,23 +94,27 @@
<para>
Due to an incompatibility between Seam and MyFaces, you had to
use client side state saving in Seam 1.2. Switching to the JSF RI
- 1.2 lifts this restriction.
+ 1.2 lifts this restriction. So remove the context param javax.faces.STATE_SAVING_METHOD.
</para>
</note>
-
</section>
<section>
- <title>Migrating <literal>web.xml</literal> and <literal>faces-config.xml</literal> to Seam 2</title>
-
+ <title>Migrating <literal>web.xml</literal> to Seam 2</title>
+
<para>
- First you should migrate
- <literal>web.xml</literal>
- and
- <literal>faces-config.xml</literal>
- files from DTD to XSD format, if you already haven't done it. It is
- relevant for Seam users before version 1.2.
- </para>
+ First change the <literal>web-app</literal> version from 2.4 to 2.5.
+ There is also change in j2ee to javaee in namespace URL. Declaration of the <literal>web.xml</literal>
+ should look like:</para>
+
+<programlisting role="XML"><![CDATA[<web-app 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-app_2_5.xsd"
+ version="2.5">
+ ...
+</web-app>]]></programlisting>
<para>
In your Seam 1.2 app you may have specified some Seam specific
@@ -151,7 +155,7 @@
</para>
<para>
- Finally, you should have the Seam resouce servlet (just as you did
+ Finally, you should have the Seam resource servlet (just as you did
in Seam 1.2):
</para>
@@ -184,7 +188,6 @@
<url-pattern>*.seam</url-pattern>
</filter-mapping>-->]]></programlisting>
-
<para>
Next, we'll describe the changes you need to make to your JSF
<literal>ViewHandler</literal> configuration. Previously the
@@ -209,14 +212,23 @@
<param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
</context-param>-->]]></programlisting>
- <para>
- And that <literal>FaceletViewHandler</literal> is set in
- <literal>faces-config.xml</literal>:
+
+ </section>
+
+ <section>
+ <title>Migrating <literal>faces-config.xml</literal> to Seam 2</title>
+
+ <para>Remove the DTD on the document and add the XML Schema declarations to the
+ root tag:
</para>
-
- <programlisting role="XML"><![CDATA[<application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
-</application>]]></programlisting>
+<programlisting role="XML"><![CDATA[<faces-config version="1.2"
+ 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_1_2.xsd">
+ ...
+</faces-config>]]></programlisting>
<para>
Seam 1.2 required you to specify either the
@@ -239,13 +251,21 @@
</para>
<programlisting role="XML"><![CDATA[<core:init transaction-management-enabled="false"/>]]></programlisting>
-
+
<para>
To workaround a bug, you may have specified
<literal>SeamELResolver</literal> in
<literal>faces-config.xml</literal>. This is no longer required.
</para>
+ <para>
+ Finally remove <literal>FaceletViewHandler</literal> configuration:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+</application>]]></programlisting>
+
</section>
<section>
@@ -321,8 +341,6 @@
<important>
<para>
- Migrate all configuration XML file from DTD to XSD format if you use an old Seam
- DTD configuration formats.
Don't forget to update the XSD's in <literal>pages.xml</literal> and
<literal>components.xml</literal> to point at the ones for Seam 2.
Just change the suffix from <literal>-1.2.xsd</literal> to
@@ -340,10 +358,6 @@
packages.
</para>
- <para>Also please be sure that you have already migrated your components.xml
- file from DTD to XSD format.
- </para>
-
<para>
You'll need to update both your <literal>components.xml</literal>
and any references in Java code.
@@ -1289,7 +1303,7 @@
<para>
If you are using RichFaces or Ajax4jsf, a major reorganization of
- the project has occurred. <literal>ajax4jsf.jar</literal> and
+ the project has occurred. The jars <literal>ajax4jsf.jar</literal> and
<literal>richfaces.jar</literal> have been replaced by
<literal>richfaces-api.jar</literal> (which should go in your ear
<literal>lib/</literal> directory),
@@ -1299,6 +1313,11 @@
</para>
<para>
+ <s:selectDate> has been deprecated in favor of <rich:calendar>. No more
+ development will be done on <s:selectDate>. You can remove the styles related
+ to the data picker from your stylesheet to save on unnecessary bandwidth use.
+ </para>
+ <para>
You should check the RichFaces documentation for more information on
parameter name changes and namespace changes.
</para>
@@ -1310,20 +1329,84 @@
<para>
As most JSF component sets provide a date selector, the Seam date
- selector (<literal>s:selectDate</literal> has been deprecated. You
+ selector (<s:selectDate>) has been deprecated. You
should replace it with the date selector from the component set you
use.
</para>
<para>
- <literal><s:decorate/></literal> has become a naming container.
+ Selector <s:decorate/> has become a naming container.
Therefore client ids have changed from
<literal>fooForm:fooInput</literal> to
- <literal>fooForm:foo:fooInput</literal> (assuming your
- <literal><s:decorate></literal> has foo as an id).
- </para>
+ <literal>fooForm:foo:fooInput</literal>, assuming the following declaration:</para>
+
+ <programlisting role="XML"><![CDATA[<h:form id="fooForm">
+ <s:decorate id="foo">
+ <h:inputText id="fooInput" value="#{bean.property}"/>
+ </s:decorate>
+</h:form>]]></programlisting>
+
+ <para>If you don't provide an id to <s:decorate>, one will be generated by JSF.</para>
</section>
+
+ <section>
+ <title>Changes to seam-gen</title>
+
+ <para>There was a change in seam-gen regarding
+ how the generated classes are organized when generate-entities is
+ executed.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>Old way:</term>
+ <listitem><para>src/model/com/domain/projectname/model/EntityName.java</para></listitem>
+ <listitem><para>src/action/com/domain/projectname/model/EntityNameHome.java</para></listitem>
+ <listitem><para>src/action/com/domain/projectname/model/EntityNameList.java</para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>New way:</term>
+ <listitem><para>src/model/com/domain/projectname/model/EntityName.java</para></listitem>
+ <listitem><para>src/action/com/domain/projectname/action/EntityNameHome.java</para></listitem>
+ <listitem><para>src/action/com/domain/projectname/action/EntityNameList.java</para></listitem>
+ </varlistentry>
+ </variablelist>
+
+
+ <para>Home and Query objects are <quote>action</quote> components, not <quote>model</quote> components
+ and are therefore placed in the action package. This change makes the
+ conventions followed by generate-entities consistent with the conventions
+ used in the new-entity command.</para>
+
+ <para>Remember, model classes are kept separate because they cannot be hot reloaded.</para>
+
+ <para>Due to the change from JBoss Embeddable EJB3 to JBoss Embedded for testing,
+ it is recommended that you generate a project using seam-gen from Seam 2
+ and borrow the <literal>build.xml</literal> file from that project. If you have made
+ significant changes to the <literal>build.xml</literal> in your project, you may want to focus
+ on just migrating the test-related targets.</para>
+
+ <para>In order for tests to work under JBoss Embedded, you need to change the
+ value of the <datasource> element in <literal>resources/META-INF/persistence-test.xml</literal>
+ (or <literal>persistence-test-war.xml</literal>) to <literal>java:/DefaultDS</literal>. The alternative is to
+ deploy a <literal>*-ds.xml</literal> file to the <literal>bootstrap/deploy</literal> folder and use the JNDI name
+ defined by that file.</para>
+
+ <para>If you use the <literal>build.xml</literal> from a Seam 2 seam-gen project, you will also need
+ the <literal>deployed-*.list</literal> file(s). These files define which JAR files are packaged
+ in the EAR or WAR. They were introduced to externalize this set of JARS from
+ the <literal>build.xml</literal> file.</para>
+
+ <para>To accommodate a change in the RichFaces panel, you need to add the following
+ style to your stylesheet. Otherwise, you're search criteria block in pages
+ created by generate-entities will bleed into the table of results.</para>
+
+<programlisting><![CDATA[.rich-stglpanel-body {
+ overflow: auto;
+}]]></programlisting>
+
+
+ </section>
</section>
</chapter>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam2migration.txt
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam2migration.txt 2008-11-07 11:53:51 UTC (rev 9525)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam2migration.txt 2008-11-07 13:15:03 UTC (rev 9526)
@@ -1,6 +1,6 @@
Seam 2.0 Migration Guide
========================
-Before you get started with Seam2, you'll need to make a few changes to
+Before you get started with Seam 2, you'll need to make a few changes to
your existing code and configuration. This process should not be too
painful - if you get stuck, just refer back to the updated Seam examples.
@@ -12,23 +12,49 @@
you'll need to make some changes to web.xml:
* remove the MyFaces StartupServletContextListener
-* remove the Ajax4JSF filter and mappings
+* remove the Ajax4JSF filter, mappings, and
+ org.ajax4jsf.VIEW_HANDLERS context parameter
* rename org.jboss.seam.web.SeamFilter to
org.jboss.seam.servlet.SeamFilter
+* rename org.jboss.seam.servlet.ResourceServlet to
+ org.jboss.seam.servlet.SeamResourceServlet
+* change the web-app version from 2.4 to 2.5
+ also change j2ee to javaee in namespace URL
+<web-app 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-app_2_5.xsd"
+ version="2.5">
+ ...
+</web-app>
-Also note that for the JSF RI, client-side state saving is not required.
+Since Seam 1.2, you didn't need any declarations of SeamExceptionFilter
+or SeamRedirectFilter in web.xml, just a single declaration of SeamFilter.
+Make sure you've already made that change.
+Also note that for the JSF RI, client-side state saving, defined by
+the context param javax.faces.STATE_SAVING_METHOD, is not required
+and can be removed (server is the default).
+
You'll also need to make some changes to faces-config.xml:
-* Remove the (Tranactional)SeamPhaseListener declaration
+* Remove the TranactionalSeamPhaseListener or SeamPhaseListener declaration,
+ whichever is currently in use
* Remove the SeamELResolver declaration, if you have one
* Change the declaration of SeamFaceletViewHandler to the standard
- com.sun.facelets.FaceletViewHandler
+ com.sun.facelets.FaceletViewHandler (and make sure it's enabled)
+* Remove the DTD on the document and add the XML Schema declarations to the
+ root tag (<faces-config>)
+<faces-config version="1.2"
+ 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_1_2.xsd">
+ ...
+</faces-config>
-Since Seam 1.2, you didn't need any declarations of SeamExceptionFilter
-or SeamRedirectFilter in web.xml, just a single declaration of SeamFilter.
-Make sure you've already made that change.
-
Code migration
--------------
Seam's built-in components have undergone a major reorganization designed
@@ -38,6 +64,7 @@
* Persistence-related components moved to org.jboss.seam.persistence
* jBPM related components moved to org.jboss.seam.bpm
* JSF-related components moved org.jboss.seam.faces
+ most significantly org.jboss.seam.faces.FacesMessages
* Servlet-related components have moved to org.jboss.seam.web
* Components related to asynchronicity moved to org.jboss.seam.async
* i18n-related components moved to org.jboss.seam.international
@@ -79,29 +106,57 @@
You'll need to update your components.xml file to reflect the new schemas
and namespaces. Take a look at the Seam examples if you're unsure of
-exactly what you need to do.
+exactly what you need to do. Specifically, you are changing the namespace
+URLs to match the Seam version (i.e., 2.0 or 2.1).
-Finally, some declarations must be removed completely:
+Some declarations have moved or must be removed completely:
-* remove <conversation-is-long-running-parameter> from <core:init/>
+* replace <core:managed-persistence-context> and <core:entity-manager-factory> with
+ <persistence:managed-persistence-context> and
+ <persistence:entity-manager-factory>, respectively
+* remove conversation-is-long-running-parameter attribute from <core:manager/>
* remove <core:ejb/>
* remove <core:microcontainer/>
-* replace <core:transaction-listener/> with
- <transaction:ejb-transaction/>
+* replace <core:transaction-listener/> with <transaction:ejb-transaction/>
* replace <core:resource-bundle/> with <core:resource-loader/>
-Note: Seam transaction management is now enabled by default. If you want
- to disable use of Seam-managed transactions, use the following:
+Note: Seam transaction management is now enabled by default. It's now
+ controlled in components.xml rather than by a JSF phase listener
+ declaration in faces-config.xml. If you want to disable use of
+ Seam-managed transactions, use the following:
- <core:init transaction-management-enabled="false"/>
+ <core:init transaction-management-enabled="false"/>
-Note: The expression attribute on event action's has been deprecated in favor of
- execute e.g.:
+Note: The expression attribute on event action's has been deprecated in favor
+ of execute, e.g.
- <event type="org.jboss.seam.notLoggedIn">
+ <event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
+ <event type="org.jboss.seam.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+In 2.1 the security events use the prefix org.jboss.seam.security instead of
+just org.jboss.seam (e.g. org.jboss.seam.security.notLoggedIn). Note that the
+event org.jboss.seam.security.loginSuccessful event should be used in place of
+org.jboss.seam.postAuthenticate for returning to the captured view.
+
+Migration to JBoss Embedded
+---------------------------
+Support for deployment to JBoss Embeddable EJB3 and JBoss Microcontainer
+has been removed. Instead, the new JBoss Embedded distribution gives you
+a full set of EE-compatible APIs with simplified deployment.
+
+For testing, you need the jars in Seam's lib/ directory, together with the
+bootstrap/ directory in your classpath. SeamTest will automatically start
+the container. You can remove any references or artifacts related to the
+JBoss Embeddable EJB3 (e.g., embedded-ejb folder and jboss-beans.xml). Refer
+to the Seam examples or seam-gen if you have trouble.
+
+Note that JBoss Embedded is able to bootstrap a datasource from a -ds.xml
+file, so there is no longer a need for jboss-beans.xml.
+
Migration to JBPM 3.2
---------------------
If you are using JBPM for business processes (not just pageflows), you need
@@ -111,12 +166,13 @@
Migration to RichFaces 3.1
--------------------------
If you are using RichFaces or Ajax4jsf, a major reorganisation of the codebase
-has occurred. ajax4jsf.jar and richfaces.jar have been replaced by
+has occurred. The JARs ajax4jsf.jar and richfaces.jar have been replaced by
richfaces-api.jar (which should go in your ear lib/ directory) and
richfaces-impl.jar and richfaces-ui.jar (both of which go in WEB-INF/lib).
-s:selectDate has been deprecated in favor of rich:calendar. No more
-development will be done on s:selectDate.
+<s:selectDate> has been deprecated in favor of <rich:calendar>. No more
+development will be done on <s:selectDate>. You can remove the styles related
+to the data picker from your stylesheet to save on unnecessary bandwidth use.
You should check the RichFaces documentation for more information on parameter
name changes and namespace changes.
@@ -130,10 +186,16 @@
Changes to Seam UI
------------------
-* s:decorate has become a naming container. Therefore client ids have changed
- from fooForm:fooInput to fooForm:foo:fooInput (assuming your s:decorate has
- foo as an id.
+* <s:decorate> has become a naming container. Therefore client ids have changed
+ from fooForm:fooInput to fooForm:foo:fooInput, assuming the following declaration
+<h:form id="fooForm">
+ <s:decorate id="foo">
+ <h:inputText id="fooInput" value="#{bean.property}"/>
+ </s:decorate>
+</h:form>
+If you don't provide an id to <s:decorate>, one will be generated by JSF.
+
Changes to seam-gen
-------------------
@@ -155,7 +217,32 @@
Home and Query objects are "action" components, not "model" components
and are therefore placed in the action package. This change makes the
-convensions followed by generate-entities consistent with the convensions
+conventions followed by generate-entities consistent with the convensions
used in the new-entity command.
Remember, model classes are kept separate because they cannot be hot reloaded.
+
+Due to the change from JBoss Embeddable EJB3 to JBoss Embedded for testing,
+it is recommended that you generate a project using seam-gen from Seam 2
+and borrow the build.xml file from that project. If you have made
+significant changes to the build.xml in your project, you may want to focus
+on just migrating the test-related targets.
+
+In order for tests to work under JBoss Embedded, you need to change the
+value of the <datasource> element in resources/META-INF/persistence-test.xml
+(or persistence-test-war.xml) to java:/DefaultDS. The alternative is to
+deploy a -ds.xml file to the bootstrap/deploy folder and use the JNDI name
+defined by that file.
+
+If you use the build.xml from a Seam 2 seam-gen project, you will also need
+the deployed-*.list file(s). These files define which JAR files are packaged
+in the EAR or WAR. They were introduced to externalize this set of JARS from
+the build.xml file.
+
+To accomodate a change in the RichFaces panel, you need to add the following
+style to your stylesheet. Otherwise, you're search criteria block in pages
+created by generate-entities will bleed into the table of results.
+
+.rich-stglpanel-body {
+ overflow: auto;
+}
16 years