[jboss-cvs] JBossAS SVN: r105084 - in projects/snowdrop/branches/enterprise: Snowdrop_1.0_User_Guide/en-US and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 21 01:11:15 EDT 2010


Author: laubai
Date: 2010-05-21 01:11:13 -0400 (Fri, 21 May 2010)
New Revision: 105084

Added:
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Author_Group.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Book_Info.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Feedback.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Introduction.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Modules.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Preface.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Revision_History.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/UseCases.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Conventions.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Feedback.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Legal_Notice.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.ent
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/account-person.png
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/application-modules.png
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/domain-entities.png
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/pom.xml
   projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/publican.cfg
Modified:
   projects/snowdrop/branches/enterprise/Snowdrop_1.0_User_Guide/en-US/Configuration.xml
   projects/snowdrop/branches/enterprise/Snowdrop_1.1_User_Guide/en-US/Configuration.xml
Log:
Added draft Sportsclub example.

Modified: projects/snowdrop/branches/enterprise/Snowdrop_1.0_User_Guide/en-US/Configuration.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_1.0_User_Guide/en-US/Configuration.xml	2010-05-21 04:41:15 UTC (rev 105083)
+++ projects/snowdrop/branches/enterprise/Snowdrop_1.0_User_Guide/en-US/Configuration.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -71,7 +71,6 @@
 
     <!--<?dbfo-need height="5in" ?>-->
 
-    <informalexample>
       <programlisting lang="XML" language="XML">&lt;context-param&gt;
 &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
 &lt;param-value&gt;classpath*:spring-contexts/*.xml&lt;/param-value&gt;
@@ -85,7 +84,6 @@
 &lt;listener&gt;
 &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
 &lt;/listener&gt;</programlisting>
-    </informalexample>
 
     <para>For changing the type of application context created by the
     <code>DispatcherServlet</code>, use the <code>contextClass</code>
@@ -174,34 +172,35 @@
     <section>
       <title>Installation</title>
 
-      <para>To install the Snowdrop JBoss deployer, unzip the
-      <filename>jboss-spring-deployer.zip</filename> in the
-      <filename>$JBOSS_HOME/server/$PROFILE/deployers</filename> directory of
-      your JBoss Enterprise Application Platform or JBoss Enterprise Web
-      Platform installation.</para>
-
-      <<para>
-        The distribution of Snowdrop does not include the Spring JARs.Please add the following
-        files from the Spring 2.5 distribution in the <code>spring.deployer<code> folder:
+      <para>
+        To install the Snowdrop JBoss deployer, unzip the
+        <filename>jboss-spring-deployer.zip</filename> in the
+        <filename>$JBOSS_HOME/server/$PROFILE/deployers</filename> directory of
+        your JBoss Enterprise Application Platform or JBoss Enterprise Web
+        Platform installation.
       </para>
 
-      <itemizedlist>
-        <listitem>
-          <para>spring-beans.jar;</para>
-        </listitem>
-
-        <listitem>
-          <para>spring-context.jar;</para>
-        </listitem>
-
-        <listitem>
-          <para>spring-core.jar;</para>
-        </listitem>
-
-		<listitem>
-          <para>spring-web.jar.</para>
-        </listitem>
-      </itemizedlist>
+      <note>
+        <title>Snowdrop does not include the Spring JARs</title>
+        <para>
+          Add the following files from the Spring 2.5 distribution to the 
+          <filename>spring.deployer</filename> folder:
+        </para>
+        <itemizedlist>
+          <listitem>
+            <para><filename>spring-beans.jar</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>spring-context.jar</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>spring-core.jar</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>spring-web.jar</filename></para>
+          </listitem>
+        </itemizedlist>
+      </note>
     </section>
 
 	<section>

Modified: projects/snowdrop/branches/enterprise/Snowdrop_1.1_User_Guide/en-US/Configuration.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_1.1_User_Guide/en-US/Configuration.xml	2010-05-21 04:41:15 UTC (rev 105083)
+++ projects/snowdrop/branches/enterprise/Snowdrop_1.1_User_Guide/en-US/Configuration.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -185,16 +185,18 @@
     <section>
       <title>Installation</title>
 
-      <para>To install the Snowdrop JBoss deployer, unzip the
-      <filename>jboss-spring-deployer.zip</filename> in the
-      <filename>$JBOSS_HOME/server/$PROFILE/deployers</filename> directory of
-      your JBoss Enterprise Application Platform or JBoss Enterprise Web
-      Platform installation.</para>
-	  <para>
+      <para>
+        To install the Snowdrop JBoss deployer, unzip the
+        <filename>jboss-spring-deployer.zip</filename> in the
+        <filename>$JBOSS_HOME/server/$PROFILE/deployers</filename> directory of
+        your JBoss Enterprise Application Platform or JBoss Enterprise Web
+        Platform installation.
+      </para>
+	    <para>
         The distribution of Snowdrop does not include the Spring JARs.Please add the following
-        files from the Spring 3.0 distribution in the <code>spring.deployer<code> folder:
+        files from the Spring 3.0 distribution in the <code>spring.deployer</code> folder:
       </para>
-           <itemizedlist>
+     <itemizedlist>
         <listitem>
           <para>org.springframework.beans-3.0.x.RELEASE.jar;</para>
         </listitem>
@@ -206,8 +208,7 @@
         <listitem>
           <para>org.springframework.core-3.0.x.RELEASE.jar;</para>
         </listitem>
-
-		<listitem>
+  		  <listitem>
           <para>org.springframework.web-3.0.x.RELEASE.jar.</para>
         </listitem>
       </itemizedlist>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Author_Group.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Author_Group.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Author_Group.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<authorgroup>
+  <author>
+    <firstname>Marius</firstname>
+    <surname>Bogoevici</surname>
+    <affiliation>
+      <orgname>JBoss by Red Hat</orgname>
+    </affiliation>
+    <email>mariusb at redhat.com</email>
+  </author>
+  <editor>
+    <firstname>Laura</firstname>
+    <surname>Bailey</surname>
+    <affiliation>
+      <orgname>Red Hat</orgname>
+    </affiliation>
+    <email>lbailey at redhat.com</email>
+  </editor>
+</authorgroup>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Book_Info.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Book_Info.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Book_Info.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<bookinfo id="book-guide-guide">
+  <title>Snowdrop Sports Club Example</title>
+  <subtitle>Integrating Spring with the JBoss Enterprise Platforms</subtitle>
+  <productname>JBoss Web Framework Kit</productname>
+  <productnumber>1.1</productnumber>
+  <edition>1.0</edition>
+  <pubsnumber>0</pubsnumber>
+  <abstract>
+    <para>
+      This book provides a walkthrough of the JBoss Snowdrop Sports Club example. It illustrates several use cases for integrating the JBoss Enterprise Platforms with the Spring Framework.
+    </para>
+  </abstract>
+  <corpauthor>
+    <inlinemediaobject>
+      <imageobject>
+        <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"/>
+      </imageobject>
+    </inlinemediaobject>
+  </corpauthor>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Legal_Notice.xml">
+    <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fallback_content/Legal_Notice.xml"/>
+    </xi:fallback>
+  </xi:include>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Author_Group.xml"/>
+</bookinfo>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Feedback.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Feedback.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Feedback.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../Snowdrop_1.0_User_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+	<title>We Need Feedback!</title>
+	<indexterm>
+		<primary>feedback</primary>
+		<secondary>contact information for this manual</secondary>
+	</indexterm>
+	<para>
+		If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in JIRA: <ulink url="http://jira.jboss.org/">http://jira.jboss.org/</ulink> against the product <application>JBoss Enterprise Application Platform</application> and component <emphasis>Documentation</emphasis>.
+	</para>
+	<para>
+		When submitting a bug report, be sure to mention the manual's identifier: &PRODUCT; <citetitle>Snowdrop Sports Club Example</citetitle>.
+	</para>
+	<para>
+		If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
+	</para>
+</section>
+
+

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Introduction.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Introduction.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Introduction.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-guide-Test_Chapter">
+  <title>Introduction</title>
+  
+  <para>
+    The Sports Club application provides a real world-inspired example of
+    integrating Spring with the JBoss Entprise Platforms. It consists of
+    three web applications, which illustrate several use cases through
+    various combinations of components and technologies. It also illustrates
+    how to use the Snowdrop libraries to provide JBoss-specific features,
+    such as creating a standalone deployment of an <classname>ApplicationContext</classname>
+    and injecting beans from that application context into non-Spring
+    components like Enterprise Java Beans (EJB).
+  </para>
+
+  <para>
+    This book aims to illustrate the mechanics of using Spring with different
+    Java EE 5 components in the specific context of the JBoss Enterprise Platforms,
+    and to recommend methods of achieving certain integration goals.
+  </para>
+
+  <para>
+    The Sports Club example is not intended as a guide to creating a domain model.
+    Detailing the various layers of application and UI design is outside the scope
+    of this document. As such, the example application has been designed to
+    illustrate integration use cases, rather than to demonstrate a domain model 
+    that strictly follows principles of object-oriented and domain-driven design.
+  </para>
+
+  <!--<para>The example is not intended to be a guide on creating a domain model,
+  breaking down the various layers of the application or on UI design. While
+  the domain model has attempted to follow the general priciples of
+  object-oriented and domain-driven design, which are commonly associated with
+  Spring application, there are many other options and ways of doing it, which
+  are discussed in far more detail elsewhere. For example, the application
+  uses DAOs (or Repositories in DDD terms), but this shouldn't be viewed as
+  advocacy for using them in absolute terms. A significant number of Spring
+  applications use this particular design, and we have employed it to
+  illustrate the technical integration use cases.</para>-->
+
+  <para>
+    The Sports Club example uses RichFaces as a component library for 
+    JavaServer Faces (JSF). Consult the RichFaces documentation for RichFaces-specific
+    information.
+  </para>
+
+  <section>
+    <title>Prerequisites: making sure you have all you need</title>
+
+    <para>Running the example requires the following setup:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>Java 6 JDK;</para>
+      </listitem>
+
+      <listitem>
+        <para>JBoss AS 5.1.0 GA or later;</para>
+      </listitem>
+
+      <listitem>
+        <para>Maven 2.0.9 or later, with properly set up repositories;</para>
+      </listitem>
+
+      <listitem>
+        <para>The Spring Deployer.</para>
+      </listitem>
+    </itemizedlist>
+
+    <simplesect>
+      <title>Setting up Maven repositories</title>
+
+      <para>The Maven project setup does not make any assumptions where the
+      artifacts used in the project are coming from (which repository), as
+      users may have different settings for their Maven repositories (direct
+      access to community repositories, proxies, enterprise repository with
+      approved artifacts). Therefore, the setup of the repositories is left to
+      the user of the application.</para>
+
+      <para>In the most simple case, this example can be built out of the box
+      if the settings.xml file for the local Maven installation enables the
+      repositories from Maven Central and JBoss Releases. Instructions for
+      setting up the latter can be found at:
+      http://community.jboss.org/wiki/MavenGettingStarted-Users.</para>
+
+      <para>The pom.xml can be modified to include references to other
+      repositories, or equivalent artifact versions (if the build environment
+      uses an enterprise-wide repository in which the artifacts have different
+      version numbers).</para>
+    </simplesect>
+
+    <simplesect>
+      <title>Installing the Spring Deployer in JBoss AS</title>
+
+      <para>For running the application, the Spring Deployer must be installed
+      in JBoss AS. Please refer to the Snowdrop documentation for
+      details.</para>
+    </simplesect>
+  </section>
+
+  <section>
+    <title>How to build and run the examples</title>
+
+    <para>The documentation will provide a more detailed account of the
+    application structure and use cases covered, but sometimes it is easier to
+    just run the application.</para>
+
+    <para>Running the application consists of the following
+    steps:<itemizedlist>
+        <listitem>
+          <para>Building the application</para>
+        </listitem>
+
+        <listitem>
+          <para>Initializing the database</para>
+        </listitem>
+
+        <listitem>
+          <para>Preparing JBoss</para>
+        </listitem>
+
+        <listitem>
+          <para>Deploying the application</para>
+        </listitem>
+
+        <listitem>
+          <para>Starting the database</para>
+        </listitem>
+
+        <listitem>
+          <para>Starting the application server</para>
+        </listitem>
+      </itemizedlist></para>
+
+    <para>Below are some details on how to perform some of these steps.</para>
+
+    <simplesect>
+      <title>Building the application</title>
+
+      <para>In this step we are building the application. The Sportsclub
+      example uses maven, so it can be built by simply running:</para>
+
+      <informalexample>
+        <para><programlisting>mvn clean package</programlisting>This will
+        produce two EAR files, both named sportsclub.ear, located under
+        sportsclub-ear/target and sportsclub-jpa-ear/target. They have the
+        same functionality, but the underlying implementation of the
+        persistence layer is different (one is using Hibernate, and another
+        one uses JPA).</para>
+
+        <para>The application has two main profiles:</para>
+
+        <para><itemizedlist>
+            <listitem>
+              <para>spring-2.5 which builds a Spring 2.5 variant of the
+              application</para>
+            </listitem>
+
+            <listitem>
+              <para>spring-3 which build a Spring 3.0 variant of the
+              application</para>
+            </listitem>
+          </itemizedlist></para>
+      </informalexample>
+    </simplesect>
+
+    <simplesect>
+      <title>Initializing the database</title>
+
+      <para>The application uses a standalone HSQLDB database, which needs to
+      be initialized and started before the application is deployed. In what
+      follows, we will show you how to initialize (or reset) the database, and
+      we will show how to start when we discuss deployment.</para>
+
+      <para>The database is initialised by using maven:</para>
+
+      <informalexample>
+        <programlisting>cd database
+mvn -Pdb-setup</programlisting>
+      </informalexample>
+
+      <para>Once this step has been completed, it does not need to be repeated
+      again before running the application, but it can be repeated if the
+      database needs to be reset.</para>
+    </simplesect>
+
+    <simplesect>
+      <title>Preparing JBoss</title>
+
+      <para>Besides building the application and initializing the database,
+      you need to set up JBoss for running your application. This step
+      involves:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>setting up the Spring Deployer</para>
+        </listitem>
+
+        <listitem>
+          <para>creating a managed DataSource for accessing the
+          database</para>
+        </listitem>
+
+        <listitem>
+          <para>creating a Destination for JMS-related features</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>As explained in the prerequisites, the Spring Deployer will be
+      setup by extracting it into the
+      &lt;JBoss-Home&gt;/servers/&lt;server-instance&gt;/deployers folder.
+      Please refer to the Spring Deployer documentation for details.</para>
+
+      <para>For creating the DataSource and the Destination, you need to use
+      the facilities provided in the jbossconf folder.</para>
+
+      <para><informalexample>
+          <programlisting>cd jbossconf
+</programlisting>
+        </informalexample><informalexample>
+          <para>Modify the jbossconf/jbossas.properties file to indicate the
+          correct location of the JBoss AS installation. A commented example
+          is provided.</para>
+
+          <programlisting>mvn -Pinstall</programlisting>
+        </informalexample>This will copy the datasource and JMS destination
+      definitions into the JBoss server. Like the previous one, this step
+      needs to be executed only once.</para>
+    </simplesect>
+
+    <simplesect>
+      <title>Deploying the application</title>
+
+      <para>Copy one of the two ears produced by the build to the deploy
+      folder of JBoss AS.ou </para>
+
+      <para>The deployment folder is: JBOSS_HOME/server/default/deploy, and
+      the two (alternative) build files are:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>sportsclub-ear/target/sportsclub.ear (Hibernate-based
+          implementation);</para>
+        </listitem>
+
+        <listitem>
+          <para>sportsclub-jpa-ear/target/sportsclub.ear (JPA-based
+          implementation, using Hibernate as the underlying provider).</para>
+        </listitem>
+      </itemizedlist>
+    </simplesect>
+
+    <simplesect>
+      <title>Starting the database</title>
+
+      <para>From the database folder:</para>
+
+      <para><informalexample>
+          <programlisting>cd database
+</programlisting>
+        </informalexample>Execute one of the two startup scripts:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>On Linux and other *nix-like systems:</para>
+
+          <informalexample>
+            <programlisting>./startdb.sh</programlisting>
+          </informalexample>
+        </listitem>
+
+        <listitem>
+          <para>On Windows:</para>
+
+          <informalexample>
+            <programlisting>startdb.bat</programlisting>
+          </informalexample>
+        </listitem>
+      </itemizedlist>
+
+      <para>The database must be always started before the application server
+      is started and the application is deployed. The application can also be
+      deployed in a running application server (for example after making
+      changes to it), but this should always happen while the database is
+      started).</para>
+    </simplesect>
+
+    <simplesect>
+      <title>Special configuration for distinct profiles</title>
+
+      <para>The Sportsclub application can be deployed in different JBoss
+      Application Server profiles. Some of these profiles, like for example
+      the Web profile, do not include a message broker, therefore JMS
+      integration features (see dedicated section) must be disabled. In order
+      to disable JMS integration in the Sportsclub application, the file
+      <code>sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml</code>
+      must be modified by commenting out the following line:<programlisting>&lt;import resource="spring-messaging-context.xml"/&gt;</programlisting></para>
+
+      <para>Uncommenting the line will re-enable the JMS integration
+      features.</para>
+    </simplesect>
+  </section>
+
+  <section>
+    <title>Sportsclub and JBoss Developer Studio</title>
+
+    <para>The easiest way to understand how the application works is by
+    looking at its sources. This guide will show you how you can import the
+    application in JBoss Developer Studio.</para>
+
+    <para>Sportsclub is Maven-based, therefore you will need to create the
+    Eclipse project structure for it. You can do by using the Maven Eclipse
+    plugin:</para>
+
+    <informalexample>
+      <programlisting>mvn eclipse:eclipse -Dwtpversion=2.0</programlisting>
+
+      <para>Alternately, you can install the m2eclipse Maven Eclipse plugin,
+      and use it to import the application.</para>
+    </informalexample>
+  </section>
+</chapter>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Modules.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Modules.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Modules.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,1137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-guide-modules">
+  <title>Using JBoss and Spring together</title>
+
+  <para>This chapter will describe the various Spring and JBoss integration
+  use cases covered by the application and how are they implemented in the
+  various application modules.</para>
+
+  <para>As a Spring application that consists of multiple modules, the main
+  strategy of constructing the global Spring configuration is to provide
+  Spring bean definition fragments in each artifact produced by a module,
+  leaving to the upper layer components to aggregate them by importing. This
+  strategy has multiple benefits: for one, it allows to separate concerns
+  between components - the Spring wiring of certain components is left at the
+  level where the components are defined, so that it can be changed easily if
+  the implementations change.</para>
+
+  <section>
+    <title>A look at the JBoss/Spring integration use cases</title>
+
+    <para>The Sportsclub application covers a number of JBoss and Spring
+    integration use cases. The scenarios selected for this example are
+    focusing on using the Java EE 5 services provided by JBoss AS in Spring
+    applications.</para>
+
+    <para>The use cases can be grouped in categories as follows:<table>
+        <title>Use case list overview</title>
+
+        <tgroup cols="3">
+          <thead>
+            <row>
+              <entry align="center">Category</entry>
+
+              <entry align="center">Use case</entry>
+
+              <entry align="center">How does this involve JBoss AS</entry>
+            </row>
+          </thead>
+
+          <tbody>
+            <row>
+              <entry>Persistence</entry>
+
+              <entry>Spring/Hibernate integration</entry>
+
+              <entry>The application is using a Spring-configured Hibernate
+              SessionFactory using JTA transaction management and bound to
+              JTA. The Hibernate library being used is the one provided by
+              JBoss AS.</entry>
+            </row>
+
+            <row>
+              <entry></entry>
+
+              <entry>Spring/JPA integration</entry>
+
+              <entry>The Persistence Unit is deployed by JBoss and retrieved
+              from JNDI to be injected into Spring beans. PersistenceContext
+              is shared with surrounding EJBs (if any)</entry>
+            </row>
+
+            <row>
+              <entry>Testing</entry>
+
+              <entry>Unit-testing components that have managed infrastructure
+              dependencies</entry>
+
+              <entry>The DataSource and EntityManager are managed by JBoss and
+              acquired from JNDI by Spring when the application is running. In
+              the case of JBoss, developers can test their code in isolation
+              using Spring-specific replacements that 'simulate' the JBoss
+              environment.</entry>
+            </row>
+
+            <row>
+              <entry>Business Logic</entry>
+
+              <entry>Spring-based service beans</entry>
+
+              <entry>The business services are Spring-managed and wrapped into
+              transactions managed by Spring's interceptors. The
+              TransactionManager in use is the JTATransactionManager using
+              JBoss Transactions provided in JBoss AS.</entry>
+            </row>
+
+            <row>
+              <entry></entry>
+
+              <entry>EJBs injected with Spring Beans</entry>
+
+              <entry>The application uses JBoss-deployed EJBs which are
+              injected with Spring beans acquired from an application context
+              bootstrapped by the Spring Deployer. Transactions are managed by
+              EJBs.</entry>
+            </row>
+
+            <row>
+              <entry>User Interface</entry>
+
+              <entry>JSF/Richfaces and Spring integration</entry>
+
+              <entry>The application uses the JBoss AS-provided JSF support,
+              and Richfaces components. The business services and UI-backing
+              instances are Spring beans.</entry>
+            </row>
+
+            <row>
+              <entry></entry>
+
+              <entry>Spring MVC and EJB integration</entry>
+
+              <entry>The application uses Spring MVC and the business logic is
+              implemented using JBoss-deployed EJBs, which are injected into
+              the Spring controllers.</entry>
+            </row>
+
+            <row>
+              <entry>JMS/JCA integration</entry>
+
+              <entry>JMS/Spring integration using JCA</entry>
+
+              <entry>Spring-configured message listeners are used for
+              processing JMS messages from JBoss AS-managed destinations. The
+              application uses the Spring /JCA integration for receiving
+              messages.</entry>
+            </row>
+
+            <row>
+              <entry>Aspect-oriented programming</entry>
+
+              <entry>Spring-based weaving of POJO aspects</entry>
+
+              <entry>This use case does not have any JBoss AS-specific
+              functionality.</entry>
+            </row>
+
+            <row>
+              <entry>JMX</entry>
+
+              <entry>Spring beans are exposed as JMX beans</entry>
+
+              <entry>The JBoss AS MBean Server is used for registering the
+              Spring-exported JMX beans. Consequently, the Spring beans can be
+              managed from the JBoss AS Administration Console.</entry>
+            </row>
+
+            <row>
+              <entry>Web Services</entry>
+
+              <entry>JAX-WS defined web-services are injected with Spring
+              beans</entry>
+
+              <entry>The application uses JBoss AS' support for JAX-WS through
+              JBoss WS, but also Spring to define the underlying business
+              logic, which is injected into the JBoss WS-deployed
+              services.</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table></para>
+  </section>
+
+  <section>
+    <title>The domain model</title>
+
+    <para>The sportsclub-domain module is the only module of the application
+    that does not integrate with Spring directly. However, it is used further
+    in the application as it provides:</para>
+
+    <para><itemizedlist>
+        <listitem>
+          <para>the entities that the application will interact with;</para>
+        </listitem>
+
+        <listitem>
+          <para>the repository interfaces that provide persistence services
+          for the application;</para>
+        </listitem>
+      </itemizedlist>A relevant note regarding the domain module is the use of
+    the term "repository" for the components that are used for retrieving
+    objects from persistence and saving them. The intent behind that is to
+    indicate that the design of the application is emulating the concepts
+    behind Domain-Driven Design, where the objects that are used for providing
+    the persistence and entity lookup functions are part of the domain, rather
+    than simple persistence implementation strategies (as it is the case with
+    the fairly similar Data Access Objects).</para>
+
+    <figure>
+      <title>Domain entities of the application and their connections</title>
+
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/domain-entities.png" />
+        </imageobject>
+      </mediaobject>
+    </figure>
+
+    <para>Figure 3.1 shows the domain entities of the application. A few
+    non-entity domain objects have been ommitted from the diagram. Figure 3.2
+    shows a more detailed overview of the entities involved in the
+    Account/Person relationshiop, including the non-entity domain
+    objects.</para>
+
+    <para><figure>
+        <title>The Account and Person entities</title>
+
+        <mediaobject>
+          <imageobject>
+            <imagedata fileref="images/account-person.png" />
+          </imageobject>
+        </mediaobject>
+      </figure></para>
+  </section>
+
+  <section>
+    <title>Persistence implementation: JPA and Hibernate</title>
+
+    <para>The persistence modules: sportsclub-hibernate-dao and
+    sportsclub-jpa-dao are alternative implementations of the application's
+    persistence strategy. This means that each module will provide:</para>
+
+    <para><itemizedlist>
+        <listitem>
+          <para>implementations for the repository interfaces defined in the
+          sportsclub-domain module;</para>
+        </listitem>
+
+        <listitem>
+          <para>Spring context definition fragments that can be reused
+          elsewhere in the application</para>
+        </listitem>
+      </itemizedlist>Effectively, the Spring configuration fragments will
+    expose a bean implementation for each repository interface defined in the
+    model. This means that the implementations can be swapped at build-time
+    without any change in the business layer. This is the basis for the build
+    process creating two different builds, each based on a different
+    persistence implementation - including a different repository
+    implementation jar and leaving everyting else in the component stack
+    unchanged.</para>
+
+    <para>Each module produces a set of beans that can be injected further
+    into the business services of the application.</para>
+
+    <section>
+      <title>The Hibernate implementation</title>
+
+      <para>The Hibernate-based repository implementation defines a generic
+      superclass defining all the common repository operations that that
+      repository implementations will parametrize by specifying the entity
+      type and primary key type.<informalexample>
+          <para><programlisting lang="JAVA" language="JAVA">public abstract class HibernateRepository&lt;T, I extends Serializable&gt; implements Repository&lt;T, I&gt;
+{
+   protected SessionFactory sessionFactory;
+
+   Class&lt;T&gt; clazz;
+
+   public HibernateRepository(Class&lt;T&gt; clazz)
+   {
+      this.clazz = clazz;
+   }
+
+   public void setSessionFactory(SessionFactory sessionFactory)
+   {
+      this.sessionFactory = sessionFactory;
+   }
+
+   protected Session getCurrentSession()
+   {
+      return this.sessionFactory.getCurrentSession();
+   }
+   
+   public T findById(I id)
+   {
+      return (T)getCurrentSession().get(clazz, id);
+   }
+
+   public void save(T object)
+   {
+      getCurrentSession().saveOrUpdate(object);
+   }
+
+   public void delete(T object)
+   {
+      getCurrentSession().delete(object);
+   }
+
+   public List&lt;T&gt; findAll()
+   {
+      return getCurrentSession().createCriteria(clazz).list();
+   }
+
+
+   public long countAll()
+   {
+      return (Integer)getCurrentSession().createCriteria(clazz).setProjection(Projections.count("id")).uniqueResult();
+   }
+
+   public Criteria applyRange(Criteria criteria, Range range)
+   {
+      return criteria.setFirstResult(range.getMinIndex()).setMaxResults(range.length());
+   }
+}</programlisting>It is important to notice that this implementation and its
+          subclasses are not Spring-based.</para>
+        </informalexample></para>
+
+      <para><informalexample>
+          <para>The only Spring-related component of this module is the
+          configuration which consists of two files:</para>
+
+          <para><itemizedlist>
+              <listitem>
+                <para>spring-hibernate-dao/src/main/resources/dao-context.xml
+                - which contains the Spring bean definitions for the
+                repository implementations, the Spring-based SessionFactory
+                definition (a LocalSessionFactoryBean) and the wiring of
+                SessionFactories into Spring beans</para>
+              </listitem>
+
+              <listitem>
+                <para>spring-hibernate-dao/src/main/resources/infrastructure.xml
+                - which contains the definitions for the
+                infrastructure-related Spring beans, namely: the data source
+                to be used for the Hibernate SessionFactory and the
+                transaction manager</para>
+              </listitem>
+            </itemizedlist>Separating the infrastructure context definition
+          file from the rest of the bean definitions allows to swap the
+          infrastructure definition for unit testing. For example, the
+          Hibernate SessionFactory is configured to use JTA transactions, and
+          allows the Session to shared with a layer of EJBs that delegate to
+          it.</para>
+        </informalexample></para>
+    </section>
+
+    <section>
+      <title>The JPA implementation</title>
+
+      <para>The JPA implementation is, in many respects, very similar to the
+      Hibernate implementation (therefore we won't provide a code example for
+      it). It provides a parametrized superclass that is Spring-agnostic as
+      well (except for the usage of the autowiring annotation - which can be
+      replaced by a simple setter if any reference to Spring needs to be
+      removed). Besides the fact that it is using the JPA API - for example an
+      EntityManager instead of the SessionFactory, the JPA Persistence Unit
+      (and subsequent EntityManager) are created by the application server and
+      not created by Spring (the EntityManager is injected by Spring, but
+      acquired from JNDI). The persistence unit is deployed from within the
+      JPA repository jar, in order to allow the spring-domain jar to be
+      deployed in non-JPA scenarios (e.g. Hibernate) without triggering a
+      persistence unit deployment.</para>
+
+      <para>The Spring application context configuration fragments are very
+      similar to the ones encountered in the Hibernate module:</para>
+
+      <para><itemizedlist>
+          <listitem>
+            <para>spring-jpa-dao/src/main/resources/dao-context.xml - contains
+            the Spring bean definitions for the repository implementations,
+            assuming an EntityManager bean to be defined in the global
+            application context definition</para>
+          </listitem>
+
+          <listitem>
+            <para>spring-jpa-dao/src/main/resources/infrastructure.xml - which
+            contains the definitions for the infrastructure-related Spring
+            beans, namely: the data source to be used for the Hibernate
+            SessionFactory, and the transaction manager</para>
+          </listitem>
+        </itemizedlist></para>
+    </section>
+
+    <section>
+      <title>Unit testing the repositories</title>
+
+      <para>With the infrastructure so tied to the Application Server, how can
+      we test the repositories in isolation, making sure that they work
+      properly, before we even consider integrating them with the rest of the
+      application?</para>
+
+      <para>If at deployment time we will use the JBoss Application Server
+      provided services, for testing we are going to use an embedded database,
+      and Spring's ability to create LocalSessionFactories,
+      LocalEntityManagerFactories and its local transaction management
+      abilities.</para>
+
+      <para>For this, we are going to use the spring-test-infrastructure
+      module, which is a test-scoped dependency. This module contains the
+      modules used for setting up an embedded database (producing a DataSource
+      that can be injected into the LocalSessionFactoryBean and
+      LocalContainerEntityManagerFactoryBean, respectively). The localized
+      SessionFactory and EntityManager definitions are located in the
+      spring-hibernate-dao and spring-jpa-dao modules, respectively.</para>
+
+      <para>The unit tests that are located in the respective modules will use
+      the local infrastructure files and the dao-context.xml files, as in the
+      following example:</para>
+
+      <informalexample>
+        <para><programlisting lang="JAVA">@ContextConfiguration(locations = {"classpath:test-db-infrastructure.xml",
+                                   "classpath:TEST-jpa-infrastructure.xml",
+                                   "classpath:dao-context.xml"})
+ at RunWith(SpringJUnit4ClassRunner.class)
+public class TestJpaAccountRepository
+{
+   /* */
+}
+</programlisting>This configuration reuses the 'application-specific' context
+        configuration fragment, as well as two test-specific (or otherwise
+        said local) context configuration fragments in order tos to create a
+        Spring context in isolation. Thus, the functionality provided by the
+        repositories can be tested outside the running application.</para>
+      </informalexample>
+    </section>
+  </section>
+
+  <section>
+    <title>Service Layer</title>
+
+    <para>On top of the domain and persistence layer sits the service layer of
+    the application. Its role is to co-ordinate the domain objects and
+    repositories in order to perform higher level operations. This is also the
+    layer which provides transaction demarcation. One consideration for which
+    transaction demarcation should be done at service level is to ensure that
+    the changes made by service operations are atomic. Otherwise, concurrent
+    operations may leave the application data in an inconsistent state.
+    Demarcating transactions at the repository/DAO level should be done
+    carefully, taking into consideration that multiple repository/DAO
+    invocations that are not surrounded by a wrapping transactions will
+    execute in separate transactional contexts.</para>
+
+    <para>In the Sportsclub application, there are two variants of
+    implementing the service layer:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>using Spring (Reservations, parts of Invoicing)</para>
+      </listitem>
+
+      <listitem>
+        <para>using EJB (Subscriptions, Invoicing)</para>
+      </listitem>
+    </itemizedlist>
+
+    <para><note>
+        <para>It is possible to define transactions at the repository level,
+        thus avoiding another indirection to the persistence layer for simple
+        persistence operations (finding an object, persisting an
+        object).</para>
+      </note></para>
+
+    <section>
+      <title>The Spring-based service layer</title>
+
+      <para>The Spring-based service layer exposes a number of service beans
+      that can be consumed by the UI, which are injected with the beans
+      defined in the persistence layer. Given how this is a fairly
+      straightforward Spring configuration, we will non insist any more on
+      this topic, except for outlining that this is the level where
+      transaction demarcation is provided by the use of the appropriate Spring
+      annotations. </para>
+    </section>
+
+    <section>
+      <title>The EJB service layer</title>
+
+      <para>A common scenario in Spring/EJB integration is the wrapping of
+      Spring Beans in EJBs. This is very often done in order to get advantage
+      of the services provided by the EJB container (security, declarative
+      transaction management), while keeping some of the objects they
+      collaborate with as simple POJOs. In this scenario, the EJBs form the
+      outermost layer of the business logic, the one that is exposed to the
+      rest of the application (UI). In this scenario, the EJB services are
+      injected with the Spring-based repositories.</para>
+
+      <para>JBoss has its own native support for Spring/EJB integration, in
+      the form of the Spring Deployer and special annotations for injection of
+      Spring beans into EJBs.</para>
+
+      <simplesect>
+        <title>The Spring Deployer</title>
+
+        <para>The Spring Deployer is a JBoss-specific deployer that can be
+        used to bootstrap a Spring ApplicationContext and register it into
+        JNDI. The configuration files for bootstrapping the application
+        context are defined at the EAR level, and the Spring
+        ApplicationContext is shared to all the components. The definition
+        file is simple, and just imports the contexts defined in the JPA
+        jars.</para>
+
+        <informalexample>
+          <para><programlisting>&lt;beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;
+
+    &lt;description&gt;BeanFactory=(SpringDao)&lt;/description&gt;
+
+    &lt;import resource="classpath*:dao-context.xml"/&gt;
+    &lt;import resource="classpath*:infrastructure.xml"/&gt;
+
+
+&lt;/beans&gt;</programlisting></para>
+        </informalexample>
+      </simplesect>
+
+      <simplesect>
+        <title>Injection into EJBs</title>
+
+        <para>Once the ApplicationContext is created, the beans defined there
+        can be injected into EJBs. So, in this case, the Spring repositories
+        will be injected into EJBs as follows:</para>
+
+        <para><informalexample>
+            <para><programlisting>@Stateless
+ at Interceptors(SpringLifecycleInterceptor.class)
+ at LocalBinding(jndiBinding="sportsclub/BillingService")
+public class BillingServiceImpl implements BillingService
+{
+   @Spring(bean = "invoiceRepository", jndiName = "SpringDao")
+   private InvoiceRepository invoiceRepository;
+
+   /* rest of the class definition ommitted */
+}</programlisting></para>
+          </informalexample>The injection task is undertaken by the
+        SpringLifecycleInterceptor. Once it encounters a field or setter
+        annotated with @Spring, it will look for the JNDI-bound application
+        context and inject the corresponding Spring bean.</para>
+      </simplesect>
+    </section>
+  </section>
+
+  <section>
+    <title>Presentation Layer</title>
+
+    <para>The three web applications which compose the Sportsclub package
+    illustrate different ways of integrating Spring and Java EE technologies
+    in the presentation layer:</para>
+
+    <para><itemizedlist>
+        <listitem>
+          <para>JSF/EJB with an underlying Spring layer (Subscriptions)</para>
+        </listitem>
+
+        <listitem>
+          <para>JSF/Spring (Reservations)</para>
+        </listitem>
+
+        <listitem>
+          <para>Spring MVC/EJB (Invoicing)</para>
+        </listitem>
+      </itemizedlist></para>
+
+    <section>
+      <title>Subscriptions: JSF and Spring</title>
+
+      <para>The Subscriptions application uses Richfaces and JSF for the
+      presentation layer and EJB for the business layer, so this part of the
+      application is not Spring-related. </para>
+
+      <para>Although this is somewhat out of the Spring topic, it is worth
+      mentioning for the benefit of the reader that we recommend using Seam
+      for building applications that integrate JSF and EJB in Java EE 5. This
+      type of integration is, however, beyond the scope of the current demo
+      application, so this example is not demonstrating it. Please consult the
+      Seam documentation for detai.</para>
+    </section>
+
+    <section>
+      <title>Reservations: JSF/Spring integration</title>
+
+      <para>The Reservations application is an example of using Spring in an
+      application that uses Richfaces and JSF. Here, Spring beans are used as
+      business services for the application, as well as backing beans for the
+      JSF pages. In the latter case, Spring beans replace the managed beans
+      and other web artifacts used by JSF.</para>
+
+      <para>The Spring application context is bootstrapped by the
+      ContextLoaderListener defined in /WEB-INF/web.xml. The Spring
+      configuration file in use is /WEB-INF/spring-beans.xml, which:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>imports the context definition fragments included in the other
+          JARs of the application (i.e. the JARs that contain the business
+          logic, defined at 4.1)</para>
+        </listitem>
+
+        <listitem>
+          <para>defines a number of Spring beans that are used directly in the
+          web tier by the JSF pages or by the Richfaces components;</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>The Spring configuration file imports the Spring business beans
+      and infrastructure definitions as follows:</para>
+
+      <informalexample>
+        <para><programlisting>&lt;import resource="classpath*:reservations-service.xml"/&gt;
+
+&lt;import resource="classpath*:infrastructure.xml"/&gt;</programlisting></para>
+
+        <para>The following bean is used for backing JSF pages. Please note
+        that Spring beans defined in the web layer may use scopes, and a
+        significant number of the Spring beans used in Reservations
+        application are session-scoped (like the one in the following
+        example). Spring provides a request scope as well, but it is not used
+        in this example.</para>
+
+        <programlisting>&lt;bean id="reservationCreate" class="org.jboss.snowdrop.samples.sportsclub.jsf.beans.ReservationCreate" scope="session" init-method="init"&gt;
+        &lt;property name="reservationService" ref="reservationService"/&gt;
+        &lt;property name="accountService" ref="accountService"/&gt;
+        &lt;property name="accountFilter" ref="accountFilterCreate"/&gt;
+        &lt;property name="equipmentFilter" ref="equipmentFilterCreate"/&gt;
+&lt;/bean&gt;</programlisting>
+
+        <informalexample>
+          <para>In order to be make the Spring beans visible to JSF pages, a
+          special VariableResolver has to be defined in
+          /WEB-INF/faces-config.xml.</para>
+
+          <informalexample>
+            <para><programlisting>&lt;application&gt;
+  &lt;!-- other definitions --&gt;
+  &lt;el-resolver&gt;org.springframework.web.jsf.el.SpringBeanFacesELResolver&lt;/el-resolver&gt;
+&lt;/application&gt;</programlisting>Now, we can use the Spring bean defined
+            above directly in a JSF page, as in the following excerpt from
+            createReservation.xhtml:</para>
+
+            <informalexample>
+              <para><programlisting>&lt;rich:panel&gt;
+                        &lt;f:facet name="header"&gt;Select Account&lt;/f:facet&gt;
+                        &lt;h:form id="AccountSelectForm"&gt;
+                            &lt;rich:extendedDataTable id="accountsTable" value="#{accountFilterCreate}" var="account"
+                                                    selectionMode="single"
+                                                    selection="#{accountFilterCreate.selection}"
+                                                    enableContextMenu="true"
+                                                    height="250px"
+                                                    rows="5"&gt;
+                                &lt;a4j:support event="onselectionchange"
+                                             action="#{reservationCreate.updateSelectedAccount}"
+                                             reRender="reservationDetails"/&gt;
+
+                                &lt;rich:column label="Id" width="7%"&gt;
+                                    &lt;f:facet name="header"&gt;
+                                        &lt;h:outputText value="Id"/&gt;
+                                    &lt;/f:facet&gt;
+                                    &lt;h:outputText value="#{account.id}"/&gt;
+                                &lt;/rich:column&gt;
+
+                                &lt;rich:column label="First Name"&gt;
+                                    &lt;f:facet name="header"&gt;
+                                        &lt;h:outputText value="First Name"/&gt;
+                                    &lt;/f:facet&gt;
+                                    &lt;h:outputText value="#{account.subscriber.name.firstName}"/&gt;
+                                &lt;/rich:column&gt;
+
+                                &lt;rich:column label="Last Name"&gt;
+                                    &lt;f:facet name="header"&gt;
+                                        &lt;h:outputText value="Last Name"/&gt;
+                                    &lt;/f:facet&gt;
+                                    &lt;h:outputText value="#{account.subscriber.name.lastName}"/&gt;
+                                &lt;/rich:column&gt;
+
+                                &lt;rich:column label="City"&gt;
+                                    &lt;f:facet name="header"&gt;
+                                        &lt;h:outputText value="City"/&gt;
+                                    &lt;/f:facet&gt;
+                                    &lt;h:outputText value="#{account.subscriber.address.city}"/&gt;
+                                &lt;/rich:column&gt;
+
+                                &lt;rich:column label="Country"&gt;
+                                    &lt;f:facet name="header"&gt;
+                                        &lt;h:outputText value="Country"/&gt;
+                                    &lt;/f:facet&gt;
+                                    &lt;h:outputText value="#{account.subscriber.address.country}"/&gt;
+                                &lt;/rich:column&gt;
+
+                                &lt;f:facet name="footer"&gt;
+                                    &lt;rich:datascroller id="scrollerAccount" for="accountsTable" maxPages="5"
+                                                       page="#{accountFilterCreate.currentPage}"/&gt;
+                                &lt;/f:facet&gt;
+                            &lt;/rich:extendedDataTable&gt;
+                        &lt;/h:form&gt;
+                    &lt;/rich:panel&gt;</programlisting>All the EL variables
+              that are used in the previous example, including the ones
+              referenced in the Richfaces elements are, in fact, Spring beans.
+              They can be used either as backing beans for retrieving and
+              setting values, as well as for invoking methods corresponding to
+              JSF events.</para>
+            </informalexample>
+          </informalexample>
+        </informalexample>
+      </informalexample>
+    </section>
+
+    <section>
+      <title>Invoicing: Spring MVC and EJB</title>
+
+      <para>The Invoicing application provides another example of
+      interoperability between Spring and the Java EE services provided by
+      JBoss. If in the previous example, the business tier was implemented
+      using Spring and the web tier was using JSF, in this example the roles
+      are reversed: the business tier is using EJB and the web tier is using
+      Spring.</para>
+
+      <para>The Spring MVC beans are defined in the
+      /WEB-INF/spring-servlet-context.xml file, referenced by the Spring MVC
+      DispatcherServlet definition that is described WEB-INF/web.xml. For this
+      implementation, we have chosen the Spring 2.5 annotation-based
+      configuration, and the AccountController class that implements the
+      controller part of the configuration is injected with EJBs defined in
+      section 3.2:</para>
+
+      <para><informalexample>
+          <para><programlisting>@Controller
+public class AccountController
+{
+
+   @EJB(mappedName = "sportsclub/BillingService")
+   BillingService billingService;
+
+   @EJB(mappedName = "sportsclub/SubscriptionService")
+   SubscriptionService subscriptionService;
+
+   /* some code ommitted */
+
+   @RequestMapping(value = "/accountDetail.do", method = RequestMethod.GET)
+   ModelMap getAccountDetail(@RequestParam("id") String id)
+   {
+      Account account = subscriptionService.findAccountById(Long.parseLong(id));
+
+      List&lt;Invoice&gt; invoices = billingService.getInvoices(account);
+
+      boolean hasCurrentInvoice = false;
+      Date currentDate = new Date();
+
+      for (Invoice invoice: invoices)
+      {
+         if (invoice.getBillingPeriod().contains(currentDate))
+         {
+            hasCurrentInvoice = true;
+            break;
+         }
+      }
+
+      List&lt;Payment&gt; payments = billingService.getPayments(account);
+
+      ModelMap model = new ModelMap();
+      model.addAttribute(account);
+      model.addAttribute("invoices", invoices);
+      model.addAttribute("payments", payments);
+      model.addAttribute("hasCurrentInvoice",hasCurrentInvoice);
+      return model;
+   }
+
+
+   @RequestMapping(value = "/generateInvoice.do", method = RequestMethod.POST)
+   ModelMap generateInvoice(@RequestParam("id") String id)
+   {
+      Account account = subscriptionService.findAccountById(Long.parseLong(id));
+      Invoice invoice = billingService.generateInvoice(account);
+
+      ModelMap model = new ModelMap();
+      model.addAttribute("id",id);
+      model.addAttribute(invoice);
+      return model;
+   }
+
+}
+</programlisting>The @Controller annotation will be detected by Spring, as it
+          does a scanning of the classpath which is prompted by including the
+          following line into /WEB-INF/spring-servlet-context.xml.</para>
+
+          <informalexample>
+            <para><programlisting>&lt;context:component-scan base-package="org.jboss.snowdrop.samples.sportsclub.springmvc"/&gt;
+</programlisting></para>
+          </informalexample>
+        </informalexample></para>
+
+      <para>As a Spring-managed object, the bean is injected with the EJBs
+      BillingService and SubscriptionService, as required by annotated the
+      respective fields with the @EJB annotation.</para>
+
+      <para>The @RequestMapping-annotated methods will be executed when the
+      user is accessing the specified URL and HTTP method. The request
+      parameters will be bound to method arguments. In the example above,
+      invoking the URL
+      http://localhost:8080/sportsclub/invoicing/accountDetail.do?id=1 will
+      cause the invocation accountController.getAccountDetail(1). The method
+      will invoke the appropriate business services (in this case, exposed as
+      EJBs) and will return a map of business object collections, indexed by
+      their names. Spring MVC will take care of setting them on the request,
+      so that they can be used for rendering the response.</para>
+
+      <para>By default, Spring MVC will try to find a view whose name is
+      'accountDetail', and based on the view resolver definition from
+      /WEB-INF/spring-servlet-context.xml, it will use the JSP file at
+      /WEB-INF/jsp/accountDetail.jsp. This JSP uses the Spring tag libraries
+      for form processing, so that the collections previously returned will be
+      accessible using JSTL expressions, and furthermore, we will find the
+      following declaration:</para>
+
+      <informalexample>
+        <programlisting>&lt;form:form action="generateInvoice.do"&gt;
+                This account does not have an invoice for the current billing period.&lt;p/&gt;
+                You can create one now:
+                &lt;input type="hidden" name="id" value="&lt;c:out value="${account.id}"/&gt;"&gt;
+                &lt;input type="submit" value="Create invoice"/&gt;&lt;br/&gt;
+            &lt;/form:form&gt;</programlisting>
+      </informalexample>
+
+      <para>Clicking the 'Create Invoice' button will result in a POST
+      submission to
+      http://localhost:8080/sportsclub/invoicing/generateInvoice.do?id=1 and
+      the subsequent invocation of the generateInvoice method.</para>
+
+      <para>A small note here: in order to be able to demonstrate a few
+      Spring/JBoss integration features, the Invoicing application also
+      contains a number of business services that are using Spring. They do
+      not play any role in the Spring MVC/EJB integration, and we will discuss
+      more about them in section 6.</para>
+    </section>
+
+    <section>
+      <title>A problem of reusing content</title>
+
+      <para>Having three different web applications to be included in the same
+      package raises the problem of reusing some content. Surely, the images
+      and stylesheets that are part of the application design can be copied in
+      each individual project, but this raises the problem of maintainability.
+      Therefore, most of the static content used by the Sportsclub application
+      is defined in a separate web module, sportsclub-staticwebcontent, which
+      is then included by Maven at build time as follows:</para>
+
+      <para><informalexample>
+          <para><programlisting>&lt;dependency&gt;
+  &lt;groupId&gt;org.jboss.snowdrop.samples.sportsclub&lt;/groupId&gt;
+  &lt;artifactId&gt;sportsclub-staticwebcontent&lt;/artifactId&gt;
+  &lt;version&gt;${project.version}&lt;/version&gt;
+  &lt;type&gt;war&lt;/type&gt;
+  &lt;scope&gt;runtime&lt;/scope&gt;
+&lt;/dependency&gt;</programlisting><note>
+              <para>When working in an IDE this might produce an undesirable
+              side-effect. If the IDE does not know how to apply Maven
+              overlays correctly, the static content may not be available when
+              building and deploying the application through the IDE, without
+              Maven. This does not affect the general functionality of the
+              application but may affect the look and feel in that particular
+              situation. However, if the application is build using Maven,
+              this will not be a problem.</para>
+            </note></para>
+        </informalexample></para>
+    </section>
+  </section>
+
+  <section>
+    <title>Enterprise Integration Features</title>
+
+    <para>Apart from the Spring/JSF/EJB integration, which you have seen in
+    the previous sections, the Sportsclub application suite provides a few
+    other examples of integrating Spring and JBoss. Since all the features are
+    Spring-based, they have been included as business services of the
+    Invoicing web application. All the definitions for the following examples
+    can be found in the /WEB-INF/spring-business-context.xml file defined in
+    the spring-invoicing-webmvc module.</para>
+
+    <section>
+      <title>Payment processing: JMS integration through JCA</title>
+
+      <para>JMS integration can be enabled or disabled in the application, in
+      order to allow it to run in environments that dot have a message broker,
+      like for example the Web Profile of JBoss Application Server. For
+      details on how to do that, please consult section 1.1 of the current
+      guide. </para>
+
+      <para>Besides displaying the current status of invoices and payments for
+      a given account and generating invoices through the web interface, the
+      Sportsclub application can also process payments for various accounts.
+      The assumption of this scenario is that the system can receive payment
+      notifications asynchronously, through a JMS queue. Once such a payment
+      has been received, it can be processed by a message-driven component,
+      which in our case is a Spring bean. In order to take full advantage of
+      the managed environment provided by the application server, the Spring
+      bean will be invoked in a JCA context.</para>
+
+      <para>The component that processes JMS messages is a POJO:</para>
+
+      <para><informalexample>
+          <para><programlisting>public class PaymentNotificationProcessor
+{
+   private static final Log LOG = LogFactory.getLog(PaymentNotificationProcessor.class);
+
+   @Autowired
+   private PaymentProcessor paymentProcessor;
+
+   public void processPaymentNotification(PaymentNotification paymentNotification)
+   {
+      LOG.info(paymentNotification + " received");
+      paymentProcessor.processPayment(paymentNotification.getAccountNumber(), paymentNotification.getAmount());
+      LOG.info(paymentNotification + " processed");
+   }
+
+}</programlisting></para>
+        </informalexample></para>
+
+      <para>It delegates the actual processing of a PaymentNotification to a
+      different component, the PaymentProcessor, which is injected in the
+      PaymentNotificationProcessor. This is done in order to maintain a degree
+      of separation between the way data may be represented when exchanged
+      over the messaging system (i.e. encapsulated in a PaymentNotification
+      object), and the contract of the internal component which actually does
+      the processing. The PaymentProcessor instance injected into the
+      PaymentNotificationProcessor is, in fact, reused by the
+      PaymentNotificationService web service implementation (whose contract
+      does not depend on the PaymentNotification entity). </para>
+
+      <para>The arrival of messages and their processing can be traced by
+      examining the application log.</para>
+
+      <para>Spring will instantiate a bean named
+      "paymentNotificationProcessor" which will be registered as a processor
+      for JMS message as follows:</para>
+
+      <para><informalexample>
+          <para><programlisting>&lt;jms:jca-listener-container resource-adapter="resourceAdapter" acknowledge="auto"
+                                activation-spec-factory="activationSpecFactory"&gt;
+  &lt;jms:listener destination="/queue/sportsclub" ref="paymentNotificationProcessor"
+                      method="processPaymentNotification"/&gt;
+&lt;/jms:jca-listener-container&gt;</programlisting></para>
+        </informalexample>This type of configuration uses the JCA
+      infrastructure to deliver messages to the listener, as opposed to the
+      DefaultMessageListenerContainer which is effectively polling the
+      destination for incoming messages. Using JCA will ensure better
+      performance, as well as the ability to integrate with the JTA
+      transaction manager out of the box.</para>
+
+      <para>In order to be able to test this feature, messages have to be sent
+      to the message queue. This can be done by using a special MBean defined
+      by the application, accessible from the JBoss AS JMX console. The name
+      of the bean is "sportsclub:name=paymentNotificationTrigger" and has an
+      operation called 'sendPaymentNotification' with two arguments:</para>
+
+      <itemizedlist>
+        <listitem>
+          <para>a long valuem which is the accountId for making the
+          payment;</para>
+        </listitem>
+
+        <listitem>
+          <para>a double value, which represents the amount to be paid;</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>Once the JMX operation is invoked, a message is sent to the queue
+      and a confirmation message will be displayed in the JBoss log.</para>
+    </section>
+
+    <section>
+      <title>Aspects and auditing</title>
+
+      <para>Payments must be audited. Besides keeping a record of payments
+      associated with an account, we may want to set up an auditing service
+      that will audit every attempt of making a payment. In the simplest case
+      we can just log that information, although in a real life scenario
+      things may be more sophisticated. In order to do so, we set up a
+      PaymentAuditor aspect that intercepts every call made to the
+      PaymentProcessor.</para>
+
+      <para>The aspect is a simple POJO:</para>
+
+      <para><informalexample>
+          <para><programlisting>public class PaymentAuditor
+{
+   /* code ommitted */
+
+   public void auditPayment(Long accountId, BigDecimal amount)
+   {
+     System.out.println("AUDIT ENABLED! A payment has been made to account "
+                          + accountId + " for the amount of " + amount);
+   }
+}</programlisting></para>
+        </informalexample>The aspect is applied through the following
+      definitions:</para>
+
+      <informalexample>
+        <para><programlisting>   &lt;aop:config&gt;
+       &lt;aop:aspect ref="paymentAuditor"&gt;
+           &lt;aop:pointcut id="processingPayment" 
+               expression="execution(* *..PaymentProcessor+.*(..)) &amp;amp;&amp;amp; args(accountId, amount)"/&gt;
+           &lt;aop:before arg-names="accountId, amount" pointcut-ref="processingPayment" method="auditPayment"/&gt; 
+       &lt;/aop:aspect&gt;
+   &lt;/aop:config&gt;
+
+   &lt;bean id="paymentAuditor" class="org.jboss.snowdrop.samples.sportsclub.audit.PaymentAuditor"/&gt; 
+
+</programlisting>As you can see, the aspect is defined as a bean and applied
+        as an aspect through the Spring aop namespace. The pointcut definition
+        is an AspectJ expression.</para>
+      </informalexample>
+    </section>
+
+    <section>
+      <title>Configuring Spring beans through JMX</title>
+
+      <para>JMX is a very important tool for monitoring and configuring Java
+      applications. Collecting information about the system and the ability of
+      making configuration at runtime are important administration features.
+      For this example, the requirement is to be able to turn auditing on and
+      off, at runtime, whenever required. Removing an aspect once it has been
+      applied by Spring is not possible, so the solution in this case is to
+      define a flag property on the aspect, which controls whether the
+      auditing functionality will be invoked or not.</para>
+
+      <para>In order to be able to make changes at runtime, the Spring bean
+      which implements the aspect will be configured as a JMX bean and
+      registered in the MBean server of JBoss. In this example, we are using
+      annotations to define Spring-specific JMX metadata. The complete
+      definition for the PaymentAuditor is:</para>
+
+      <para><informalexample>
+          <para><programlisting>@ManagedResource(objectName = "sportsclub:name=paymentAuditor", description = "Payment Auditor")
+ at Component
+public class PaymentAuditor
+{
+
+   private static final Log LOG = LogFactory.getLog(PaymentAuditor.class);
+
+   private boolean enabled = true;
+
+   @ManagedAttribute(description = "Audit enabled")
+   public void setEnabled(boolean enabled)
+   {
+      LOG.info("Audit " +  (enabled ? "enabled":"disabled"));
+      this.enabled = enabled;
+   }
+
+   @ManagedAttribute(description = "Audit enabled")
+   public boolean getEnabled()
+   {
+      return this.enabled;
+   }
+
+   public void auditPayment(Long accountId, BigDecimal amount)
+   {
+      if (this.enabled)
+      {
+         LOG.info("A payment has been made to account " + accountId + " for the amount of " + amount);
+      }
+   }
+}</programlisting>The annotations ManagedResource and ManagedAttribute are
+          using to indicate what classes and properties are JMX-managed. In
+          order to expose the bean through JMX, it must be exported using
+          Spring's MBean Exporter.</para>
+
+          <para><programlisting>&lt;bean id="attributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/&gt;
+
+   &lt;bean class="org.springframework.jmx.export.MBeanExporter"&gt;
+       &lt;property name="autodetectModeName" value="AUTODETECT_ASSEMBLER"/&gt;
+       &lt;property name="ensureUniqueRuntimeObjectNames" value="true"/&gt;
+       &lt;property name="namingStrategy"&gt;
+           &lt;bean class="org.springframework.jmx.export.naming.MetadataNamingStrategy"&gt;
+               &lt;property name="attributeSource" ref="attributeSource"/&gt;
+           &lt;/bean&gt;
+       &lt;/property&gt;
+       &lt;property name="assembler"&gt;
+           &lt;bean class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler"&gt;
+               &lt;property name="attributeSource" ref="attributeSource"/&gt;
+           &lt;/bean&gt;
+       &lt;/property&gt;
+   &lt;/bean&gt;</programlisting></para>
+        </informalexample></para>
+
+      <para>As a result, you can turn this functionality on and off directly
+      from the JBoss AS JMX administration console, using the
+      "sportsclub:name=paymentAuditor" bean to interact with the payment
+      auditor.</para>
+
+      <para>As explained in the JMS section, a separate MBean is set up for
+      setting messages to the payment notifications message queue. </para>
+    </section>
+
+    <section>
+      <title>Payment processing: exposing a JAX-WS web service</title>
+
+      <para>Another way of interacting with external applications, is by
+      exposing a web service. In this scenario, payment notifications may not
+      arrive only as asynchronous events on a message queue, but also as
+      synchronous web service invocations. For this purpose, the application
+      will expose a Spring bean with JAX-WS annotations as a web
+      service.</para>
+
+      <para>To that end, a JAX-WS annotated class is provided by the
+      application:</para>
+
+      <informalexample>
+        <para><programlisting>@WebService
+public class PaymentNotificationService extends SpringBeanAutowiringSupport
+{
+
+   @Autowired
+   private PaymentProcessor paymentProcessor;
+
+   @WebMethod
+   public Long notifyPayment(Long accountNumber, BigDecimal amount)
+   {
+      return paymentProcessor.processPayment(accountNumber, amount);
+   }
+
+}</programlisting>By extending SpringBeanAutowiringSupport, the class
+        PaymentNotificationService will be injected automatically with the
+        same PaymentProcessor instance that is used by the JMS notification
+        processor, and defined in the application context created from
+        WEB-INF/spring-business-context.xml. This is necessary, because no
+        bean of the type PaymentNotificationService is defined in the
+        application context. Instead, the web service is defined and mapped as
+        a servlet in /WEB-INF/web.xml:</para>
+
+        <para><programlisting>&lt;servlet&gt;
+       &lt;servlet-name&gt;PaymentNotificationService&lt;/servlet-name&gt;
+       &lt;servlet-class&gt;org.jboss.snowdrop.samples.sportsclub.ws.PaymentNotificationService&lt;/servlet-class&gt;
+   &lt;/servlet&gt;
+
+   &lt;servlet-mapping&gt;
+       &lt;servlet-name&gt;PaymentNotificationService&lt;/servlet-name&gt;
+       &lt;url-pattern&gt;/ws/payment&lt;/url-pattern&gt;
+   &lt;/servlet-mapping&gt;</programlisting>As a result, the a JAX-WS web
+        service can be accessed at http://localhost:8080/ws/payment. The
+        service can be tested using a free SOAP testing tool such as SOAP
+        UI.</para>
+      </informalexample>
+    </section>
+  </section>
+</chapter>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Preface.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Preface.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Preface.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<preface id="pref-guide-Preface">
+  <title>Preface</title>
+<!-- for publican -->  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Conventions.xml">
+     <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+       <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fallback_content/Conventions.xml"/>
+     </xi:fallback>
+   </xi:include>
+<!-- for publican -->  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Feedback.xml">
+     <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+       <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fallback_content/Feedback.xml"/>
+     </xi:fallback>
+   </xi:include>
+</preface>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Revision_History.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Revision_History.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/Revision_History.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<appendix id="appe-guide-Revision_History">
+  <title>Revision History</title>
+  <simpara>
+    <revhistory>
+      <revision>
+        <revnumber>1.1</revnumber>
+        <date>Wed May 19 2010</date>
+        <author>
+          <firstname>Laura</firstname>
+          <surname>Bailey</surname>
+          <email>lbailey at redhat.com</email>
+        </author>
+        <revdescription>
+          <simplelist>
+            <member>Edited book for stylistic consistency.</member>
+          </simplelist>
+        </revdescription>
+      </revision>
+    </revhistory>
+  </simpara>
+</appendix>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/UseCases.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/UseCases.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/UseCases.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-guide-usecases">
+  <title>Understanding the application structure</title>
+
+  <para>This chapter describes the business use cases covered by the
+  application, and how is the functionality distributed across the
+  modules.</para>
+
+  <section>
+    <title>The application structure and its use cases</title>
+
+    <para>The Sportsclub example consists of three different applications
+    sharing the same domain model, packaged and deployed together. This is
+    done for simplicity reasons, but also for demonstrating a few different
+    technologies and configuration options working side by side. </para>
+
+    <para>The business domain of the application is a Sports Club. The
+    employees of the club need to be able to perform the following
+    scenarios:</para>
+
+    <itemizedlist>
+        <listitem>
+          <para>maintaining informations about the subscribers, creating new
+          subcriptions and closing existing accounts;</para>
+        </listitem>
+
+        <listitem>
+          <para>creating, modifying and removing equipment reservations for
+          subscribers;</para>
+        </listitem>
+
+        <listitem>
+          <para>viewing the current balance of an account, issuing invoices
+          for accounts that do not have a current invoice and updating the
+          account whenever a payment has been received.</para>
+        </listitem>
+      </itemizedlist>
+
+    <para>As the concerns are different, we have three different
+    applications, each covering one piece of functionality.</para>
+
+    <para>Each of these scenarios is covered by a separate web application,
+    and all three applications are packaged in a single EAR file.</para>
+
+    <para>The Reservations application is using the following
+    stack:</para>
+    <itemizedlist>
+        <listitem>
+          <para>UI layer implemented using Richfaces</para>
+        </listitem>
+
+<!-- Not sure what this is doing here...
+
+    <figure>
+      <title>Structure of the Sportsclub application</title>-->
+
+        <listitem>
+          <para>Persistence layer using Spring-based DAOs
+          (Hibernate/JPA)</para>
+        </listitem>
+      </itemizedlist>
+
+    <para>The Subscriptions application is using the following
+    stack:</para>
+
+    <para>All three applications share a common domain model and a common
+    DAO/repository layer, implemented using Spring. The application includes
+    both Hibernate and JPA implementations for the repository layer (using the
+    Hibernate and JPA support provided by JBoss AS, respectively). The
+    application is built in two different variants, each using one of the two
+    DAO implementation alternatives. </para>
+
+    <para>Apart from that, each web application uses a different combination
+    of technologies, illustrating one or more integration use cases.</para>
+
+    <para>The Subscriptions application uses an EJB-based service layer and a
+    JSF-based front-end, using Richfaces components. </para>
+
+    <para>The Invoicing application is using the following stack:</para>
+    <itemizedlist>
+        <listitem>
+          <para>UI layer implemented using Spring MVC and JSP</para>
+        </listitem>
+
+        <listitem>
+          <para>Business layer implemented using EJB</para>
+        </listitem>
+
+        <listitem>
+          <para>Persistence layer implemented using Spring-based DAOs
+          (Hibernate/JPA)</para>
+        </listitem>
+      </itemizedlist>
+
+    <para>In all three cases, the persistence layer is implemented using
+    Spring. In fact there are two alternative implementations: one using
+    Hibernate directly and one using JPA (and Hibernate as the provider).
+    Building the application creates two different EAR files, one using the
+    JPA-based DAOs and one using the Hibernate-based DAOs.</para>
+  </section>
+
+  <section>
+    <title>A comparative look of the project modules</title>
+
+    <para>The modules (Maven artifacts) of the project are outlined in the
+    following table:</para>
+    <table>
+        <title>Modules of the Sportsclub project</title>
+
+        <tgroup cols="3">
+          <colspec colname="module-name" />
+
+          <colspec colname="module-description" />
+
+          <colspec align="center" colname="module-type" />
+
+          <thead>
+            <row>
+              <entry align="center">Maven Module</entry>
+
+              <entry align="center">Functionality</entry>
+
+              <entry>Module Type</entry>
+            </row>
+          </thead>
+
+          <tbody>
+            <row>
+              <entry>snowdrop-domain</entry>
+
+              <entry>Domain classes and repository interfaces.</entry>
+
+              <entry>jar</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-hibernate-dao</entry>
+
+              <entry>Hibernate implementations for repositories and Spring
+              bean definitions using them.</entry>
+
+              <entry>jar</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-jpa-dao</entry>
+
+              <entry>JPA implementations for repositories and Spring bean
+              definitions using them.</entry>
+
+              <entry>jar</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-invoicing-ejb</entry>
+
+              <entry>Business logic for the Invoicing application</entry>
+
+              <entrytbl cols="1">
+                <tbody>
+                  <row>
+                    <entry>ejb</entry>
+                  </row>
+                </tbody>
+              </entrytbl>
+            </row>
+
+            <row>
+              <entry>sportsclub-reservations-spring</entry>
+
+              <entry>Business logic for the Reservations application</entry>
+
+              <entry>jar</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-subscriptions-ejb</entry>
+
+              <entry>Business logic for the Subscriptions application</entry>
+
+              <entry>ejb</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-invoicing-webmvc</entry>
+
+              <entry>UI layer for the Invoicing application. Includes
+              processing of JMS messages via Spring (for payment
+              notifications)</entry>
+
+              <entry>war</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-reservations-web</entry>
+
+              <entry>UI layer for the Reservations application.</entry>
+
+              <entry>war</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-subscriptions-web</entry>
+
+              <entry>UI layer for the Subscriptions application</entry>
+
+              <entry>war</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-ear</entry>
+
+              <entry>EAR aggregator module using the Hibernate-based
+              implementation</entry>
+
+              <entry>ear</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-jpa-ear</entry>
+
+              <entry>EAR aggregator module using the JPA-based
+              implementation</entry>
+
+              <entry>ear</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-staticwebcontent</entry>
+
+              <entry>Static web content for the application (not deployed
+              separately, but included at build-time in the web
+              layers)</entry>
+
+              <entry>war</entry>
+            </row>
+
+            <row>
+              <entry>sportsclub-test-infrastructure</entry>
+
+              <entry>Infrastructure module for unit testing</entry>
+
+              <entry>jar</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>
+  </section>
+</chapter>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Conventions.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Conventions.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Conventions.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,167 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../guide.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+	<title>Document Conventions</title>
+	<para>
+		This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
+	</para>
+	<para>
+		In PDF and paper editions, this manual uses typefaces drawn from the <ulink url="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</ulink> set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.
+	</para>
+	<section>
+		<title>Typographic Conventions</title>
+		<para>
+			Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
+		</para>
+		<para>
+			<literal>Mono-spaced Bold</literal>
+		</para>
+		<para>
+			Used to highlight system input, including shell commands, file names and paths. Also used to highlight keycaps and key combinations. For example:
+		</para>
+		<blockquote>
+			<para>
+				To see the contents of the file <filename>my_next_bestselling_novel</filename> in your current working directory, enter the <command>cat my_next_bestselling_novel</command> command at the shell prompt and press <keycap>Enter</keycap> to execute the command.
+			</para>
+		</blockquote>
+		<para>
+			The above includes a file name, a shell command and a keycap, all presented in mono-spaced bold and all distinguishable thanks to context.
+		</para>
+		<para>
+			Key combinations can be distinguished from keycaps by the hyphen connecting each part of a key combination. For example:
+		</para>
+		<blockquote>
+			<para>
+				Press <keycap>Enter</keycap> to execute the command.
+			</para>
+			<para>
+				Press <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F1</keycap></keycombo> to switch to the first virtual terminal. Press <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F7</keycap></keycombo> to return to your X-Windows session.
+			</para>
+		</blockquote>
+		<para>
+			The first paragraph highlights the particular keycap to press. The second highlights two key combinations (each a set of three keycaps with each set pressed simultaneously).
+		</para>
+		<para>
+			If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in <literal>mono-spaced bold</literal>. For example:
+		</para>
+		<blockquote>
+			<para>
+				File-related classes include <classname>filesystem</classname> for file systems, <classname>file</classname> for files, and <classname>dir</classname> for directories. Each class has its own associated set of permissions.
+			</para>
+		</blockquote>
+		<para>
+			<application>Proportional Bold</application>
+		</para>
+		<para>
+			This denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:
+		</para>
+		<blockquote>
+			<para>
+				Choose <menuchoice><guimenu>System</guimenu><guisubmenu>Preferences</guisubmenu><guimenuitem>Mouse</guimenuitem></menuchoice> from the main menu bar to launch <application>Mouse Preferences</application>. In the <guilabel>Buttons</guilabel> tab, click the <guilabel>Left-handed mouse</guilabel> check box and click <guibutton>Close</guibutton> to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).
+			</para>
+			<para>
+				To insert a special character into a <application>gedit</application> file, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Accessories</guisubmenu><guimenuitem>Character Map</guimenuitem></menuchoice> from the main menu bar. Next, choose <menuchoice><guimenu>Search</guimenu><guimenuitem>Find&hellip;</guimenuitem></menuchoice> from the <application>Character Map</application> menu bar, type the name of the character in the <guilabel>Search</guilabel> field and click <guibutton>Next</guibutton>. The character you sought will be highlighted in the <guilabel>Character Table</guilabel>. Double-click this highlighted character to place it in the <guilabel>Text to copy</guilabel> field and then click the <guibutton>Copy</guibutton> button. Now switch back to your document and choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice> from the <application>gedit</application> menu bar.
+			</para>
+		</blockquote>
+		<para>
+			The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.
+		</para>
+		<para>
+			<command><replaceable>Mono-spaced Bold Italic</replaceable></command> or <application><replaceable>Proportional Bold Italic</replaceable></application>
+		</para>
+		<para>
+			Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:
+		</para>
+		<blockquote>
+			<para>
+				To connect to a remote machine using ssh, type <command>ssh <replaceable>username</replaceable>@<replaceable>domain.name</replaceable></command> at a shell prompt. If the remote machine is <filename>example.com</filename> and your username on that machine is john, type <command>ssh john at example.com</command>.
+			</para>
+			<para>
+				The <command>mount -o remount <replaceable>file-system</replaceable></command> command remounts the named file system. For example, to remount the <filename>/home</filename> file system, the command is <command>mount -o remount /home</command>.
+			</para>
+			<para>
+				To see the version of a currently installed package, use the <command>rpm -q <replaceable>package</replaceable></command> command. It will return a result as follows: <command><replaceable>package-version-release</replaceable></command>.
+			</para>
+		</blockquote>
+		<para>
+			Note the words in bold italics above &mdash; username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.
+		</para>
+		<para>
+			Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:
+		</para>
+		<blockquote>
+			<para>
+				Publican is a <firstterm>DocBook</firstterm> publishing system.
+			</para>
+		</blockquote>
+	</section>
+	
+	<section>
+		<title>Pull-quote Conventions</title>
+		<para>
+			Terminal output and source code listings are set off visually from the surrounding text.
+		</para>
+		<para>
+			Output sent to a terminal is set in <computeroutput>mono-spaced roman</computeroutput> and presented thus:
+		</para>
+		
+<screen>books        Desktop   documentation  drafts  mss    photos   stuff  svn
+books_tests  Desktop1  downloads      images  notes  scripts  svgs
+</screen>
+		<para>
+			Source-code listings are also set in <computeroutput>mono-spaced roman</computeroutput> but add syntax highlighting as follows:
+		</para>
+		
+<programlisting language="Java">package org.jboss.book.jca.ex1;
+
+import javax.naming.InitialContext;
+
+public class ExClient
+{
+   public static void main(String args[]) 
+       throws Exception
+   {
+      InitialContext iniCtx = new InitialContext();
+      Object         ref    = iniCtx.lookup(&#34;EchoBean&#34;);
+      EchoHome       home   = (EchoHome) ref;
+      Echo           echo   = home.create();
+
+      System.out.println(&#34;Created Echo&#34;);
+
+      System.out.println(&#34;Echo.echo(&#39;Hello&#39;) = &#34; + echo.echo(&#34;Hello&#34;));
+   }
+}
+</programlisting>
+	</section>
+	
+	<section>
+		<title>Notes and Warnings</title>
+		<para>
+			Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
+		</para>
+		<note>
+			<title>Note</title>
+			<para>
+				Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
+			</para>
+		</note>
+		<important>
+			<title>Important</title>
+			<para>
+				Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled &#39;Important&#39; won&#39;t cause data loss but may cause irritation and frustration.
+			</para>
+		</important>
+		<warning>
+			<title>Warning</title>
+			<para>
+				Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
+			</para>
+		</warning>
+	</section>
+
+</section>
+
+

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Feedback.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Feedback.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Feedback.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../guide.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+	<title>We Need Feedback!</title>
+	<indexterm>
+		<primary>feedback</primary>
+		<secondary>contact information for this manual</secondary>
+	</indexterm>
+	<para>
+		You should over ride this by creating your own local Feedback.xml file.
+	</para>
+</section>
+
+

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Legal_Notice.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Legal_Notice.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/fallback_content/Legal_Notice.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE legalnotice PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../guide.ent">
+%BOOK_ENTITIES;
+]>
+<legalnotice>
+	<para>
+		Copyright.
+	</para>
+</legalnotice>
+

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.ent
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.ent	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.ent	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "JBoss Web Framework Kit">
+<!ENTITY BOOKID "Snowdrop_Sports_Club_Example">
+<!ENTITY YEAR "2010">
+<!ENTITY HOLDER "Red Hat, Inc">

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/guide.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "guide.ent">
+%BOOK_ENTITIES;
+]>
+<book>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Info.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Preface.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="UseCases.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Modules.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Revision_History.xml"/>
+</book>

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/account-person.png
===================================================================
(Binary files differ)


Property changes on: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/account-person.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/application-modules.png
===================================================================
(Binary files differ)


Property changes on: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/application-modules.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/domain-entities.png
===================================================================
(Binary files differ)


Property changes on: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/en-US/images/domain-entities.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/pom.xml
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/pom.xml	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/pom.xml	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,212 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.project</groupId>
+  <artifactId>${docname}-${translation}</artifactId>
+  <version>1.0</version>
+  <packaging>jdocbook</packaging>
+  <name>${bookname}-(${translation})</name>
+
+  <properties>
+    <translation>en-US</translation>
+    <docname>guide</docname>
+    <bookname>Sports Club Example Guide</bookname>
+  </properties> 
+
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <profiles>
+
+    <!-- mvn compile -->
+    <profile>
+      <id>all</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+      <plugins>
+        <plugin>
+          <groupId>org.jboss.maven.plugins</groupId>
+          <artifactId>maven-jdocbook-plugin</artifactId>
+          <version>2.1.2</version>
+          <extensions>true</extensions>
+          <configuration>
+            <formats>
+              <format>
+                <formatName>pdf</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+                <finalName>${docname}.pdf</finalName>
+              </format>
+              <format>
+                <formatName>html</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+                <finalName>index.html</finalName>
+              </format>
+              <format>
+                <formatName>html_single</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+                <finalName>index.html</finalName>
+              </format>
+            </formats>
+          </configuration>
+        </plugin>
+      </plugins>
+      </build>
+    </profile>
+
+    <!-- mvn compile -Phtml -->
+    <profile>
+      <id>html</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+      <plugins>
+        <plugin>
+          <groupId>org.jboss.maven.plugins</groupId>
+          <artifactId>maven-jdocbook-plugin</artifactId>
+          <version>2.1.2</version>
+          <extensions>true</extensions>
+          <configuration>
+            <formats>
+              <format>
+                <formatName>html</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+                <finalName>index.html</finalName>
+              </format>
+            </formats>
+          </configuration>
+        </plugin>
+      </plugins>
+      </build>
+    </profile>
+
+    <!-- mvn compile -Phtml-single -->
+    <profile>
+      <id>html-single</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+      <plugins>
+        <plugin>
+          <groupId>org.jboss.maven.plugins</groupId>
+          <artifactId>maven-jdocbook-plugin</artifactId>
+          <version>2.1.2</version>
+          <extensions>true</extensions>
+          <configuration>
+            <formats>
+              <format>
+                <formatName>html_single</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+                <finalName>index.html</finalName>
+              </format>
+            </formats>
+          </configuration>
+        </plugin>
+      </plugins>
+      </build>
+    </profile>
+
+    <!-- mvn compile -Ppdf -->
+    <profile>
+      <id>pdf</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+      <plugins>
+        <plugin>
+          <groupId>org.jboss.maven.plugins</groupId>
+          <artifactId>maven-jdocbook-plugin</artifactId>
+          <version>2.1.2</version>
+          <extensions>true</extensions>
+          <configuration>
+            <formats>
+              <format>
+                <formatName>pdf</formatName>
+                <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+                <finalName>${docname}.pdf</finalName>
+              </format>
+            </formats>
+          </configuration>
+        </plugin>
+      </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.jboss.maven.plugins</groupId>
+        <artifactId>maven-jdocbook-plugin</artifactId>
+        <version>2.1.2</version>
+        <extensions>true</extensions>
+        <dependencies>
+          <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jbossorg-docbook-xslt</artifactId>
+            <version>1.1.0</version>
+          </dependency>
+          <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jbossorg-jdocbook-style</artifactId>
+            <version>1.1.0</version>
+            <type>jdocbook-style</type>
+          </dependency>
+        </dependencies>
+        <configuration>
+          <sourceDocumentName>${docname}.xml</sourceDocumentName>
+          <sourceDirectory>.</sourceDirectory>
+          <imageResource>
+            <directory>${translation}</directory>
+            <includes>
+              <include>images/*</include>
+            </includes>
+          </imageResource>
+          <options>
+            <xincludeSupported>true</xincludeSupported>
+            <xmlTransformerType>saxon</xmlTransformerType>
+            <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+            <!-- could also locate the docbook dependency and inspect its version -->
+            <docbookVersion>1.72.0</docbookVersion>
+            <transformerParameters>
+              <property>
+                <name>javax.xml.parsers.DocumentBuilderFactory</name>
+                <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
+              </property>
+              <property>
+                <name>javax.xml.parsers.SAXParserFactory</name>
+                <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
+              </property>
+            </transformerParameters>
+          </options>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+
+

Added: projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/publican.cfg
===================================================================
--- projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/publican.cfg	                        (rev 0)
+++ projects/snowdrop/branches/enterprise/Snowdrop_Sports_Club_Example/publican.cfg	2010-05-21 05:11:13 UTC (rev 105084)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Wed Feb 10 13:45:26 2010
+
+
+type: Book
+brand: JBoss
+docname: guide




More information about the jboss-cvs-commits mailing list