[jboss-cvs] JBossAS SVN: r66208 - projects/docs/trunk/Getting_Started/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 17 01:35:43 EDT 2007


Author: mhideo at redhat.com
Date: 2007-10-17 01:35:43 -0400 (Wed, 17 Oct 2007)
New Revision: 66208

Added:
   projects/docs/trunk/Getting_Started/en-US/About_the_Example_Applications.xml
   projects/docs/trunk/Getting_Started/en-US/Appendix.xml
   projects/docs/trunk/Getting_Started/en-US/Book_Info.xml
   projects/docs/trunk/Getting_Started/en-US/Directory_Structure.xml
   projects/docs/trunk/Getting_Started/en-US/EJB3_Caveats.xml
   projects/docs/trunk/Getting_Started/en-US/Feedback.xml
   projects/docs/trunk/Getting_Started/en-US/Getting_Started.ent
   projects/docs/trunk/Getting_Started/en-US/Getting_Started.xml
   projects/docs/trunk/Getting_Started/en-US/Introduction.xml
   projects/docs/trunk/Getting_Started/en-US/Preface.xml
   projects/docs/trunk/Getting_Started/en-US/Revision_History.xml
   projects/docs/trunk/Getting_Started/en-US/Sample_JSF_EJB3_Application.xml
   projects/docs/trunk/Getting_Started/en-US/Server_Configurations.xml
   projects/docs/trunk/Getting_Started/en-US/Software_Versions.xml
   projects/docs/trunk/Getting_Started/en-US/Start_Stop_Server.xml
   projects/docs/trunk/Getting_Started/en-US/The_JBoss_Server___A_Quick_Tour.xml
   projects/docs/trunk/Getting_Started/en-US/Using_Other_Databases.xml
   projects/docs/trunk/Getting_Started/en-US/Using_Seam.xml
Log:
fixing again

Added: projects/docs/trunk/Getting_Started/en-US/About_the_Example_Applications.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/About_the_Example_Applications.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/About_the_Example_Applications.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,86 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="About_the_Example_Applications">
+	<title>About the Example Applications</title>
+	<para>
+		In this guide, we make use of a simple web application to illustrate the use of JSF-EJB3 components. We then illustrate how to use Seam to integrate the JSF and EJB3 components. The example applications (source code) come with this guide and you can find them located in the <filename class="directory">JBOSS_DIST/doc/examples</filename> directory. You can also download the sample applications from <ulink url="http://www.redhat.com/docs/manuals/jboss"></ulink>. We use two examples in this book: 
+		<itemizedlist>
+			<listitem>
+				<para>A simple "TODO" application to create, view and edit tasks - implemented using JSF and EJB3; 
+				</para>
+			</listitem>
+			<listitem>
+				<para>The same application using the SEAM framework.</para>
+			</listitem>
+		</itemizedlist>	
+	</para>
+	
+	<para>
+		If you installed the documentation on your hard drive, then the first example can be found in the <filename class="directory">JBOSS_DIST/doc/examples/jsfejb3</filename> directory. We will see how to build this example using the <filename>build.xml</filename> file present here and also how to deploy the application. We will also cover in detail the working of the .java, .xml and .properties files.
+	</para>
+	<para>
+		The second example used in this guide can be found in the <filename class="directory">JBOSS_DIST/doc/examples/seamejb3</filename> directory. Using a simple "TODO" application we will illustrate how Seam ties together the database, the web interface and the EJB3 business logic in a web application. We will use the <filename>build.xml</filename> file present here to compile and build our Seam application.
+	</para>
+	<para>
+		Within the <filename class="directory">JBOSS_DIST/doc/examples/&lt;seamejb3|jsfejb3&gt;</filename> directory, you will find the following sub-directories: <itemizedlist>
+			<listitem>
+				<para>
+					<emphasis role="bold">src</emphasis>: contains the Java source code files.
+				</para>
+			</listitem>
+			<listitem>
+				<para>
+					<emphasis role="bold">view</emphasis>: contains the web pages.
+				</para>
+			</listitem>
+			<listitem>
+				<para>
+					<emphasis role="bold">resources</emphasis>: contains all the configuration files used.
+				</para>
+			</listitem>
+		</itemizedlist>
+	</para>
+	<section id="About_the_Example_Applications-Install_Ant">
+		<title>Install Ant</title>
+		<para>
+			To compile and package the examples, you must have Apache Ant 1.6+ installed in your machine. You can download it from <ulink url="http://ant.apache.org"></ulink> and have it installed in few steps: <itemizedlist>
+				<listitem>
+					<para>
+						Unzip the downloaded file to the directory of your choice.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						Create an environment variable called <literal>ANT_HOME</literal> pointing to the Ant installation directory. You can do this by adding the following line to your <filename>.bashrc</filename> file (substituting with the actual location of the ant directory on your system): <programlisting>
+export ANT_HOME=/home/user/apache-ant-1.7.0
+</programlisting>
+					</para>
+					
+					<para>
+						On Windows you do this by opening the Control Panel from the Start Menu, switching it to classic view if necessary, then opening System/Advanced/Environment Variables. Create a new variable, call it <literal>ANT_HOME</literal> and set it to be the ant directory.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						Add <literal>$ANT_HOME/bin</literal> to the system path to be able to run <literal>ant</literal> from the command line. You can do this by adding the following line to your <filename>.bashrc</filename> file: <programlisting>
+export PATH=$PATH:$ANT_HOME/bin
+</programlisting>
+					</para>
+					<para>
+						On Windows you do this by opening the Control Panel from the Start Menu, switching it to classic view if necessary, then editing the <literal>PATH</literal> environment variable found in System/Advanced/Environment Variables/System Variables/Path. Add a semicolon and the path to the ant <filename class="directory">bin</filename> directory.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						Verify your Ant installation. To do this type <literal> ant -version</literal> at the command prompt. Your output should look something like this: <programlisting>
+Apache Ant version 1.7.0 compiled on December 13 2006
+</programlisting>
+					</para>
+				</listitem>
+			</itemizedlist>
+		</para>
+	</section>
+</chapter>
+

Added: projects/docs/trunk/Getting_Started/en-US/Appendix.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Appendix.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Appendix.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,26 @@
+<?xml version='1.0'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<appendix id="Book-Revision_History">
+	<appendixinfo>
+		<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	</appendixinfo>
+	<title>Further Information Sources</title>
+	<para>
+		For a longer introduction to JBoss, see <emphasis>JBoss: A Developer&#39;s Notebook</emphasis>. (O&#39;Reilly, 2005. Norman Richards, Sam Griffith).
+	</para>
+	<para>
+		For more comprehensive JBoss documentation covering advanced JBoss topics, refer to the manuals available online at <ulink url="http://www.redhat.com/docs/manuals/jboss"></ulink>.
+	</para>
+	<para>
+		For general EJB instruction, with thorough JBoss coverage, see <emphasis> Enterprise JavaBeans, 4th Edition</emphasis>. (O&#39;Reilly, 2004. Richard Monson-Haeful, Bill Burke, Sacha Labourey)
+	</para>
+	<para>
+		To learn more about Hibernate, see <emphasis>Java Persistence With Hibernate</emphasis>. (Manning, 2007. Christian Bauer, Gavin King)
+	</para>
+	<para>
+		For complete coverage of the JBoss Seam framework, we recommend <emphasis>JBoss Seam: Simplicity And Power Beyond Java EE</emphasis>. (Prentice Hall, 2007. Michael Yuan, Thomas Heute).
+		</para>
+</appendix>
+

Added: projects/docs/trunk/Getting_Started/en-US/Book_Info.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Book_Info.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Book_Info.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<bookinfo id="JBoss_Application_Server">
+	<title>JBoss Application Server</title>
+	<subtitle>Getting Started Guide</subtitle>
+	<issuenum>4.2</issuenum>
+	<productnumber>2</productnumber>
+	<pubdate>Sep, 2007</pubdate>
+	<isbn>N/A</isbn>
+	<abstract><para>The <citetitle>Getting Started Guide</citetitle> provides post-installation information about JBoss Application Server. Use this guide to familiarise yourself with the platform and the sample applications that demonstrate application development and deployment.</para></abstract>
+	<copyright>
+		<year>2007</year>
+		<holder>Red Hat, Inc.</holder>
+	</copyright>
+</bookinfo>
+

Added: projects/docs/trunk/Getting_Started/en-US/Directory_Structure.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Directory_Structure.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Directory_Structure.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,144 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<section id="The_JBoss_Server___A_Quick_Tour-Directory_Structure">
+	<title>Directory Structure</title>
+	<section id="The_JBoss_Server___A_Quick_Tour-Directory_Structure-JBoss_Top_Level_Directory_Structure">
+		<title>JBoss Top Level Directory Structure</title>
+		<para>
+			Installing &JBEAP; creates a top level directory, which will be named <filename class="directory">jboss-eap-4.2</filename> if you used the zip installation method, and will be named according to your specification if you used the GUI installer. Throughout this guide we refer to this top-level directory as the <literal>JBOSS_DIST</literal> directory. There are four sub-directories immediately below this: 
+			<itemizedlist>
+				<listitem>
+					<para>
+						<emphasis role="bold">doc</emphasis>: contains the product documentation.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">jboss-as</emphasis>: contains sub directories that contain server start scripts, JARs, server configuration sets and working directories. You need to know your way around the distribution layout to locate JARs for compiling code, updating configurations, deploying your code, etc.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">seam</emphasis>: contains the files for Hibernate and the JBoss Seam Framework.
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">Uninstaller</emphasis>: contains the uninstaller program <filename>uninstaller.jar</filename>.
+					</para>
+				</listitem>
+			</itemizedlist>
+		</para>
+		<para>
+			Below is the layout of the installation directory of &JBEAP;.  In the figure, the <literal>default</literal> server configuration file set is shown expanded. In a clean installation, within the <filename class="directory">server/default</filename> directory only the <filename class="directory">conf</filename>, <filename class="directory">deploy</filename>, and <filename class="directory">lib</filename> directories exist. The <filename class="directory">data</filename>, <filename class="directory">log</filename>, <filename class="directory">tmp</filename> and <filename class="directory">work</filename> sub-directories are created by JBoss and won’t exist until you’ve run the server at least once. <xref linkend="Starting_and_Stopping_the_Server" /> will teach you to run the server.
+		</para>
+		
+		
+<programlisting>jboss-eap-4.2                  // jboss.home_url
+	|+ doc
+	|+ jboss-as
+		|+ bin
+		|+ client
+		|+ docs
+		|+ icons
+		|+ lib                         // jboss.lib.url
+		|+ scripts
+		|+ server
+			|+ all                // jboss.server.name
+			|+ default            // jboss.server.home.url
+				|+ conf       // jboss.server.config.url
+				|+ deploy
+				|+ lib        // jboss.server.lib.url
+				|+ data
+				|+ log
+				|+ tmp
+				|+ work
+			|+ minimal
+			|+ production
+	|+ seam
+	|+ Uninstaller                      // jboss.uninstaller.url
+
+</programlisting>
+
+	<!--	<figure id="JBoss_Top_Level_Directory_Structure-JBoss_Enterprise_Application_Platform_Directory_Structure">
+			<title>JBoss Enterprise Application Platform Directory Structure</title>
+			<mediaobject>
+				<imageobject>
+					<imagedata align="center" fileref="images/jboss_directory_structure.png" />
+				</imageobject>
+			</mediaobject>
+		</figure> -->
+		<para>
+			<!--TODO this is here because it is carried from the previous doc. need to get more information before rewriting it-->Several of the locations may be overridden. For these locations, the <literal>org.jboss.system.server.ServerConfig</literal> interface constant and its corresponding system property string are shown in the figure. The names ending in <literal>URL</literal> correspond to locations that can be specified using a URL to access remote locations, for example, HTTP URLs against a web server.
+		</para>
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Directory_Structure-JBOSS_DISTjboss_as_Directory_Structure">
+		<title>JBOSS_DIST/jboss-as Directory Structure</title>
+		<para>
+			The table below illustrates the contents of the <filename class="directory">jboss-as</filename> directory.
+		</para>
+		<para>
+			<table id="JBOSS_DISTjboss_as_Directory_Structure-Contents_of_JBOSS_DISTjboss_as_directory">
+				<title>Contents of <filename class="directory">JBOSS_DIST/jboss-as</filename> directory</title>
+				<tgroup cols="2">
+					<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+					<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+					<thead>
+						<row>
+							<entry>
+								Directory
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+					<tbody>
+						<row>
+							<entry>
+								<filename class="directory">bin</filename>
+							</entry>
+							<entry>
+								Contains startup, shutdown and other system-specific scripts. Basically all the entry point JARs and start scripts included with the JBoss distribution are located in the <filename class="directory">bin</filename> directory.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">client</filename>
+							</entry>
+							<entry>
+								Stores configuration files and JAR files that may be used by a Java client application (running outside JBoss) or an external web container. You can select archives as required or use <filename>jbossall-client.jar</filename>.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">docs</filename>
+							</entry>
+							<entry>
+								Contains the XML DTDs used in JBoss for reference (these are also a useful source of documentation on JBoss configuration specifics). There are also example JCA (Java Connector Architecture) configuration files for setting up datasources for different databases (such as MySQL, Oracle, Postgres).
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">lib</filename>
+							</entry>
+							<entry>
+								Contains startup JARs used by JBoss. Do not place your own JAR files in this directory.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">server</filename>
+							</entry>
+							<entry>
+								Contains the JBoss server configuration sets. Each of the subdirectories in here is a different server configuration. JBoss ships with <literal>minimal</literal>, <literal>default</literal>, <literal>production</literal>, and <literal>all</literal> configuration sets. The subdirectories and key configuration files contained in the <literal>default</literal> configuration set are discussed in more detail in subsequent sections.
+							</entry>
+						</row>
+					</tbody>
+				</tgroup>
+			</table>
+		</para>
+	</section>
+</section>
\ No newline at end of file

Added: projects/docs/trunk/Getting_Started/en-US/EJB3_Caveats.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/EJB3_Caveats.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/EJB3_Caveats.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,86 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="EJB3_Caveats">
+	<title>
+		EJB3 Caveats in JBoss Application Server 4.2.2
+	</title>
+	
+	<para>
+		There are a number of implementation features that you should be aware of when developing applications for JBoss Application Server 4.2.2. 
+	</para>
+	
+	<section>
+		<title>
+			Unimplemented features
+		</title>
+		
+		<para>
+			The Release Notes for JBoss Application Server 4.2.2 contain information on EJB3 features that are not yet implemented, or partially implemented. The Release Notes include links to issues in JIRA for information on workarounds and further details.
+		</para>
+	</section>
+			
+			
+	<section id="EJB3_Support">
+		<title>
+			Referencing EJB3 Session Beans from non-EJB3 Beans
+		</title>
+	
+		<para>
+			JBoss Application Server 5 will fully support the entire Java 5 Enterprise Edition specification. In the meantime JBoss Application Server 4.2.2 implements EJB3 functionality by way of an EJB MBean container running as a plugin in the JBoss Application Server. This has certain implications for application development.
+		</para>
+		
+		<para>
+			The EJB3 plugin injects references to an EntityManager and @EJB references from one EJB object to another. However this support is limited to the EJB3 MBean and the JAR files it manages. Any JAR files which are loaded from a WAR (such as Servlets, JSF backing beans, and so forth) do not undergo this processing. The Java 5 Enterprise Edition standard specifies that a Servlet can reference a Session Bean through an @EJB annotated reference, however this is not implemented in JBoss Application Server 4.2.2.
+		</para>
+		
+		<para>
+			In order to access an EJB3 Session Bean from a Servlet or JSF Backing Bean you will need to do one of two things:
+		</para>
+		
+		<orderedlist>
+			<listitem>
+				<formalpara>
+					<title>
+						Without Seam - JNDI Lookup
+					</title>
+					
+					<para>
+						Without utilizing the Seam framework that is part of JBoss Application Server you will need to use an explicit JNDI lookup to access the EJB3 Session Bean. You can see an example of this being done in the <filename>TodoBean.java</filename> file in the <literal>jsfejb3</literal> example application, described in <xref linkend="Sample_JSF_EJB3_Application"/>.
+					</para>
+				</formalpara>
+					
+<programlisting>private TodoDaoInt getDao () {
+	try {
+	InitialContext ctx = new InitialContext();
+	return (TodoDaoInt) ctx.lookup("jsfejb3/TodoDao/local");
+	} catch (Exception e) {
+	e.printStackTrace();
+	throw new RuntimeException("couldn't lookup Dao", e);
+	}
+	}</programlisting>
+				
+				<para>
+					<literal>ctx.lookup("jsfejb3/TodoDao/local");</literal> is the method used to reference the EJB3 Session Bean. The form is: <replaceable>AppName</replaceable>/<replaceable>SessionBeanName</replaceable>/local.
+				</para>
+			</listitem>
+			
+			<listitem>
+				<formalpara>
+					<title>
+						With Seam - Leave it to the Seam Framework
+					</title>
+					
+					<para> 
+						When you are using the Seam Framework you don't need to worry about this. Because the Seam framework manages the interaction of Beans anyway, it already automates this type of interaction. 
+					</para>
+				</formalpara>
+				
+				<para>
+					Refer to <xref linkend="Using_Seam"/> for a more detailed explanation of achieving this using the Seam framework.
+				</para>
+			</listitem>
+		</orderedlist>
+	</section>
+</chapter>
\ No newline at end of file

Added: projects/docs/trunk/Getting_Started/en-US/Feedback.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Feedback.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Feedback.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,23 @@
+<?xml version='1.0'?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<section id="Book-We_Need_Feedback">
+	<title>Help Contribute</title>
+	<para>
+		If you find a typographical error in the <citetitle>Getting Started Guide</citetitle>, 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.com/jira/secure/IssueNavigator.jspa?reset=true&amp;&amp;pid=10030&amp;resolution=-1&amp;component=12311310&amp;sorter/field=priority&amp;sorter/order=DESC">http://jira.jboss.com</ulink> against the project <citetitle>JBoss Application Server</citetitle> and component <citetitle>Getting_Started_Guide</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>
+	<note><title>Note</title><para>Be sure to give us your name so you can receive full credit.</para></note>
+	
+	<note><title>Note</title><para>This content is taken from svn.jboss.org/repos/jbossas/projects/docs/trunk and has yet to be branched.</para></note>
+	
+	<para>To access the content directly and make changes yourself:</para>
+	<screen>
+		svn co https://svn.jboss.org/repos/jbossas/projects/docs/trunk --username yourname
+	</screen>
+</section>
+
+

Added: projects/docs/trunk/Getting_Started/en-US/Getting_Started.ent
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Getting_Started.ent	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Getting_Started.ent	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,2 @@
+<!ENTITY JBEAP "JBoss Enterprise Application Platform">
+<!ENTITY JBEAPVERS "4.2.0.CP01">

Added: projects/docs/trunk/Getting_Started/en-US/Getting_Started.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Getting_Started.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Getting_Started.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<book>
+	<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="The_JBoss_Server___A_Quick_Tour.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="EJB3_Caveats.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="About_the_Example_Applications.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Sample_JSF_EJB3_Application.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Using_Seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Using_Other_Databases.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="Appendix.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+	
+</book>
+

Added: projects/docs/trunk/Getting_Started/en-US/Introduction.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Introduction.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Introduction.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="Introduction">
+	<title>Introduction</title>
+	<para>
+		&JBEAP; is easy to install and you can have it running in a few easy steps. Refer to the <emphasis>&JBEAP;: Installation Guide</emphasis> for information on pre-requisites for installation and the detailed installation steps.
+	</para>
+	
+	<para>
+		Once you have &JBEAP; installed, use this guide to familiarize yourself with its layout and the example applications that demonstrate application development and deployment.
+	</para>
+	<section id="Introduction-Feedback">
+		<title>Feedback</title>
+		<para>
+			If you spot a typo in the <emphasis>&JBEAP;: Getting Started Guide</emphasis>, or if you have thought of a way to make this manual better, we would love to hear from you! Submit a report in <ulink url="http://bugzilla.redhat.com/bugzilla/">Bugzilla</ulink>  against the Product: &JBEAP;, Version: 4.2.0, Component: Getting_Started_Guide. If you have a suggestion for improving the documentation, try to be as specific as possible. If you have found an error, include the section number and some of the surrounding text so we can find it easily.
+		</para>
+	</section>
+	
+	<section id="Introduction-Other_Manuals">
+		<title>Other Manuals</title>
+		<para>
+			If you are looking for detailed product information refer to the manuals available online at <ulink url="http://www.redhat.com/docs/manuals/jboss"></ulink>.
+		</para>
+	</section>
+
+</chapter>
+

Added: projects/docs/trunk/Getting_Started/en-US/Preface.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Preface.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Preface.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+
+<preface id="Book-Preface">
+	<title>Introduction</title>
+	<para>
+		&JBEAP; is easy to install and you can have it running in a few easy steps. Refer to the <emphasis>&JBEAP;: Installation Guide</emphasis> for information on pre-requisites for installation and the detailed installation steps.
+	</para>
+	
+	<para>
+		Once you have &JBEAP; installed, use this guide to familiarize yourself with its layout and the example applications that demonstrate application development and deployment.
+	</para>
+	<xi:include href="Software_Versions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</preface>
+

Added: projects/docs/trunk/Getting_Started/en-US/Revision_History.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Revision_History.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Revision_History.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,22 @@
+<?xml version='1.0'?>
+<!DOCTYPE revhistory PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<revhistory>
+	<revision>
+		<revnumber>4.2.2-1</revnumber>
+		<date>Oct 15 2007</date>
+		<author>
+			<firstname>Michael</firstname>
+			<surname>Hideo</surname>
+			<email>mhideo at redhat.com</email>
+		</author>
+		<revdescription>
+			<simplelist>
+				<member>Migrated Content from 4.0.4</member>
+
+			</simplelist>
+		</revdescription>
+	</revision>
+</revhistory>
+

Added: projects/docs/trunk/Getting_Started/en-US/Sample_JSF_EJB3_Application.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Sample_JSF_EJB3_Application.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Sample_JSF_EJB3_Application.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,568 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="Sample_JSF_EJB3_Application">
+	<title>Sample JSF-EJB3 Application</title>
+	<para>
+		We use a simple "TODO" application to show how JSF and EJB3 work together in a web application. The "TODO" application works like this: You can create a new 'todo' task item using the "Create" web form. Each 'todo' item has a 'title' and a 'description'. When you submit the form, the application saves your task to a relational database. Using the application, you can view all 'todo' items, edit/delete an existing 'todo' item and update the task in the database.
+	</para>
+	<para>
+		The sample application comprises the following components:
+		<itemizedlist>
+			<listitem>
+				<para>
+					Entity objects - These objects represent the data model; the properties in the object are mapped to column values in relational database tables.
+				</para>
+			</listitem>
+			<listitem>
+				<para>
+					JSF web pages - The web interface used to capture input data and display result data. The data fields on these web pages are mapped to the data model via the JSF Expression Language (EL).
+				</para>
+			</listitem>
+			<listitem>
+				<para>
+					EJB3 Session Bean - This is where the functionality is implemented. We make use of a Stateless Session Bean.
+				</para>
+			</listitem>
+		</itemizedlist>
+	</para>
+	<section id="Sample_JSF_EJB3_Application-Data_Model">
+		<title>Data Model</title>
+		<para>
+			Let's take a look at the contents of the Data Model represented by the <literal>Todo</literal> class in the <literal>Todo.java</literal> file. Each instance of the <literal>Todo</literal> class corresponds to a row in the relational database table. The 'Todo' class has three properties: id, title and description. Each of these correspond to a column in the database table.
+		</para>
+		<para>
+			 The 'Entity class' to 'Database Table' mapping information is specified using EJB3 Annotations in the 'Todo' class. This eliminates the need for XML configuration and makes it a lot clearer. The <literal>@Entity</literal> annotation defines the <literal>Todo</literal> class as an Entity Bean. The <literal>@Id</literal> and <literal>@GeneratedValue</literal> annotations on the <literal>id</literal> property indicate that the <literal>id</literal> column is the primary key and that the server automatically generates its value for each <literal>Todo</literal> object saved into the database.  
+		</para>
+		<para>
+<programlisting>
+ at Entity
+public class Todo implements Serializable {
+
+  private long id;
+  private String title;
+  private String description;
+
+  public Todo () {
+    title ="";
+    description ="";
+  }
+
+  @Id @GeneratedValue
+  public long getId() { return id;}
+  public void setId(long id) { this.id = id; }
+
+  public String getTitle() { return title; }
+  public void setTitle(String title) {this.title = title;}
+
+  public String getDescription() { return description; }
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+}
+</programlisting>
+		</para>
+	</section>
+	<section id="Sample_JSF_EJB3_Application-JSF_Web_Pages">
+		<title>JSF Web Pages</title>
+		<para>
+			In this section we will show you how the web interface is defined using JSF pages. We will also see how the data model is mapped to the web form using JSF EL. Using the #{...} notation to reference Java objects is called <emphasis role="bold">JSF EL</emphasis> (JSF Expression Language). Lets take a look at the pages used in our application:
+			<itemizedlist>
+				<listitem>
+					<para>
+						<emphasis role="bold">index.xhtml</emphasis>: This page displays two options: 1. Create New Todo 2. Show all Todos. When you click on the Submit button the corresponding action is invoked. 
+					</para>
+					<para>
+<programlisting>
+&lt;h:form&gt;
+&lt;ul&gt;
+  &lt;li&gt;&lt;h:commandLink type="submit" value="Create New Todo" action="create"/&gt;&lt;/li&gt;
+  &lt;li&gt;&lt;h:commandLink type="submit" value="Show All Todos" action="todos"/&gt;&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/h:form&gt;
+</programlisting>
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">create.xhtml</emphasis>: When you try to create a new task, this JSF page captures the input data. We use the <literal>todoBean</literal> to back the form input text fields. The #{todoBean.todo.title} symbol refers to the "title" property of the "todo" object in the "TodoBean" class. The #{todoBean.todo.description} symbol refers to the "description" property of the "todo" object in the "TodoBean" class.  The #{todoBean.persist} symbol refers to the "persist" method in the "TodoBean" class. This method creates the "Todo" instance with the input data (title and description) and persists the data.
+					</para>
+					<para>
+<programlisting>
+&lt;h:form id="create"&gt;
+&lt;table&gt;
+  &lt;tr&gt;
+    &lt;td&gt;Title:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;h:inputText id="title" value="#{todoBean.todo.title}" size="15"&gt;
+        &lt;f:validateLength minimum="2"/&gt;
+      &lt;/h:inputText&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td&gt;Description:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;h:inputTextarea id="description" value="#{todoBean.todo.description}"&gt;
+        &lt;f:validateLength minimum="2" maximum="250"/&gt;
+      &lt;/h:inputTextarea&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/table&gt;
+&lt;h:commandButton type="submit" id="create" value="Create"
+                 action="#{todoBean.persist}"/&gt;
+&lt;/h:form&gt;
+</programlisting>
+						<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_create_todo"/> shows the "Create Todo" web page with the input fields mapped to the data model.
+					</para>
+					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_create_todo">
+						<title>The "Create Todo" web page </title>
+						<mediaobject>
+							<imageobject>
+								<imagedata align="center" fileref="images/jsfejb3_create_todo.png" />
+							</imageobject>
+						</mediaobject>
+					</figure>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">todos.xhtml</emphasis>: This page displays the list of all "todos" created. There is also an option to choose a "todo" item for 'edit' or 'delete'.
+					</para>
+					<para>
+						 The list of all 'todos' is fetched by #{todoBean.todos} symbol referring to the 'getTodos()' property in the 'TodoBean' class. The JSF <literal>dataTable</literal> iterates through the list and displays each <literal>Todo</literal> object in a row. The 'Edit' option is available across each row. The #{todo.id} symbol represents the "id" property of the "todo" object.
+					</para>
+					<para>
+<programlisting>
+&lt;h:form&gt;
+&lt;h:dataTable value="#{todoBean.todos}" var="todo"&gt;
+  &lt;h:column&gt;
+    &lt;f:facet name="header"&gt;Title&lt;/f:facet&gt;
+    #{todo.title}
+  &lt;/h:column&gt;
+  &lt;h:column&gt;
+    &lt;f:facet name="header"&gt;Description&lt;/f:facet&gt;
+    #{todo.description}
+  &lt;/h:column&gt;
+  &lt;h:column&gt;
+    &lt;a href="edit.faces?tid=#{todo.id}"&gt;Edit&lt;/a&gt;
+  &lt;/h:column&gt;
+&lt;/h:dataTable&gt;
+&lt;center&gt;
+  &lt;h:commandButton action="create"
+            value="Create New Todo" type="submit"/&gt;
+&lt;/center&gt;
+&lt;/h:form&gt;
+</programlisting>
+					<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_todos"/> shows the "Show All Todos" web page with the data fields mapped to the data model.
+					</para>
+					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_todos">
+						<title>The "Show All Todos" web page </title>
+						<mediaobject>
+							<imageobject>
+								<imagedata align="center" fileref="images/jsfejb3_todos.png" />
+							</imageobject>
+						</mediaobject>
+					</figure>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">edit.xhtml</emphasis>: This page allows you to edit the "todo" item's 'title' and 'description' properties. The #{todoBean.update} and #{todoBean.delete} symbols represent the "update" and "delete" methods in the "TodoBean" class.
+					</para>
+					<para>
+<programlisting>
+&lt;h2&gt;Edit #{todoBean.todo.title}&lt;/h2&gt;
+&lt;h:form id="edit"&gt;
+&lt;input type="hidden" name="tid" value="#{todoBean.todo.id}"/&gt;
+&lt;table&gt;
+  &lt;tr&gt;
+    &lt;td&gt;Title:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;h:inputText id="title" value="#{todoBean.todo.title}" size="15"&gt;
+        &lt;f:validateLength minimum="2"/&gt;
+      &lt;/h:inputText&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td&gt;Description:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;h:inputTextarea id="description" value="#{todoBean.todo.description}"&gt;
+        &lt;f:validateLength minimum="2" maximum="250"/&gt;
+      &lt;/h:inputTextarea&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/table&gt;
+&lt;h:commandButton type="submit" id="update" value="Update"
+                 action="#{todoBean.update}"/&gt;
+&lt;h:commandButton type="submit" id="delete" value="Delete"
+                 action="#{todoBean.delete}"/&gt;
+&lt;/h:form&gt;
+</programlisting>
+					<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_edit_todo"/> shows the "Edit Todo" web page with the mapping to the data model.
+					</para>
+					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_edit_todo">
+						<title>The "Edit Todo" web page </title>
+						<mediaobject>
+							<imageobject>
+								<imagedata align="center" fileref="images/jsfejb3_edit_todo.png" />
+							</imageobject>
+						</mediaobject>
+					</figure>
+				</listitem>
+			</itemizedlist>
+		</para>
+		<note>
+			<para>
+				We have used XHTML pages in the sample applications because we recommend using Facelets instead of JSP to render JSF view pages.
+			</para>
+		</note>
+	</section>
+	<section id="Sample_JSF_EJB3_Application-EJB3_Session_Beans">
+		<title>EJB3 Session Beans</title>
+		<para>
+			EJB 3.0 is one of the major improvements introduced with Java EE 5.0. It aims at reducing the complexity of older versions of EJB and simplifies Enterprise Java development and deployment. You will notice that to declare a class as a 'Session Bean' you simply have to annotate it. Using annotations eliminates the complexity involved with too many deployment descriptors. Also the only interface an EJB3 Session Bean requires is a business interface that declares all the business methods that must be implemented by the bean. 
+		</para>
+		<para>
+			We will explore the two important source files associated with the Bean implementation in our application: <literal>TodoDaoInt.java</literal> and <literal>TodoDao.java</literal>.
+			<itemizedlist>
+				<listitem>
+					<para>
+						<emphasis role="bold">Business interface</emphasis>: <literal>TodoDaoInt.java</literal>
+					</para>
+					<para>We define here the methods that need to be implemented by the bean implementation class. Basically, the business methods that will be used in our application are defined here.
+<programlisting>
+public interface TodoDaoInt {
+
+  public void persist (Todo todo);
+  public void delete (Todo todo);
+  public void update (Todo todo);
+
+  public List &lt;Todo&gt; findTodos ();
+  public Todo findTodo (String id);
+}
+</programlisting>
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<emphasis role="bold">Stateless Session Bean</emphasis>: <literal>TodoDao.java</literal>
+					</para>
+					<para>
+						The <literal>@Stateless</literal> annotation marks the bean as a stateless session bean. In this class, we need to access the Entity bean <literal>Todo</literal> defined earlier. For this we need an <literal>EntityManager</literal>. The <literal>@PersistenceContext</literal> annotation tells the JBoss Server to inject an entity manager during deployment.
+<programlisting>
+ at Stateless
+public class TodoDao implements TodoDaoInt {
+
+  @PersistenceContext
+  private EntityManager em;
+
+  public void persist (Todo todo) {
+    em.persist (todo);
+  }
+
+  public void delete (Todo todo) {
+    Todo t = em.merge (todo);
+    em.remove( t );
+  }
+
+  public void update (Todo todo) {
+    em.merge (todo);
+  }
+
+  public List &lt;Todo&gt; findTodos () {
+    return (List &lt;Todo&gt;) em.createQuery("select t from Todo t")
+                                  .getResultList();
+  }
+
+  public Todo findTodo (String id) {
+    return (Todo) em.find(Todo.class, Long.parseLong(id));
+  }
+
+}
+</programlisting>
+					</para>
+				</listitem>
+			</itemizedlist>
+		</para>
+	</section>
+	<section id="Sample_JSF_EJB3_Application-Configuration_and_Packaging">
+		<title>Configuration and Packaging</title>
+		<para>
+			We will build the sample application using Ant and explore the configuration and packaging details. If you haven't installed Ant yet, do so now.
+		</para>
+		<section id="Building_The_Application">
+			<title>Building The Application</title>
+			<para>Let's look at building the example application and then explore the configuration files in detail.
+			</para>
+			<para>
+				In <xref linkend="About_the_Example_Applications" />, we looked at the directory structure of the <literal>jsfejb3</literal> sample application. At the command line, go to the <literal>jsfejb3</literal> directory. There you will see a <literal>build.xml</literal> file. This is our Ant build script for compiling and packaging the archives. To build the application, you need to first of all edit the <literal>build.xml</literal> file and edit the value of <literal>jboss-dist</literal> to reflect the location where the JBoss Application Server is installed. Once you have done this, just type the command <literal>ant</literal> and your output should look like this:
+			</para>
+<programlisting>
+[vrenish at vinux jsfejb3]$ ant
+Buildfile: build.xml
+
+compile:
+    [mkdir] Created dir: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/build/classes
+    [javac] Compiling 4 source files to /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3
+    /build/classes
+    [javac] Note: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/src/TodoDao.java uses
+    unchecked or unsafe operations.
+    [javac] Note: Recompile with -Xlint:unchecked for details.
+
+war:
+    [mkdir] Created dir: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/build/jars
+      [war] Building war: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/build/jars/
+      app.war
+
+ejb3jar:
+      [jar] Building jar: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/build/jars/
+      app.jar
+
+ear:
+      [ear] Building ear: /home/vrenish/jboss-eap-4.2/doc/examples/jsfejb3/build/jars/
+      jsfejb3.ear
+
+main:
+
+BUILD SUCCESSFUL
+Total time: 2 seconds
+(vrenish at vinux jsfejb3)$
+</programlisting>
+			<para>
+				If you get the BUILD SUCCESSFUL message, you will find a newly created <literal>build</literal> directory with 2 sub-directories in it: <itemizedlist>
+					<listitem>
+						<para>
+							<emphasis role="bold">classes</emphasis>: containing the compiled class files.
+						</para>
+					</listitem>
+					<listitem>
+						<para>
+							<emphasis role="bold">jars</emphasis>: containing three archives - <literal>app.jar</literal>, <literal>app.war</literal> and <literal>jsfejb3.ear</literal>. <itemizedlist>
+								<listitem>
+									<para>
+										app.jar : EJB code and descriptors.
+									</para>
+								</listitem>
+								<listitem>
+									<para>
+										app.war : web application which provides the front end to allow users to interact with the business components (the EJBs). The web source (HTML, images etc.) contained in the <literal>jsfejb3/view</literal> directory is added unmodified to this archive. The Ant task also adds the <literal>WEB-INF</literal> directory that contains the files which aren’t meant to be directly accessed by a web browser but are still part of the web application. These include the deployment descriptors (<literal>web.xml</literal>) and extra jars required by the web application.
+									</para>
+								</listitem>
+								<listitem>
+									<para>
+										jsfejb3.ear : The EAR file is the complete application, containing the EJB modules and the web module. It also contains an additional descriptor, <literal>application.xml</literal>. It is also possible to deploy EJBs and web application modules individually but the EAR provides a convenient single unit.
+									</para>
+								</listitem>
+							</itemizedlist>
+						</para>
+					</listitem>
+				</itemizedlist>
+			</para>
+		</section>
+		<section id="Configuration_Files">
+			<title>Configuration Files</title>
+			<para>
+				Now that we have built the application, lets take a closer look at some of the important Configuration files. We have built the final archive ready for deployment - <literal>jsfejb3.ear</literal>. The contents of your EAR file should look like this:	
+			</para>
+<programlisting>
+jsfejb3.ear
+|+ app.jar   // contains the EJB code
+    |+ import.sql
+    |+ Todo.class
+    |+ TodoDao.class
+    |+ TodoDaoInt.class
+    |+ META-INF
+        |+ persistence.xml
+|+ app.war   // contains web UI
+    |+ index.html
+    |+ index.xhtml
+    |+ create.xhtml
+    |+ edit.xhtml
+    |+ todos.xhtml
+    |+ TodoBean.class
+    |+ style.css
+    |+ META-INF
+    |+ WEB-INF
+       |+ faces-config.xml
+       |+ navigation.xml
+       |+ web.xml
+|+ META-INF  // contains the descriptors
+    |+ application.xml
+    |+ jboss-app.xml
+</programlisting>
+			<itemizedlist>
+				<listitem>
+					<para>
+						<literal>application.xml</literal>: This file lists the JAR files in the EAR (in our case <literal>app.jar</literal>) and tells the JBoss server what files to look for and where. The root URL for the application is also specified in this file as 'context-root'.
+<programlisting>
+&lt;application&gt;
+  &lt;display-name&gt;Sample Todo&lt;/display-name&gt;
+  &lt;module&gt;
+    &lt;web&gt;
+      &lt;web-uri&gt;app.war&lt;/web-uri&gt;
+      &lt;context-root&gt;/jsfejb3&lt;/context-root&gt;
+    &lt;/web&gt;
+  &lt;/module&gt;
+  &lt;module&gt;
+    &lt;ejb&gt;app.jar&lt;/ejb&gt;
+  &lt;/module&gt;
+&lt;/application&gt;
+</programlisting>
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<literal>jboss-app.xml</literal>: Every EAR application should specify a unique string name for the class loader. In our case, we use the application name 'jsfejb3' as the class loader name.
+<programlisting>
+&lt;jboss-app&gt;
+  &lt;loader-repository&gt;
+    jsfejb3:archive=jsfejb3.ear
+  &lt;/loader-repository&gt;
+&lt;/jboss-app&gt;
+</programlisting>
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<literal>app.jar</literal>: This contains EJB3 Session Bean and Entity Bean classes and the related configuration files. In addition, the <literal>persistence.xml</literal> file configures the back-end data source (in our case the default HSQL database) for the <literal>EntityManager</literal>. 
+<programlisting>
+&lt;persistence&gt;
+   &lt;persistence-unit name="helloworld"&gt;
+      &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
+      &lt;jta-data-source&gt;java:/DefaultDS&lt;/jta-data-source&gt;
+      &lt;properties&gt;
+         &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt;
+         &lt;property name="hibernate.hbm2ddl.auto" value="create-drop"/&gt;
+      &lt;/properties&gt;
+   &lt;/persistence-unit&gt;
+&lt;/persistence&gt;
+</programlisting>
+					</para>
+				</listitem>
+				<listitem>
+					<para>
+						<literal>app.war</literal>: This contains the Web UI files packaged according to the Web Application aRchive (WAR) specification. It contains all the web pages and the required configuration files. The <literal>web.xml</literal> file is an important file for all JAVA EE web applications. It is the web deployment descriptor file. The <literal>faces-config.xml</literal> file is the configuration file for JSF. The <literal>navigation.xml</literal> file contains the rules for JSF page navigation.
+					</para>
+<programlisting>
+//faces-config.xml
+&lt;faces-config&gt;
+  &lt;application&gt;
+    &lt;view-handler&gt;
+      com.sun.facelets.FaceletViewHandler
+    &lt;/view-handler&gt;
+  &lt;/application&gt;
+  &lt;managed-bean&gt;
+    &lt;description&gt;Dao&lt;/description&gt;
+    &lt;managed-bean-name&gt;todoBean&lt;/managed-bean-name&gt;
+    &lt;managed-bean-class&gt;TodoBean&lt;/managed-bean-class&gt;
+    &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt;
+  &lt;/managed-bean&gt;
+&lt;/faces-config&gt;
+</programlisting>
+				</listitem>
+			</itemizedlist>
+		</section>
+	</section>
+	<section id="The_Database">
+		<title>The Database</title>
+		<section id="The_Database-Creating_the_Database_Schema">
+			<title>Creating the Database Schema</title>
+			<para>
+				To pre-populate the database, we have supplied SQL Code (<literal>import.sql</literal>) to run with HSQL in the <literal>examples/jsfejb3/resources</literal> directory. When you build the application using Ant, this is packaged in the app.jar file within the jsfejb3.ear file. When the application is deployed, you should be able to view the pre-populated data.
+			</para>
+		</section>
+		<section id="The_Database-The_HSQL_Database_Manager_Tool">
+			<title>The HSQL Database Manager Tool</title>
+			<para>
+				Just as a quick aside at this point, start up the JMX console application and click on the <literal>service=Hypersonic</literal> link which you’ll find under the section <literal>jboss</literal>. If you can’t find this, make sure the Hypersonic service is enabled in the <literal>hsqldb-ds.xml</literal> file.
+			</para>
+			<para>
+				This will take you to the information for the Hypersonic service MBean. Scroll down to the bottom of the page and click the <literal>invoke</literal> button for the <literal>startDatabaseManager()</literal> operation. This starts up the HSQL Manager, a Java GUI application which you can use to manipulate the database directly.
+			</para>
+			<figure id="The_HSQL_Database_Manager_Tool-The_HSQL_Database_Manger_">
+				<title>The HSQL Database Manger </title>
+				<mediaobject>
+					<imageobject>
+						<imagedata align="center" fileref="images/hsql-manager.png" />
+					</imageobject>
+				</mediaobject>
+			</figure>
+		</section>
+	</section>
+	<section id="Sample_JSF_EJB3_Application-Deploying_the_Application">
+		<title>Deploying the Application</title>
+		<para>
+			Deploying an application in JBoss is simple and easy. You just have to copy the EAR file to the <literal>deploy</literal> directory in the 'server configuration' directory of your choice. Here, we will deploy it to the 'default' configuration, so we copy the EAR file to the <literal>JBOSS_DIST/jboss-as/server/default/deploy</literal> directory.
+		</para>
+		<para>
+			You should see something close to the following output from the server:
+		</para>
+<programlisting>
+15:32:23,997 INFO  [EARDeployer] Init J2EE application: file:/home/vrenish/jboss-eap-4.2
+/jboss-as/server/default/deploy/jsfejb3.ear
+15:32:24,212 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.
+entity.PersistenceUnitDeployment
+15:32:24,213 INFO  [JmxKernelAbstraction] installing MBean: persistence.units:ear=
+jsfejb3.ear,jar=app.jar,unitName=helloworld with dependencies:
+15:32:24,213 INFO  [JmxKernelAbstraction]       jboss.jca:name=DefaultDS,service=
+DataSourceBinding
+15:32:24,275 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.
+units:ear=jsfejb3.ear,jar=app.jar,unitName=helloworld
+15:32:24,392 INFO  [Ejb3Configuration] found EJB3 Entity bean: Todo
+15:32:24,450 WARN  [Ejb3Configuration] Persistence provider caller does not implements 
+the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
+15:32:24,512 INFO  [Configuration] Reading mappings from resource : META-INF/orm.xml
+15:32:24,512 INFO  [Ejb3Configuration] [PersistenceUnit: helloworld] no META-INF/orm.xml 
+found
+15:32:24,585 INFO  [AnnotationBinder] Binding entity from annotated class: Todo
+15:32:24,586 INFO  [EntityBinder] Bind entity Todo on table Todo
+.
+.
+.
+.
+15:32:26,311 INFO  [SchemaExport] Running hbm2ddl schema export
+15:32:26,312 INFO  [SchemaExport] exporting generated schema to database
+15:32:26,314 INFO  [SchemaExport] Executing import script: /import.sql
+15:32:26,418 INFO  [SchemaExport] schema export complete
+15:32:26,454 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.
+initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.
+naming:org.jnp.interfaces}
+15:32:26,484 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.
+stateless.StatelessContainer
+15:32:26,485 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=jsfejb3.ear,
+jar=app.jar,name=TodoDao,service=EJB3 with dependencies:
+15:32:26,513 INFO  [JmxKernelAbstraction]       persistence.units:ear=jsfejb3.ear,
+jar=app.jar,unitName=helloworld
+15:32:26,557 INFO  [EJBContainer] STARTED EJB: TodoDao ejbName: TodoDao
+15:32:26,596 INFO  [EJB3Deployer] Deployed: file:/home/vrenish/jboss-eap-4.2/jboss-as/
+server/default/tmp/deploy/
+tmp33761jsfejb3.ear-contents/app.jar
+15:32:26,625 INFO  [TomcatDeployer] deploy, ctxPath=/jsfejb3, warUrl=.../tmp/deploy/
+tmp33761jsfejb3.ear-contents/app-exp.war/
+15:32:26,914 INFO  [EARDeployer] Started J2EE application: file:/home/vrenish/jboss-eap-
+4.2/jboss-as/server/default/deploy/jsfejb3.ear
+</programlisting>
+		<para>
+			If there are any errors or exceptions, make a note of the error message. Check that the EAR is complete and inspect the WAR file and the EJB jar files to make sure they contain all the necessary components (classes, descriptors etc.).
+		</para>
+		<para>
+			You can safely redeploy the application if it is already deployed. To undeploy it you just have to remove the archive from the <literal>deploy</literal> directory. There’s no need to restart the server in either case. If everything seems to have gone OK, then point your browser at the application URL.
+		</para>
+		<para>
+			<ulink url="http://localhost:8080/jsfejb3"></ulink>
+		</para>
+		<para>
+			You will be forwarded to the application main page. <xref linkend="Deploying_the_Application-Sample_TODO" /> shows the sample application in action.
+		</para>
+		<figure id="Deploying_the_Application-Sample_TODO">
+			<title>Sample TODO</title>
+			<mediaobject>
+				<imageobject>
+					<imagedata align="center" fileref="images/sample_jsfejb3.png" />
+				</imageobject>
+			</mediaobject>
+		</figure>
+	</section>
+
+</chapter>
+

Added: projects/docs/trunk/Getting_Started/en-US/Server_Configurations.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Server_Configurations.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Server_Configurations.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,847 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations">
+	<title>Server Configurations</title>
+	<para>
+		Fundamentally, the JBoss architecture consists of the JMX MBean server, the microkernel, and a set of pluggable component services - the MBeans. This makes it easy to assemble different configurations and gives you the flexibility to tailor them to meet your requirements.
+	</para>
+	<para>
+		You don’t have to run a large, monolithic server all the time; you can remove the components you don’t need (which can also reduce the server startup time considerably) and you can also integrate additional services into JBoss by writing your own MBeans. You certainly don’t need to do this to be able to run standard J2EE applications though. Everything you need is already there.
+	</para>
+	<para>
+		You don’t need a detailed understanding of JMX to use JBoss, but it’s worth keeping a picture of this basic architecture in mind as it is central to the way JBoss works.
+	</para>
+	<para>
+		The JBoss Enterprise Application Platform ships with four different server configurations. Within the <literal>JBOSS_DIST/jboss-as/server</literal> directory, you will find four subdirectories: <literal>minimal</literal>, <literal>default</literal>, <literal>production</literal> and <literal>all</literal> - one for each server configuration. Each of these configurations provide a different set of services. The <literal>production</literal> configuration is the one used if you don’t specify another one when starting up the server.
+	</para>
+	<para>
+		<variablelist>
+			<varlistentry>
+				<term>minimal</term>
+				<listitem>
+					<para>
+						has a minimal configuration—the bare minimum services required to start JBoss. It starts the logging service, a JNDI server and a URL deployment scanner to find new deployments. This is what you would use if you want to use JMX/JBoss to start your own services without any other J2EE technologies. This is just the bare server. There is no web container, no EJB or JMS support. This is not a J2EE 1.4 compatible configuration.
+					</para>
+				</listitem>
+			</varlistentry>
+			<varlistentry>
+				<term>default</term>
+				<listitem>
+					<para>
+						is a base J2EE 1.4 server profile containing a default set of services. It has the most frequently used services required to deploy a J2EE application. It does not include the JAXR service, the IIOP service, or any of the clustering services. Please note that although this configuration is called "default", the actual default configuration for the server is the "production" configuration.
+					</para>
+				</listitem>
+			</varlistentry>
+			<varlistentry>
+				<term>all</term>
+				<listitem>
+					<para>
+						on the other hand has all the services configured to launch every single component. This is a full J2EE 1.4 server profile with enterprise extensions such as Clustering and RMI/IIOP.
+					</para>
+				</listitem>
+			</varlistentry>
+			<varlistentry>
+				<term>production</term>
+				<listitem>
+					<para>
+						is based on the "all" profile, tuned for production; with log verbosity reduced, deployment scanning every 60 seconds, and memory usage tuned to accomodate production deployment requirements, among other things. This is the configuration that will be used by the server when it is started, if no other configuration is specified.
+					</para>
+				</listitem>
+			</varlistentry>
+		</variablelist>
+	</para>
+	<para>
+		If you want to know which services are configured in each of these instances, look at the <filename>jboss-service.xml</filename> file in the <filename class="directory">JBOSS_DIST/jboss-as/server/&lt;instance-name&gt;/conf/</filename> directory and also the configuration files in the <filename class="directory">JBOSS_DIST/jboss-as/server/&lt;instance-name&gt;/deploy</filename> directory.
+<programlisting>
+[vsr]$<literal>ls server/default/conf </literal>
+jbossjta-properties.xml  jndi.properties   standardjbosscmp-jdbc.xml
+jboss-log4j.xml          login-config.xml  standardjboss.xml
+jboss-minimal.xml        props             xmdesc
+jboss-service.xml        standardjaws.xml
+			
+</programlisting>
+	</para>
+	<note>
+		<para>
+			The <emphasis role="bold">production</emphasis> configuration is the one used if you don’t specify another one when starting up the server. 
+		</para>
+		<para>
+			To start the server using an alternate configuration refer to <xref linkend="Starting_and_Stopping_the_Server-Start_the_Server_With_Alternate_Configuration" />.
+		</para>
+	</note>
+	<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations-Server_Configuration_Directory_Structure">
+		<title>Server Configuration Directory Structure</title>
+		<para>
+			The directory server configuration you’re using, is effectively the server root while JBoss is running. It contains all the code and configuration information for the services provided by the particular server configuration. It’s where the log output goes, and it’s where you deploy your applications. <xref linkend="Server_Configuration_Directory_Structure-Server_Configuration_Directory_Structure" /> shows the directories inside the server configuration directory (<filename class="directory">JBOSS_DIST/jboss-as/server/&lt;instance-name&gt;</filename>) and their functions.
+		</para>
+		<para>
+			<table id="Server_Configuration_Directory_Structure-Server_Configuration_Directory_Structure">
+				<title>Server Configuration Directory Structure</title>
+				<tgroup cols="2">
+					<colspec colname="c1" colnum="1" colwidth="1*"></colspec>
+					<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+					<thead>
+						<row>
+							<entry>
+								Directory
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+					<tbody>
+						<row>
+							<entry>
+								<filename class="directory">conf</filename>
+							</entry>
+							<entry>
+								The <filename class="directory">conf</filename> directory contains the <filename>jboss-service.xml</filename> bootstrap descriptor file for a given server configuration. This defines the core services that are fixed for the lifetime of the server. 
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">data</filename>
+							</entry>
+							<entry>
+								The <filename class="directory">data</filename> directory is available for use by services that want to store content in the file system. It holds persistent data for services intended to survive a server restart. Serveral JBoss services, such as the embedded Hypersonic database instance, store data here.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">deploy</filename>
+							</entry>
+							<entry>
+								The <filename class="directory">deploy</filename> directory contains the hot-deployable services (those which can be added to or removed from the running server). It also contains applications for the current server configuration. You deploy your application code by placing application packages (JAR, WAR and EAR files) in the <filename class="directory">deploy</filename> directory. The directory is constantly scanned for updates, and any modified components will be re-deployed automatically. <!--TODO not sure what this means -->This may be overridden through the URLDeploymentScanner URLs attribute.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">lib</filename>
+							</entry>
+							<entry>
+								This directory contains JAR files (Java libraries that should not be hot deployed) needed by this server configuration. You can add required library files here for JDBC drivers etc. All JARs in this directory are loaded into the shared classpath at startup.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">log</filename>
+							</entry>
+							<entry>
+								This is where the log files are written. JBoss uses the Jakarta <literal>log4j</literal> package for logging and you can also use it directly in your own applications from within the server. This may be overridden through the <filename class="directory">conf/</filename><filename>log4j.xml</filename> configuration file.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">tmp</filename>
+							</entry>
+							<entry>
+								The <filename class="directory">tmp</filename> directory is used for temporary storage by JBoss services. The deployer, for example, expands application archives in this directory.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<filename class="directory">work</filename>
+							</entry>
+							<entry>
+								This directory is used by Tomcat for compilation of JSPs.
+							</entry>
+						</row>
+					</tbody>
+				</tgroup>
+			</table>
+		</para>
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations-The_default_Server_Configuration_File_Set">
+		<title>The "default" Server Configuration File Set</title>
+		<para>
+			The "<literal>default</literal>" server configuration file set is located in the <literal>JBOSS_DIST/jboss-as/server/default</literal> directory. <!--<xref linkend="The_default_Server_Configuration_File_Set-An_expanded_view_of_the_default_server_configuration_file_set_conf_and_deploy_directories" />--> Let's take a look at the contents of the <literal>default</literal> server configuration file set:
+<programlisting>jboss-eap-4.2                // jboss.home_url
+	|+ doc
+	|+ jboss-as
+		|+ bin
+		|+ client
+		|+ docs
+		|+ icons
+		|+ lib                        // jboss.lib.url
+		|+ scripts
+		|+ server
+			|+ all               // jboss.server.name
+			|+ default           // jboss.server.home.url
+				|+ conf      // jboss.server.config.url
+					|+ props
+					|+ xmdesc
+					-  jbossjta-properties.xml  
+					-  jboss-minimal.xml  
+					-  jndi.properties                   
+					-  standardjboss.xml
+					-  jboss-log4j.xml
+					-  jboss-service.xml
+					-  login-config.xml
+					-  standardjbosscmp-jdbc.xml
+				|+ deploy
+					|+ ejb3.deployer
+					|+ http-invoker.sar
+					|+ jboss-aop-jdk50.deployer
+					|+ jboss-bean.deployer
+					|+ jboss-web.deployer
+					|+ jbossws.sar
+					|+ jms
+					|+ jmx-console.war
+					|+ management
+					|+ uuid-key-generator.sar
+					-  bsh-deployer.xml
+					-  cache-invalidation-service.xml
+					-  client-deployer-service.xml
+					-  ear-deployer.xml
+					-  ejb3-interceptors-aop.xml
+					-  ejb-deployer.xml
+					-  hsqldb-ds.xml
+					-  jboss-ha-local-jdbc.rar
+					-  jboss-ha-xa-jdbc.rar
+					-  jbossjca-service.xml
+					-  jboss-local-jdbc.rar
+					-  jboss-xa-jdbc.rar
+					-  jmx-invoker-service.xml
+					-  jsr88-service.xml
+					-  mail-service.xml
+					-  monitoring-service.xml
+					-  properties-service.xml
+					-  quartz-ra.rar
+					-  schedule-manager-service.xml
+					-  scheduler-service.xml
+					-  sqlexception-service.xml
+				|+ lib            // jboss.server.lib.url
+			|+ minimal
+			|+ production
+	|+ seam
+	|+ Uninstaller                          // jboss.uninstaller.url
+</programlisting>
+		</para>
+		<section id="The_default_Server_Configuration_File_Set-Contents_of_conf_directory">
+			<title>Contents of "conf" directory</title>
+			<para>
+				The files in the <literal>conf</literal> directory are explained in the following table.
+			</para>
+			<para>
+				<table id="Contents_of_conf_directory-Contents_of_conf_directory">
+					<title>Contents of "conf" directory</title>
+					<tgroup cols="2">
+						<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+						<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+						<thead>
+							<row>
+								<entry>
+									File
+								</entry>
+								<entry>
+									Description
+								</entry>
+							</row>
+						</thead>
+						<tbody>
+							<row>
+								<entry>
+									<literal>jboss-minimal.xml</literal>
+								</entry>
+								<entry>
+									This is a minimalist example of the <literal>jboss-service.xml</literal> configuration file. (This is the <literal>jboss-service.xml</literal> file used in the <literal>minimal</literal> configuration file set)
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>jboss-service.xml</literal> defines the core services and their configurations.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jndi.properties</literal>
+								</entry>
+								<entry>
+									The <literal>jndi.properties</literal> file specifies the JNDI <literal>InitialContext</literal> properties that are used within the JBoss server when an <literal>InitialContext</literal> is created using the no-arg constructor.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-log4j.xml</literal>
+								</entry>
+								<entry>
+									This file configures the Apache log4j framework category priorities and appenders used by the JBoss server code.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>login-config.xml</literal>
+								</entry>
+								<entry>
+									This file contains sample server side authentication configurations that are applicable when using JAAS based security.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>props/*</literal>
+								</entry>
+								<entry>
+									The <literal>props</literal> directory contains the users and roles property files for the <literal>jmx-console</literal>.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>standardjaws.xml</literal>
+								</entry>
+								<entry>
+									This file provides the default configuration for the legacy EJB 1.1 CMP engine.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>standardjboss.xml</literal>
+								</entry>
+								<entry>
+									This file provides the default container configurations.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>standardjbosscmp-jdbc.xml</literal>
+								</entry>
+								<entry>
+									This file provides a default configuration file for the JBoss CMP engine.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>xmdesc/*-mbean.xml</literal>
+								</entry>
+								<entry>
+									The <literal>xmdesc</literal> directory contains XMBean descriptors for several services configured in the <literal>jboss-service.xml</literal> file.
+								</entry>
+							</row>
+						</tbody>
+					</tgroup>
+				</table>
+			</para>
+		</section>
+		
+		<section id="The_default_Server_Configuration_File_Set-Contents_of_deploy_directory">
+			<title>Contents of "deploy" directory</title>
+			<para>
+				The files in the <literal>deploy</literal> directory are explained in the following table.
+			</para>
+			<para>
+				<table id="Contents_of_deploy_directory-Contents_of_deploy_directory">
+					<title>Contents of "deploy" directory</title>
+					<tgroup cols="2">
+						<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+						<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+						<thead>
+							<row>
+								<entry>
+									File
+								</entry>
+								<entry>
+									Description
+								</entry>
+							</row>
+						</thead>
+						<tbody>
+							<row>
+								<entry>
+									<literal>bsh-deployer.xml</literal>
+								</entry>
+								<entry>
+									This file configures the bean shell deployer, which deploys bean shell scripts as JBoss services.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>cache-invalidation-service.xml</literal>
+								</entry>
+								<entry>
+									This is a service that allows for custom invalidation of the EJB caches via JMS notifications. It is disabled by default.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>client-deployer-service.xml</literal>
+								</entry>
+								<entry>
+									This is a service that provides support for J2EE application clients. It manages the <literal>java:comp/env</literal> enterprise naming context for client applications based on the <literal>application-client.xml</literal> descriptor.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>ear-deployer.xml</literal>
+								</entry>
+								<entry>
+									The EAR deployer is the service responsible for deploying J2EE EAR files.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>ejb-deployer.xml</literal>
+								</entry>
+								<entry>
+									The EJB deployer is the service responsible for deploying J2EE EJB JAR files.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>hsqldb-ds.xml</literal>
+								</entry>
+								<entry>
+									<literal>hsqldb-ds.xml</literal> configures the Hypersonic embedded database service configuration file. It sets up the embedded database and related connection factories.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>http-invoker.sar</literal>
+								</entry>
+								<entry>
+									<literal>http-invoker.sar</literal> contains the detached invoker that supports RMI over HTTP. It also contains the proxy bindings for accessing JNDI over HTTP.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-aop-jdk50.deployer</literal>
+								</entry>
+								<entry>
+									This service configures the <literal>AspectManagerService</literal> and deploys JBoss AOP applications.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-bean.deployer</literal>
+								</entry>
+								<entry>
+									<literal>jboss-bean.deployer</literal> provides the JBoss microcontainer, which deploys POJO services wrapped in <literal>.beans</literal> files.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-ha-local-jdbc.rar</literal>
+								</entry>
+								<entry>
+									<literal>jboss-ha-local-jdbc.rar</literal> is an experimental version of <literal>jboss-local-jdbc.rar</literal> that supports datasource failover.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-ha-xa-jdbc.rar</literal>
+								</entry>
+								<entry>
+									<literal>jboss-ha-xa-jdbc.rar</literal> is an experimental version of <literal>jboss-xa-jdbc.rar</literal> that supports datasource failover.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-local-jdbc.rar</literal>
+								</entry>
+								<entry>
+									<literal>jboss-local-jdbc.rar</literal> is a JCA resource adaptor that implements the JCA <literal>ManagedConnectionFactory</literal> interface for JDBC drivers that support the <literal>DataSource</literal> interface but not JCA.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-xa-jdbc.rar</literal>
+								</entry>
+								<entry>
+									<literal>jboss-xa-jdbc.rar</literal> is a JCA resource adaptor that implements the JCA <literal>ManagedConnectionFactory</literal> interface for JDBC drivers that support the <literal>XADataSource</literal> interface.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jbossjca-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>jbossjca-service.xml</literal> is the application server implementation of the JCA specification. It provides the connection management facilities for integrating resource adaptors into the JBoss server.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-web.deployer</literal>
+								</entry>
+								<entry>
+									The <literal>jboss-web.deployer</literal> directory provides the Tomcat servlet engine.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jbossws.sar</literal>
+								</entry>
+								<entry>
+									<literal>jbossws.sar</literal> provides J2EE web services support.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/hsqldb-jdbc-state-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>hsqldb-jdbc-state-service.xml</literal> provides JMS state management using Hypersonic.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/hsqldb-jdbc2-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>hsqldb-jdbc2-service.xml</literal> configures JMS persistence and caching using Hypersonic. It also contains the <literal>DestinationManager</literal> MBean, which is the core service for the JMS implementation.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jbossmq-destinations-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>jbossmq-destinations-service.xml</literal> configures a number of JMS queues and topics used by the JMS unit tests.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jbossmq-httpil.sar</literal>
+								</entry>
+								<entry>
+									<literal>jbossmq-httpil.sar</literal> provides a JMS invocation layer that allows the use of JMS over HTTP.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jbossmq-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>jbossmq-service.xml</literal> file configures the core JBossMQ JMS service.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jms-ds.xml</literal>
+								</entry>
+								<entry>
+									The <literal>jms-ds.xml</literal> file configures the JBossMQ JMS provider for use with the <literal>jms-ra.rar</literal> JCA resource adaptor.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jms-ra.rar</literal>
+								</entry>
+								<entry>
+									<literal>jms-ra.rar</literal> is a JCA resource adaptor that implements the JCA <literal>ManagedConnectionFactory</literal> interface for JMS connection factories.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/jvm-il-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>jvm-il-service.xml</literal> configures the in-JVM JMS transport invocation layer.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jms/uil2-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>uil2-service.xml</literal> configures the JMS version 2 unified invocation layer. Its a fast and reliable custom socket based transport that should be used for messaging between JVMs.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jmx-console.war</literal>
+								</entry>
+								<entry>
+									The <literal>jmx-console.war</literal> directory provides the JMX Console. The JMX Console provides a simple web interface for managing the MBean server.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jmx-invoker-service.sar</literal>
+								</entry>
+								<entry>
+									<literal>jmx-invoker-service.sar</literal> is an unpacked MBean service archive that exposes a subset of the JMX <literal>MBeanServer</literal> interface methods as an RMI interface to enable remote access to the JMX core functionality. This is similar to the legacy <literal>jmx-rmi-adaptor.sar</literal>, with the difference that the transport is handled by the detached invoker architecture.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jsr-88-service.xml</literal>
+								</entry>
+								<entry>
+									<literal>jsr-88-service.xml</literal> provides the JSR 88 remote deployment service.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>mail-ra.rar</literal>
+								</entry>
+								<entry>
+									<literal>mail-ra.rar</literal> is a resource adaptor that provides a JavaMail connector.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>mail-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>mail-service.xml</literal> file is an MBean service descriptor that provides JavaMail sessions for use inside the JBoss server.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>management/console-mgr.sar</literal>
+								</entry>
+								<entry>
+									<literal>console-mgr.sar</literal> provides the Web Console. It is a web application/applet that provides a richer view of the JMX server management data than the JMX console. You may view the console using the URL <literal>http://localhost:8080/web-console/</literal>.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>monitoring-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>monitoring-service.xml</literal> file configures alert monitors like the console listener and email listener used by JMX notifications.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>properties-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>properties-service.xml</literal> file is an MBean service descriptor that allows for customization of the JavaBeans <literal>PropertyEditor</literal>s as well as the definition of system properties.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>scheduler-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>scheduler-service.xml</literal> and <literal>schedule-manager-service.xml</literal> files are MBean service descriptors that provide a scheduling type of service.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>sqlexception-service.xml</literal>
+								</entry>
+								<entry>
+									The <literal>sqlexception-service.xml</literal> file is an MBean service descriptor for the handling of vendor specific <literal>SQLException</literal>s.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>uuid-key-generator.sar</literal>
+								</entry>
+								<entry>
+									The <literal>uuid-key-generator.sar</literal> service provides a UUID-based key generation facility.
+								</entry>
+							</row>
+						</tbody>
+					</tgroup>
+				</table>
+			</para>
+		</section>
+
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations-The_all_Server_Configuration_File_Set">
+		<title>The "all" Server Configuration File Set</title>
+		<para>
+			The "all" server configuration file set is located in the <filename class="directory">JBOSS_DIST/jboss-as/server/all</filename> directory. In addition to the services in the "default" set, the all configuration contains several other services in the <literal>conf/</literal> directory as shown below.
+		</para>
+		<para>
+			<table id="The_all_Server_Configuration_File_Set-Additional_Services_in_conf_directory_for_all_configuration">
+				<title>Additional Services in "conf" directory for "all" configuration</title>
+				<tgroup cols="2">
+					<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+					<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+					<thead>
+						<row>
+							<entry>
+								File
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+					<tbody>
+						<row>
+							<entry>
+								<literal>cluster-service.xml</literal>
+							</entry>
+							<entry>
+								This service configures clustering communication for most clustered services in JBoss.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>deploy-hasingleton-service.xml</literal>
+							</entry>
+							<entry>
+								This provides the HA singleton service, allowing JBoss to manage services that must be active on only one node of a cluster.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>deploy.last/farm-service.xml</literal>
+							</entry>
+							<entry>
+								<literal>farm-service.xml</literal> provides the farm service, which allows for cluster-wide deployment and undeployment of services.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>httpha-invoker.sar</literal>
+							</entry>
+							<entry>
+								This service provides HTTP tunneling support for clustered environments.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>iiop-service.xml</literal>
+							</entry>
+							<entry>
+								This provides IIOP invocation support.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>juddi-service.sar</literal>
+							</entry>
+							<entry>
+								This service provides UDDI lookup services.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>snmp-adaptor.sar</literal>
+							</entry>
+							<entry>
+								This is a JMX to SNMP adaptor. It allows for the mapping of JMX notifications onto SNMP traps.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>tc5-cluster.sar</literal>
+							</entry>
+							<entry>
+								Provides AOP support for field-level HTTP session replication.
+							</entry>
+						</row>
+					</tbody>
+				</tgroup>
+			</table>
+		</para>
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations-EJB3_Services_">
+			<title>EJB3 Services </title>
+			<para>
+				The following table explains the files providing ejb3 services.
+			</para>
+			<para>
+				<table id="EJB3_Services_-EJB3_Services">
+					<title>EJB3 Services</title>
+					<tgroup cols="2">
+						<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+						<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+						<thead>
+							<row>
+								<entry>
+									File
+								</entry>
+								<entry>
+									Description
+								</entry>
+							</row>
+						</thead>
+						<tbody>
+							<row>
+								<entry>
+									<literal>ejb3-interceptors-aop.xml</literal>
+								</entry>
+								<entry>
+									This service provides the AOP interceptor stack configurations for EJB3 bean types.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>ejb3.deployer</literal>
+								</entry>
+								<entry>
+									This service deploys EJB3 applications into JBoss.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jboss-aop-jdk50.deployer</literal>
+								</entry>
+								<entry>
+									This is a Java 5 version of the AOP deployer. The AOP deployer configures the <literal>AspectManagerService</literal> and deploys JBoss AOP applications.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>jbossws.sar</literal>
+								</entry>
+								<entry>
+									This provides Java EE 5 web services support.
+								</entry>
+							</row>
+						</tbody>
+					</tgroup>
+				</table>
+			</para>
+			<para>
+				Finally, in the EJB3 "all" configuration there are two additional services.
+			</para>
+			<para>
+				<table id="EJB3_Services_-Additional_Services_in_EJB3_all_Configuration">
+					<title>Additional Services in EJB3 "all" Configuration</title>
+					<tgroup cols="2">
+						<colspec colname="c1" colnum="1" colwidth="4*"></colspec>
+						<colspec colname="c2" colnum="2" colwidth="4*"></colspec>
+						<thead>
+							<row>
+								<entry>
+									File
+								</entry>
+								<entry>
+									Description
+								</entry>
+							</row>
+						</thead>
+						<tbody>
+							<row>
+								<entry>
+									<literal>ejb3-clustered-sfsbcache-service.xml</literal>
+								</entry>
+								<entry>
+									This provides replication and failover for EJB3 stateful session beans.
+								</entry>
+							</row>
+							<row>
+								<entry>
+									<literal>ejb3-entity-cache-service.xml</literal>
+								</entry>
+								<entry>
+									This provides a clustered cache for EJB3 entity beans.
+								</entry>
+							</row>
+						</tbody>
+					</tgroup>
+				</table>
+			</para>
+		</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations-Adding_Your_Own_Configuration">
+		<title>Adding Your Own Configuration</title>
+		<para>
+			You can add your own configurations too. The best way to do this is to copy an existing one that is closest to your needs and modify the contents. For example, if you weren’t interested in using messaging, you could copy the <literal>production</literal> directory, renaming it as <literal>myconfig</literal>, remove the <literal>jms</literal> subdirectory and then start JBoss with the new configuration.
+		</para>
+<programlisting>
+run -c <emphasis role="bold">myconfig</emphasis>
+</programlisting>
+	</section>
+</section>
\ No newline at end of file

Added: projects/docs/trunk/Getting_Started/en-US/Software_Versions.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Software_Versions.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Software_Versions.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,26 @@
+<?xml version='1.0'?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<section id="Software_Versions">
+	<title>Software Versions</title>
+	<para>
+		<table>
+			<title>Software Versions</title>
+			<tgroup cols="2">
+				<colspec colwidth="25*"/>
+				<colspec colwidth="75*"/>
+				<thead>
+					<row><entry>Software</entry>
+						<entry>Description</entry></row>
+				</thead>
+				<tbody>
+					<row>
+						<entry><para>JBoss Application Server</para></entry>
+						<entry><para>4.2.2</para></entry>
+					</row>
+				</tbody>
+			</tgroup>
+		</table>
+	</para>
+</section>
\ No newline at end of file

Added: projects/docs/trunk/Getting_Started/en-US/Start_Stop_Server.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Start_Stop_Server.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Start_Stop_Server.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,155 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<!--<chapter id="Starting_and_Stopping_the_Server">-->
+<section id="Starting_and_Stopping_the_Server">
+	<title>Starting and Stopping the Server</title>
+	<section id="Starting_and_Stopping_the_Server-Start_the_Server">
+		<title>Start the Server</title>
+		<para>
+			Move to <filename class="directory">JBOSS_DIST/jboss-as/bin</filename> directory and execute the <literal>run.bat</literal> (for Windows) or <literal>run.sh</literal> (for Linux) script, as appropriate for your operating system. Your output should look like the following (accounting for installation directory differences) and contain no error or exception messages:
+		</para>
+<programlisting>[jwulf at thinkpad bin]$ ./run.sh 
+=========================================================================
+
+  JBoss Bootstrap Environment
+
+  JBOSS_HOME: /home/jwulf/jboss-eap-4.2/jboss-as
+
+  JAVA: java
+
+  JAVA_OPTS: -Dprogram.name=run.sh -server -Xms1503m -Xmx1503m -Dsun.rmi.dgc.client.
+gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
+
+  CLASSPATH: /home/jwulf/jboss-eap-4.2/jboss-as/bin/run.jar
+
+=========================================================================
+
+13:11:46,215 INFO  [Server] Starting JBoss (MX MicroKernel)...
+13:11:46,217 INFO  [Server] Release ID: JBoss [EAP] 4.2.0.GA (build: 
+SVNTag=JBoss_4_2_0_GA date=200706111042)
+13:11:46,218 INFO  [Server] Home Dir: /home/jwulf/jboss-eap-4.2/jboss-as
+13:11:46,219 INFO  [Server] Home URL: file:/home/jwulf/jboss-eap-4.2/jboss-as/
+13:11:46,220 INFO  [Server] Patch URL: null
+13:11:46,225 INFO  [Server] Server Name: production
+13:11:46,225 INFO  [Server] Server Home Dir: 
+/home/jwulf/jboss-eap-4.2/jboss-as/server/production
+13:11:46,225 INFO  [Server] Server Home URL: 
+file:/home/jwulf/jboss-eap-4.2/jboss-as/server/production/
+13:11:46,225 INFO  [Server] Server Log Dir: 
+/home/jwulf/jboss-eap-4.2/jboss-as/server/production/log
+13:11:46,226 INFO  [Server] Server Temp Dir: 
+/home/jwulf/jboss-eap-4.2/jboss-as/server/production/tmp
+13:11:46,226 INFO  [Server] Root Deployment Filename: jboss-service.xml
+13:11:47,071 INFO  [ServerInfo] Java version: 1.5.0_11,Sun Microsystems Inc.
+13:11:47,071 INFO  [ServerInfo] Java VM: 
+Java HotSpot(TM) Server VM 1.5.0_11-b03,Sun Microsystems Inc.
+13:11:47,072 INFO  [ServerInfo] OS-System: Linux 2.6.21-1.3228.rhel5,i386
+13:11:48,558 INFO  [Server] Core system initialized
+13:11:56,934 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
+13:11:56,940 INFO  [Log4jService$URLWatchTimerTask] 
+Configuring from URL: resource:jboss-log4j.xml</programlisting>
+		<note>
+			<para>
+				Note that there is no "Server Started" message shown at the console when the server is started using the <literal>production</literal> profile, which is the default profile used when no other is specified. This message may be observed in the <filename>server.log</filename> file located in the <filename class="directory">server/production/log</filename> subdirectory.
+			</para>
+		</note>
+	</section>
+	
+	<section id="Starting_and_Stopping_the_Server-Start_the_Server_With_Alternate_Configuration">
+		<title>Start the Server With Alternate Configuration</title>
+		<para>
+			Using <literal>run.sh</literal> without any arguments starts the server using the <literal>production</literal> server configuration file set. To start with an alternate configuration file set, pass the name of the server configuration file set [same as the name of the server configuration directory under <literal>JBOSS_DIST/jboss-as/server</literal>] that you want to use, as the value to the <literal>-c</literal> command line option. For example, to start with the <literal>minimal</literal> configuration file set you should specify:
+		</para>
+<programlisting>[bin]$ ./run.sh -c minimal
+...
+...
+...
+15:05:40,301 INFO  [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200706111042)] Started in 5s:75ms
+</programlisting>
+	</section>
+	
+	<section id="Starting_and_Stopping_the_Server-Using_run.sh">
+		<title>Using run.sh</title>
+		<para>
+			The <literal>run</literal> script supports the following options:
+		</para>
+<programlisting>
+usage: run.sh [options]
+-h, --help                          Show help message
+-V, --version                       Show version information
+--                                  Stop processing options
+-D&lt;name&gt;[=&lt;value&gt;]      Set a system property
+-d, --bootdir=&lt;dir&gt;           Set the boot patch directory; Must be absolute or url
+-p, --patchdir=&lt;dir&gt;          Set the patch directory; Must be absolute or url
+-n, --netboot=&lt;url&gt;           Boot from net with the given url as base
+-c, --configuration=&lt;name&gt;    Set the server configuration name
+-B, --bootlib=&lt;filename&gt;      Add an extra library to the front bootclasspath
+-L, --library=&lt;filename&gt;      Add an extra library to the loaders classpath
+-C, --classpath=&lt;url&gt;         Add an extra url to the loaders classpath
+-P, --properties=&lt;url&gt;        Load system properties from the given url
+-b, --host=&lt;host or ip&gt;       Bind address for all JBoss services
+-g, --partition=&lt;name&gt;        HA Partition name (default=DefaultDomain)
+-u, --udp=&lt;ip&gt;                UDP multicast address
+-l, --log=&lt;log4j|jdk&gt;         Specify the logger plugin type
+</programlisting>
+	</section>
+	
+	<section id="Starting_and_Stopping_the_Server-Stopping_the_Server">
+		<title>Stopping the Server</title>
+		<para>
+			To shutdown the server, you simply issue a Ctrl-C sequence in the console in which JBoss was started. Alternatively, you can use the <literal>shutdown.sh</literal> command.
+		</para>
+<programlisting>[bin]$ ./shutdown.sh -S</programlisting>
+		<para>
+			The <literal>shutdown</literal> script supports the following options:
+		</para>
+<programlisting>A JMX client to shutdown (exit or halt) a remote JBoss server.
+
+usage: shutdown [options] &lt;operation&gt;
+
+options:
+-h, --help                Show this help message (default)
+-D&lt;name&gt;[=&lt;value&gt;]        Set a system property
+--                        Stop processing options
+-s, --server=&lt;url&gt;        Specify the JNDI URL of the remote server
+-n, --serverName=&lt;url&gt;    Specify the JMX name of the ServerImpl
+-a, --adapter=&lt;name&gt;      Specify JNDI name of the MBeanServerConnection to use
+-u, --user=&lt;name&gt;         Specify the username for authentication
+-p, --password=&lt;name&gt;     Specify the password for authentication
+
+operations:
+-S, --shutdown            Shutdown the server
+-e, --exit=&lt;code&gt;         Force the VM to exit with a status code
+-H, --halt=&lt;code&gt;         Force the VM to halt with a status code
+</programlisting>
+		<para>
+			Using the shutdown command requires a server configuration that contains the <literal>jmx-invoker-service.xml</literal> service. Hence you cannot use the shutdown command with the <literal>minimal</literal> configuration.
+		</para>
+	</section>
+	
+	<section id="Starting_and_Stopping_the_Server-Running_as_a_Service_under_Microsoft_Windows">
+		<title> Running as a Service under Microsoft Windows </title>
+		<para>
+			You can configure the server to run as a service under Microsoft Windows, and configure it to start automatically if desired.
+		</para>
+		<para>
+			Download the <literal>JavaService</literal> package from <ulink url="http://forge.objectweb.org/projects/javaservice/">http://forge.objectweb.org/projects/javaservice/</ulink>.
+		</para>
+		<para>
+			Unzip the package and use the <literal>JBossInstall.bat</literal> file to install the JBoss service. You must set the <literal>JAVA_HOME</literal> and <literal>JBOSS_HOME</literal> environment variables to point to the <literal>jdk</literal> and <literal>jboss-as</literal> directories before running <literal>JBossInstall.bat</literal>. Run <literal>JBossInstall.bat</literal> with the following syntax:
+		</para>
+<screen>JBossInstall.bat <replaceable>&lt;depends&gt;</replaceable> [-auto | -manual]</screen>
+		<para>
+			Where <replaceable>&lt;depends&gt;</replaceable> is the name of any service that the JBoss AS server depends on, such as the <literal>mysql</literal> database service.
+		</para>
+		<para>
+			Once the service is installed the server can be started by using the command <literal>net start JBoss</literal>, and stopped with the command <literal>net stop JBoss</literal>.
+		</para>
+		<para>
+			Please refer to the documentation included in the <literal>JavaService</literal> package for further information.
+		</para>
+	</section>
+</section>
+

Added: projects/docs/trunk/Getting_Started/en-US/The_JBoss_Server___A_Quick_Tour.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/The_JBoss_Server___A_Quick_Tour.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/The_JBoss_Server___A_Quick_Tour.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,242 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="The_JBoss_Server___A_Quick_Tour">
+	<title>The JBoss Server - A Quick Tour</title>
+	<para>
+		Let's explore the &JBEAP; directory structure and help you understand how the installation is laid out and what goes where. It’s worth familiarizing yourself with the layout, locations of the key configuration files, log files, deployment and so on. It will help you understand the JBoss service architecture so that you’ll be able to find your way around when it comes to deploying your own applications.
+	</para>
+
+<!-- Embedded sections -->
+	<xi:include href="Directory_Structure.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Server_Configurations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Start_Stop_Server.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<!-- end embedded sections -->
+
+	<section id="The_JBoss_Server___A_Quick_Tour-The_JMX_Console">
+		<title>The JMX Console</title>
+		<para>
+			When the JBoss Server is running, you can get a live view of the server by going to the JMX console application at <ulink url="http://localhost:8080/jmx-console"></ulink>. You should see something similar to <xref linkend="The_JMX_Console-View_of_the_JMX_Management_Console_Web_Application" />. 
+		</para>
+		<para>
+			The JMX Console is the JBoss Management Console which provides a raw view of the JMX MBeans which make up the server. They can provide a lot of information about the running server and allow you to modify its configuration, start and stop components and so on.
+		</para>
+		<para>
+			For example, find the <literal>service=JNDIView</literal> link and click on it. This particular MBean provides a service to allow you to view the structure of the JNDI namespaces within the server. Now find the operation called <literal>list</literal> near the bottom of the MBean view page and click the <literal>invoke</literal> button. The operation returns a view of the current names bound into the JNDI tree, which is very useful when you start deploying your own applications and want to know why you can’t resolve a particular EJB name.
+		</para>
+		<figure id="The_JMX_Console-View_of_the_JMX_Management_Console_Web_Application">
+			<title>View of the JMX Management Console Web Application</title>
+			<mediaobject>
+				<imageobject>
+					<imagedata align="center" fileref="images/jmx-console.png" />
+				</imageobject>
+			</mediaobject>
+		</figure>
+		<para>
+			Look at some of the other MBeans and their listed operations; try changing some of the configuration attributes and see what happens. With a very few exceptions, none of the changes made through the console are persistent. The original configuration will be reloaded when you restart JBoss, so you can experiment freely without doing any permanent damage.
+		</para>
+		<note>
+			<para>
+				If you installed JBoss using the graphical installer, the JMX Console will prompt you for a username and password before you can access it. If you installed using other modes, you can still configure JMX Security manually. We will show you how to secure your console in <xref linkend="Basic_Configuration_Issues-Security_Service"/>.
+			</para>
+		</note>
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Hot-deployment_of_services_in_JBoss">
+		<title>Hot-deployment of services in JBoss</title>
+		<para>
+			Hot-deployable services are those which can be added to or removed from the running server. These are placed in the <literal>JBOSS_DIST/jboss-as/server/&lt;instance-name&gt;/deploy</literal> directory. Let’s have a look at a practical example of hot-deployment of services in JBoss before we go on to look at server configuration issues in more detail.
+		</para>
+		<para>
+			Start JBoss if it isn’t already running and take a look at the <literal>server/production/deploy</literal> directory. Remove the <literal>mail-service.xml</literal> file and watch the output from the server:
+<programlisting>13:10:05,235 INFO  [MailService] Mail service &#39;java:/Mail&#39; removed from JNDI</programlisting>
+		</para>
+		<para>
+			Then replace the file and watch JBoss re-install the service: <programlisting>13:58:54,331 INFO  [MailService] Mail Service bound to java:/Mail</programlisting>
+			 This is hot-deployment in action.
+		</para>
+	</section>
+	<section id="The_JBoss_Server___A_Quick_Tour-Basic_Configuration_Issues">
+		<title>Basic Configuration Issues</title>
+		<para>
+			Now that we have examined the JBoss server, we will take a look at some of the main configuration files and what they are used for. All paths are relative to the server configuration directory (<filename class="directory">server/production</filename>, for example).
+		</para>
+		<section id="Basic_Configuration_Issues-Core_Services">
+			<title>Core Services</title>
+			<para>
+				The core services specified in the <filename>conf/jboss-service.xml</filename> file are started first when the server starts up. If you have a look at this file in an editor you will see MBeans for various services including logging, security, JNDI, JNDIView etc. Try commenting out the entry for the <literal>JNDIView</literal> service.
+			</para>
+			<para>
+				Note that because the mbeans definition had nested comments, we had to comment out the mbean in two sections, leaving the original comment as it was.
+			</para>
+<programlisting>
+&lt;!-- Section 1 commented out
+&lt;mbean code="org.jboss.naming.JNDIView"
+    name="jboss:service=JNDIView"
+    xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml"&gt;
+--&gt;
+    &lt;!-- The HANamingService service name --&gt;
+&lt;!-- Section two commented out
+    &lt;attribute name="HANamingService"&gt;jboss:service=HAJNDI&lt;/attribute&gt;&lt;/mbean&gt;
+--&gt;
+                
+</programlisting>
+			<para>
+				If you then restart JBoss, you will see that the <literal>JNDIView</literal> service no longer appears in the JMX Management Console (JMX Console) listing. In practice, you should rarely, if ever, need to modify this file, though there is nothing to stop you adding extra MBean entries in here if you want to. The alternative is to use a separate file in the <filename class="directory">deploy</filename> directory, which allows your service to be hot deployable.
+			</para>
+		</section>
+		
+		<section id="Basic_Configuration_Issues-Logging_Service">
+			<title>Logging Service</title>
+			<para>
+				In JBoss <literal>log4j</literal> is used for logging. If you are not familiar with the <literal>log4j</literal> package and would like to use it in your applications, you can read more about it at the Jakarta web site (<ulink url="http://jakarta.apache.org/log4j/"></ulink>).
+			</para>
+			<para>
+				Logging is controlled from a central <filename>conf/log4j.xml</filename> file. This file defines a set of appenders specifying the log files, what categories of messages should go there, the message format and the level of filtering. By default, JBoss produces output to both the console and a log file (<filename>server.log</filename> in the <filename class="directory">log</filename> directory).
+			</para>
+			<para>
+				There are 5 basic log levels used: <literal>DEBUG</literal>, <literal>INFO</literal>, <literal>WARN</literal>, <literal>ERROR</literal> and <literal>FATAL</literal>. The logging threshold on the console is <literal>INFO</literal>, which means that you will see informational messages, warning messages and error messages on the console but not general debug messages. In contrast, there is no threshold set for the <filename>server.log</filename> file, so all generated logging messages will be logged there.
+			</para>
+			<para>
+				If things are going wrong and there doesn’t seem to be any useful information in the console, always check the <filename>server.log</filename> file to see if there are any debug messages which might help you to track down the problem. However, be aware that just because the logging threshold allows debug messages to be displayed, that doesn&#39;t mean that all of JBoss will produce detailed debug information for the log file. You will also have to boost the logging limits set for individual categories. Take the following category for example.
+			</para>
+<programlisting>&lt;!-- Limit JBoss categories to INFO --&gt; 
+&lt;category name="org.jboss"&gt; 
+    &lt;priority value="<emphasis role="bold">INFO</emphasis>"/&gt; 
+&lt;/category&gt;    
+</programlisting>
+			<para>
+				This limits the level of logging to <literal>INFO</literal> for all JBoss classes, apart from those which have more specific overrides provided. If you were to change this to <literal>DEBUG</literal>, it would produce much more detailed logging output.
+			</para>
+			<para>
+				As another example, let’s say you wanted to set the output from the container-managed persistence engine to <literal>DEBUG</literal> level and to redirect it to a separate file, <filename>cmp.log</filename>, in order to analyze the generated SQL commands. You would add the following code to the <filename>log4j.xml</filename> file:
+			</para>
+<programlisting>&lt;appender name="CMP" class="org.jboss.logging.appender.RollingFileAppender"&gt; 
+    &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt; 
+    &lt;param name="File" value="${jboss.server.home.dir}/log/cmp.log"/&gt; 
+    &lt;param name="Append" value="false"/&gt; 
+    &lt;param name="MaxFileSize" value="500KB"/&gt; 
+    &lt;param name="MaxBackupIndex" value="1"/&gt; 
+ 
+    &lt;layout class="org.apache.log4j.PatternLayout"&gt; 
+        &lt;param name="ConversionPattern" value="%d %-5p [%c] %m%n"/&gt; 
+    &lt;/layout&gt; 
+&lt;/appender&gt; 
+ 
+&lt;category name="org.jboss.ejb.plugins.cmp"&gt; 
+    &lt;priority value="DEBUG" /&gt; 
+    &lt;appender-ref ref="CMP"/&gt; 
+&lt;/category&gt; 
+</programlisting>
+			<para>
+				This creates a new file appender and specifies that it should be used by the logger (or category) for the package <literal>org.jboss.ejb.plugins.cmp</literal>.
+			</para>
+			<para>
+				The file appender is set up to produce a new log file every day rather than producing a new one every time you restart the server or writing to a single file indefinitely. The current log file is <filename>cmp.log</filename>. Older files have the date they were written added to the name. You will notice that the <filename class="directory">log</filename> directory also contains HTTP request logs which are produced by the web container.
+			</para>
+		</section>
+		
+		<section id="Basic_Configuration_Issues-Security_Service">
+			<title>Security Service</title>
+			<para>
+				The security domain information is stored in the file <filename>login-config.xml</filename> as a list of named security domains, each of which specifies a number of JAAS <footnote><para>
+					The Java Authentication and Authorization Service. JBoss uses JAAS to provide pluggable authentication modules. You can use the ones that are provided or write your own if you have more specific requirements.
+				</para>
+				</footnote> login modules which are used for authentication purposes in that domain. When you want to use security in an application, you specify the name of the domain you want to use in the application’s JBoss-specific deployment descriptors, <filename>jboss.xml</filename> and/or <filename>jboss-web.xml</filename>. We will quickly look at how to do this to secure the JMX Console application.
+			</para>
+			<para>
+				Almost every aspect of the JBoss server can be controlled through the JMX Console, so it is important to make sure that, at the very least, the application is password protected. Otherwise, any remote user could completely control your server. To protect it, we will add a security domain to cover the application. <footnote><para>
+					If you installed JBoss using the Graphical Installer and set the JMX Security up, then you will not have to uncomment the sections, because they are already uncommented. Additionally, the admin password will be set up to whatever you had specified.
+				</para>
+				</footnote> This can be done in the <filename>jboss-web.xml</filename> file for the JMX Console, which can be found in <filename class="directory">deploy/jmx-console.war/WEB-INF/</filename> directory. Uncomment the <literal>security-domain</literal> in that file, as shown below.
+			</para>
+			<para>
+<programlisting>&lt;jboss-web&gt;
+    &lt;security-domain&gt;java:/jaas/jmx-console&lt;/security-domain&gt;
+&lt;/jboss-web&gt;
+</programlisting>
+			</para>
+			<para>
+				This links the security domain to the web application, but it doesn&#39;t tell the web application what security policy to enforce, what URLs are we trying to protect, and who is allowed to access them. To configure this, go to the <filename>web.xml</filename> file in the same directory and uncomment the <literal>security-constraint</literal> that is already there. This security constraint will require a valid user name and password for a user in the <literal>JBossAdmin</literal> group.
+			</para>
+<programlisting>&lt;!-- 
+   A security constraint that restricts access to the HTML JMX console
+   to users with the role JBossAdmin. Edit the roles to what you want and
+   uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
+   secured access to the HTML JMX console.
+--&gt;
+&lt;security-constraint&gt;
+    &lt;web-resource-collection&gt;
+        &lt;web-resource-name&gt;HtmlAdaptor&lt;/web-resource-name&gt;
+        &lt;description&gt;
+            An example security config that only allows users with the
+            role JBossAdmin to access the HTML JMX console web application
+        &lt;/description&gt;
+        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
+        &lt;http-method&gt;GET&lt;/http-method&gt;
+        &lt;http-method&gt;POST&lt;/http-method&gt;
+    &lt;/web-resource-collection&gt;
+    &lt;auth-constraint&gt;
+        &lt;role-name&gt;JBossAdmin&lt;/role-name&gt;
+    &lt;/auth-constraint&gt;
+&lt;/security-constraint&gt;
+</programlisting>
+			<para>
+				That&#39;s great, but where do the user names and passwords come from? They come from the <literal>jmx-console</literal> security domain we linked the application to. We have provided the configuration for this in the <filename>conf/login-config.xml</filename>.
+			</para>
+			<para>
+<programlisting>&lt;application-policy name="jmx-console"&gt;
+    &lt;authentication&gt;
+        &lt;login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+                     flag="required"&gt;
+            &lt;module-option name="usersProperties"&gt;
+                props/jmx-console-users.properties
+            &lt;/module-option&gt;
+            &lt;module-option name="rolesProperties"&gt;
+                props/jmx-console-roles.properties
+            &lt;/module-option&gt;
+        &lt;/login-module&gt;
+    &lt;/authentication&gt; 
+&lt;/application-policy&gt;
+</programlisting>
+			</para>
+			<para>
+				This configuration uses a simple file based security policy. The configuration files are found in the <filename class="directory">conf/props</filename> directory of your server configuration. The usernames and passwords are stored in the <literal>conf/props/jmx-console-users.properties</literal> file and take the form "<literal>username=password</literal>". To assign a user to the <literal>JBossAdmin</literal> group add "<literal>username=JBossAdmin</literal>" to the <literal>jmx-console-roles.properties</literal> file. The existing file creates an <literal>admin</literal> user with the password <literal>admin</literal>. For security, please either remove the user or change the password to a stronger one.
+			</para>
+			<para>
+				JBoss will re-deploy the JMX Console whenever you update its <filename>web.xml</filename>. You can check the server console to verify that JBoss has seen your changes. If you have configured everything correctly and re-deployed the application, the next time you try to access the JMX Console, it will ask you for a name and password. <footnote><para>
+					Since the username and password are session variables in the web browser you may need to shut down your browser and come back in to see the login dialog come back up.
+				</para>
+				</footnote>
+			</para>
+			<para>
+				The JMX Console isn&#39;t the only web based management interface to JBoss. There is also the Web Console. Although it&#39;s a Java applet, the corresponding web application can be secured in the same way as the JMX Console. The Web Console is in the file <filename>deploy/management/web-console.war</filename>. The only difference is that the Web Console is provided as a simple WAR file instead of using the exploded directory structure that the JMX Console did. The only real difference between the two is that editing the files inside the WAR file is a bit more cumbersome.
+			</para>
+		</section>
+		
+		<section id="Basic_Configuration_Issues-Additional_Services">
+			<title>Additional Services</title>
+			<para>
+				The non-core, hot-deployable services are added to the <filename class="directory">deploy</filename> directory. They can be either XML descriptor files, <filename>*-service.xml</filename>, or JBoss Service Archive (SAR) files. SARs contain both the XML descriptor and additional resources the service requires (e.g. classes, library JAR files or other archives), all packaged up into a single archive.
+			</para>
+			<para>
+				Detailed information on all these services can be found in the <emphasis>JBoss Enterprise Application Platform: Server Configuration Guide</emphasis>, which also provides comprehensive information on server internals and the implementation of services such as JTA and the J2EE Connector Architecture (JCA).
+			</para>
+		</section>
+
+	</section>
+	
+	<section id="The_JBoss_Server___A_Quick_Tour-The_Web_Container___Tomcat">
+		<title>The Web Container - Tomcat</title>
+		<para>
+			JBoss Enterprise Application Platform comes with Tomcat as the default web container. The embedded Tomcat service is found in the <filename class="directory">deploy/jboss-web.deployer</filename> directory. All the necessary jar files needed by Tomcat can be found in there, as well as a <filename>web.xml</filename> file which provides a default configuration set for web applications.
+		</para>
+		<para>
+			If you are already familiar with configuring Tomcat, have a look at the <filename>server.xml</filename>, which contains a subset of the standard Tomcat format configuration information. As it stands, this includes setting up the HTTP connector on the default port 8080, an AJP connector on port 8009 (can be used if you want to connect via a web server such as Apache) and an example of how to configure an SSL connector (commented out by default).
+		</para>
+		<para>
+			You shouldn’t need to modify any of this other than for advanced use. If you’ve used Tomcat before as a stand-alone server you should be aware that things are a bit different when using the embedded service. JBoss is in charge and you shouldn’t need to access the Tomcat directory at all. Web applications are deployed by putting them in the JBoss <filename class="directory">deploy</filename> directory and logging output from Tomcat can be found in the JBoss <filename class="directory">log</filename> directory.
+		</para>
+	</section>
+</chapter>
+

Added: projects/docs/trunk/Getting_Started/en-US/Using_Other_Databases.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Using_Other_Databases.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Using_Other_Databases.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,246 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="Using_other_Databases">
+	<title>Using other Databases</title>
+	<para>
+		In the previous chapters, we’ve just been using the JBoss default datasource in our applications. This is provided by the embedded HSQL database instance and is bound to the JNDI name <literal>java:/DefaultDS</literal>. Having a database included with JBoss is very convenient for running examples and HSQL is adequate for many purposes. However, at some stage you will want to use another database, either to replace the default datasource or to access multiple databases from within the server.
+	</para>
+	<section id="Using_other_Databases-DataSource_Configuration_Files">
+		<title>DataSource Configuration Files</title>
+		<para>
+			DataSource configuration file names end with the suffix <literal>-ds.xml</literal> so that they will be recognized correctly by the JCA deployer. The <literal>docs/example/jca </literal> directory contains sample files for a wide selection of databases and it is a good idea to use one of these as a starting point. For a full description of the configuration format the best place to look is the DTD file <literal>docs/dtd/jboss-ds_1_5.dtd</literal>. Additional documentation on the files and the JBoss JCA implementation can also be found in the <emphasis>JBoss 4 Application Server Guide</emphasis>.
+		</para>
+		<para>
+			Local transaction datasources are configured using the <literal>local-tx-datasource</literal> element and XA-compliant ones using <literal>xa-tx-datasource</literal>. The example file <literal>generic-ds.xml</literal> shows how to use both types and also some of the other elements that are available for things like connection pool configuration. Examples of both local and XA configurations are available for Oracle, DB2 and Informix.
+		</para>
+		<para>
+			If you look at the example files <literal> firebird-ds.xml</literal>, <literal> facets-ds.xml</literal> and <literal>sap3-ds.xml</literal>, you’ll notice that they have a completely different format, with the root element being <literal>connection-factories</literal> rather than <literal>datasources</literal>. These use an alternative, more generic JCA configuration syntax used with a pre-packaged JCA resource adapter. The syntax is not specific to datasource configuration and is used, for example, in the <literal>jms-ds.xml</literal> file to configure the JMS resource adapter.
+		</para>
+		<para>
+			Next, we’ll work through some step-by-step examples to illustrate what’s involved setting up a datasource for a specific database.
+		</para>
+	</section>
+	
+	<section id="Using_other_Databases-Using_MySQL_as_the_Default_DataSource">
+		<title>Using MySQL as the Default DataSource</title>
+		<para>
+			MySQL is a one of the most popular open source databases around and is used by many prominent organizations from Yahoo to NASA. The official JDBC driver for it is called <emphasis>Connector/J</emphasis>. For this example we’ve used MySQL 4.1.7 and Connector/J 3.0.15. You can download them both from <ulink url="http://www.mysql.com"></ulink> .
+		</para>
+		<section id="Using_MySQL_as_the_Default_DataSource-Creating_a_Database_and_User">
+			<title>Creating a Database and User</title>
+			<para>
+				We’ll assume that you’ve already installed MySQL and that you have it running and are familiar with the basics. Run the <literal>mysql</literal> client program from the command line so we can execute some administration commands. You should make sure that you are connected as a user with sufficient privileges (e.g. by specifying the <literal>-u root</literal> option to run as the MySQL root user).
+			</para>
+			<para>
+				First create a database called <literal>jboss</literal> within MySQL for use by JBoss.
+			</para>
+<programlisting>mysql&gt; CREATE DATABASE jboss; 
+Query OK, 1 row affected (0.05 sec) 
+</programlisting>
+			<para>
+				Then check that it has been created.
+			</para>
+<programlisting>mysql&gt; SHOW DATABASES; 
++----------+ 
+| Database | 
++----------+ 
+| jboss    | 
+| mysql    | 
+| test     | 
++----------+ 
+3 rows in set (0.00 sec) 
+</programlisting>
+			<para>
+				Next, create a user called <literal>jboss</literal> with password <literal>password</literal> to access the database.
+			</para>
+<programlisting>mysql&gt; GRANT ALL PRIVILEGES ON jboss.* TO jboss at localhost IDENTIFIED BY &#39;password&#39;; 
+Query OK, 0 rows affected (0.06 sec) 
+</programlisting>
+			<para>
+				Again, you can check that everything has gone smoothly.
+			</para>
+<programlisting>mysql&gt; select User,Host,Password from mysql.User; 
++-------+-----------+------------------+ 
+| User  | Host      | Password         | 
++-------+-----------+------------------+ 
+| root  | localhost |                  |
+| root  | %         |                  | 
+|       | localhost |                  | 
+|       | %         |                  | 
+| jboss | localhost | 5d2e19393cc5ef67 | 
++-------+-----------+------------------+ 
+5 rows in set (0.02 sec) 
+</programlisting>
+		</section>
+		
+		<section id="Using_MySQL_as_the_Default_DataSource-Installing_the_JDBC_Driver_and_Deploying_the_DataSource">
+			<title>Installing the JDBC Driver and Deploying the DataSource</title>
+			<para>
+				To make the JDBC driver classes available to JBoss, copy the file <literal>mysql-connector-java-3.0.15-ga-bin.jar</literal> from the Connector/J distribution to the <literal>lib</literal> directory in the <literal>default</literal> server configuration (assuming that is the configuration you’re running, of course). Then create a file in the <literal>deploy</literal> directory called <literal>mysql-ds.xml</literal> with the following datasource configuration. The database user name and password corresponds the MySql user we created in the previous section.
+			</para>
+<programlisting>&lt;datasources&gt; 
+    &lt;local-tx-datasource&gt; 
+        &lt;jndi-name&gt;MySqlDS&lt;/jndi-name&gt; 
+        &lt;connection-url&gt;jdbc:mysql://localhost:3306/jboss&lt;/connection-url&gt; 
+        &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt; 
+        &lt;user-name&gt;jboss&lt;/user-name&gt; 
+        &lt;password&gt;password&lt;/password&gt; 
+    &lt;/local-tx-datasource&gt; 
+&lt;/datasources&gt; 
+</programlisting>
+			<para>
+				Because we have added a new JAR file to the <literal>lib</literal> directory, you will need to make sure that the server is able to find the MySQL driver classes.
+			</para>
+		</section>
+		
+		<section id="Using_MySQL_as_the_Default_DataSource-Testing_the_MySQL_DataSource">
+			<title>Testing the MySQL DataSource</title>
+			<para>
+				We’ll use the CMP roster application to test the new database connection. In order to use MySql in our application, we&#39;ll need to set the datasource name a nd type-mapping in the <literal>jbosscmp-jdbc.xml</literal> file in the <literal>dd/team</literal> directory of the CMP roster application. Edit the file and add the following <literal>datasource</literal> and <literal>datasource-mapping</literal> elements to the <literal>defaults</literal> element.
+			</para>
+<programlisting>&lt;jbosscmp-jdbc&gt;
+    &lt;defaults&gt;
+        &lt;datasource&gt;java:/MySqlDS&lt;/datasource&gt;
+        &lt;datasource-mapping&gt;mySQL&lt;/datasource-mapping&gt;
+    &lt;/defaults&gt;
+
+    &lt;enterprise-beans&gt;
+...
+    &lt;/enterprise-beans&gt;
+&lt;/jbosscmp-jdbc&gt;
+</programlisting>
+			<para>
+				After restarting JBoss, you should be able to deploy the application and see the tables being created. . The tables should be visible from the MySQL client.
+			</para>
+<programlisting>mysql&gt; show tables; 
++-----------------------------------+
+| Tables_in_jboss                   |
++-----------------------------------+
+| LeagueBean                        |
+| PlayerBean                        |
+| PlayerBean_teams_TeamBean_players |
+| TeamBean                          |
++-----------------------------------+
+4 rows in set (0.00 sec) 
+</programlisting>
+			<para>
+				You can see the JMS persistence tables in there too since we’re using MySQL as the default datasource.
+			</para>
+		</section>
+
+	</section>
+	
+	<section id="Using_other_Databases-Setting_up_an_XADataSource_with_Oracle_9i">
+		<title>Setting up an XADataSource with Oracle 9i</title>
+		<para>
+			Oracle is one of the main players in the commercial database field and most readers will probably have come across it at some point. You can download it freely for non-commercial purposes from <ulink url="http://www.oracle.com"></ulink>
+		</para>
+		<para>
+			Installing and configuring Oracle is not for the faint of heart. It isn’t really just a simple database, but it is heavy on extra features and technologies which you may not actually want (another Apache web server, multiple JDKs, Orbs etc.) but which are usually installed anyway. So we’ll assume you already have an Oracle installation available. For this example, we’ve used Oracle 10g.
+		</para>
+		<section id="Setting_up_an_XADataSource_with_Oracle_9i-Padding_Xid_Values_for_Oracle_Compatibility">
+			<title>Padding Xid Values for Oracle Compatibility</title>
+			<para>
+				If you look in the <literal>jboss-service.xml</literal> file in the <literal> default/conf</literal> directory, you’ll find the following service MBean.
+			</para>
+<programlisting>&lt;!-- The configurable Xid factory. For use with Oracle, set pad to true --&gt; 
+&lt;mbean code="org.jboss.tm.XidFactory" 
+       name="jboss:service=XidFactory"&gt; 
+    &lt;!--attribute name="Pad"&gt;true&lt;/attribute--&gt; 
+&lt;/mbean&gt; 
+</programlisting>
+			<para>
+				The transaction service uses this to create XA transactions identifiers. The comment explains the situation: for use with Oracle you have to include the line which sets the attribute <literal>Pad</literal> to true. This activates padding the identifiers out to their maximum length of 64 bytes. Remember that you’ll have to restart JBoss for this change to be put into effect, but wait until you’ve installed the JDBC driver classes which we’ll talk about next.
+			</para>
+		</section>
+		
+		<section id="Setting_up_an_XADataSource_with_Oracle_9i-Installing_the_JDBC_Driver_and_Deploying_the_DataSource">
+			<title>Installing the JDBC Driver and Deploying the DataSource</title>
+			<para>
+				The Oracle JDBC drivers can be found in the directory <literal>$ORACLE_HOME/jdbc/lib</literal>. Older versions, which may be more familiar to some users, had rather uninformative names like <literal>classes12.zip</literal> but at the time of writing the latest driver version can be found in the file <literal>ojdbc14.jar</literal>. There is also a debug version of the classes with <literal>_g</literal> appended to the name which may be useful if you run into problems. Again, you should copy one of these to the <literal>lib</literal> directory of the JBoss <literal>default</literal> configuration. The basic driver class you would use for the non-XA setup is called <literal>oracle.jdbc.driver.OracleDriver</literal>. The <literal>XADataSource</literal> class, which we’ll use here, is called <literal>oracle.jdbc.xa.client.OracleXADataSource</literal>.
+			</para>
+			<para>
+				For the configuration file, make a copy of the <literal>oracle-xa-ds.xml</literal> example file and edit it to set the correct URL, username and password.
+			</para>
+<programlisting>&lt;datasources&gt; 
+    &lt;xa-datasource&gt; 
+        &lt;jndi-name&gt;XAOracleDS&lt;/jndi-name&gt; 
+        &lt;track-connection-by-tx&gt;true&lt;/track-connection-by-tx&gt; 
+        &lt;isSameRM-override-value&gt;false&lt;/isSameRM-override-value&gt; 
+        &lt;xa-datasource-class&gt;oracle.jdbc.xa.client.OracleXADataSource&lt;/xa-datasource-class&gt; 
+        &lt;xa-datasource-property name="URL"&gt;
+            jdbc:oracle:thin:@monkeymachine:1521:jboss 
+        &lt;/xa-datasource-property&gt; 
+        &lt;xa-datasource-property name="User"&gt;jboss&lt;/xa-datasource-property&gt; 
+        &lt;xa-datasource-property name="Password"&gt;password&lt;/xa-datasource-property&gt; 
+        &lt;exception-sorter-class-name&gt;
+            org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter 
+        &lt;/exception-sorter-class-name&gt; 
+        &lt;no-tx-separate-pools/&gt; 
+    &lt;/xa-datasource&gt; 
+                    
+    &lt;mbean code="org.jboss.resource.adapter.jdbc.vender.oracle.OracleXAExceptionFormatter" 
+           name="jboss.jca:service=OracleXAExceptionFormatter"&gt; 
+        &lt;depends optional-attribute-name="TransactionManagerService"&gt;
+            jboss:service=TransactionManager 
+        &lt;/depends&gt; 
+    &lt;/mbean&gt; 
+&lt;/datasources&gt;
+</programlisting>
+			<para>
+				We’ve used the Oracle thin (pure java) driver here and assumed the database is running on the host <literal>monkeymachine</literal> and that the database name (or SID in Oracle terminology) is <literal>jboss</literal>. We’ve also assumed that you’ve created a user <literal>jboss</literal> with all the sufficient privileges. You can just use <literal>dba</literal> privileges for this example.
+			</para>
+<programlisting>SQL&gt; connect / as sysdba 
+Connected. 
+SQL&gt; create user jboss identified by password; 
+User created. 
+SQL&gt; grant dba to jboss; 
+Grant succeeded. 
+</programlisting>
+			<para>
+				Now copy the file to the <literal>deploy</literal> directory. You should get the following output.
+			</para>
+<programlisting>11:33:45,174 INFO  [WrapperDataSourceService] Bound connection factory for resource adapter
+for ConnectionManager &#39;jboss.jca:name=XAOracleDS,service=DataSourceBinding to JNDI name
+&#39;java:XAOracleDS&#39;
+</programlisting>
+			<para>
+				If you use the <literal>JNDIView</literal> service from the JMX console as before, you should see the name <literal>java:/XAOracleDS</literal> listed.
+			</para>
+		</section>
+		
+		<section id="Setting_up_an_XADataSource_with_Oracle_9i-Testing_the_Oracle_DataSource">
+			<title>Testing the Oracle DataSource</title>
+			<para>
+				Again we’ll use the CMP example to test out the new database connection. The <literal>jbosscmp-jdbc.xml</literal> file should contain the following.
+			</para>
+<programlisting>&lt;jbosscmp-jdbc&gt; 
+    &lt;defaults&gt; 
+        &lt;datasource&gt;java:/XAOracleDS&lt;/datasource&gt; 
+        &lt;datasource-mapping&gt;Oracle9i&lt;/datasource-mapping&gt; 
+    &lt;/defaults&gt; 
+&lt;/jbosscmp-jdbc&gt; 
+</programlisting>
+			<para>
+				There are other Oracle type-mappings available too. If you’re using an earlier version, have a look in the <literal>conf/standardjbosscmp-jdbc.xml</literal> file to find the correct name
+			</para>
+			<para>
+				Deploy the application as before, check the output for errors and then check that the tables have been created using Oracle SQLPlus again from the command line.
+			</para>
+<programlisting>SQL&gt; select table_name from user_tables;
+
+TABLE_NAME
+------------------------------
+TEAMBEAN
+LEAGUEBEAN
+PLAYERBEAN
+PLAYERBEAN_TEAMS_TEAM_1OFLZV8
+</programlisting>
+		</section>
+
+	</section>
+
+</chapter>
+

Added: projects/docs/trunk/Getting_Started/en-US/Using_Seam.xml
===================================================================
--- projects/docs/trunk/Getting_Started/en-US/Using_Seam.xml	                        (rev 0)
+++ projects/docs/trunk/Getting_Started/en-US/Using_Seam.xml	2007-10-17 05:35:43 UTC (rev 66208)
@@ -0,0 +1,381 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+
+<chapter id="Using_Seam">
+	<title>Using Seam</title>
+	<para>
+		JBoss Seam is a framework that provides the glue between the new EJB3 and JSF frameworks that are part of the Java EE 5.0 standard. In fact, the name Seam refers to the seamless manner in which it enables developers to use these two frameworks in an integrated manner. Seam automates many of the common tasks, and makes extensive use of annotations to reduce the amount of xml code that needs to be written. The overall effect is to significantly reduce the total amount of coding that needs to be done.
+	</para>
+	
+	<para>
+		We have included two versions of the example application, one coded using EJB3 / JSF without using Seam, and one using Seam, to demonstrate clearly the difference in application development using the Seam framework.
+	</para>
+	
+	<para>
+		
+	</para>
+	
+	<section id="Using_Seam_Data_Model">
+		<title>
+			Data Model
+		</title>
+		
+		<para>
+			In the previous chapter we looked at the Data Model used in the EJB3/JSF implementation of this sample application. Let's start off our examination of the Seam implementation in the same way, by examining how the Data Model is implemented. This is done in the <literal>Todo.java</literal> file.
+		</para>
+		
+		<programlisting>@Entity
+ at Name("todo")
+public class Todo implements Serializable {
+
+  private long id;
+  private String title;
+  private String description;
+
+  public Todo () {
+    title ="";
+    description ="";
+  }
+
+  @Id @GeneratedValue
+  public long getId() { return id;}
+  public void setId(long id) { this.id = id; }
+
+  @NotNull
+  public String getTitle() { return title; }
+  public void setTitle(String title) {this.title = title;}
+
+  @NotNull
+  @Length(max=250) 
+  public String getDescription() { return description; }
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+}</programlisting>
+	
+	<para>
+		The <literal>@Entity</literal> annotation defines the class as an EJB3 session bean, and tells the container to map the <literal>Todo</literal> class to a relational database table. Each property of the class will become a column in the table. Each instance of the class will become a row in this table. Since we have not used the <literal>@Table</literal> annotation, Seam's "configuration by exception" default will name the table after the class. 
+	</para>
+		
+	<para>
+		<literal>@Entity</literal> and <literal>@Table</literal> are both EJB3 annotations, and are not specific to Seam. It is possible to use Seam completely with POJOs (Plain Old Java Objects) without any EJB3-specific annotations. However, EJB3 brings a lot of advantages to the table, including container managed security, message-driven components, transaction and component level persistence context, and <literal>@PersistenceContext</literal> injection, which we will encounter a little further on.
+	</para>
+	
+	<para>
+		The <literal>@Name</literal> annotation is specific to Seam, and defines the string name for Seam to use to register the Entity Bean. This will be the default name for the relational database table. Each component in a Seam application must have a unique name. In the other components in the Seam framework, such as JSF web pages and session beans, you can reference the managed <literal>Todo</literal> bean using this name. If no instance of this class exists when it is referenced from another component, then Seam will instantiate one.   
+	</para>
+	
+	<para>
+		The <literal>@Id</literal> annotation defines a primary key <literal>id</literal> field for the component. <literal>@GeneratedValue</literal> specifies that the server will automatically generate this value for the component when it is saved to the database.
+	</para>
+	
+	<para>
+		Seam provides support for model-based constraints defined using Hibernate Validator, although Hibernate does not have to be the object persister used. The <literal>@NotNull</literal> annotation is a validation constraint that requires this property to have a value before the component can be persisted into the database. Using this annotation allows the validation to be enforced by the JSF code at the view level, without having to specify the exact validation constraint in the JSF code.
+	</para>
+	
+	<para>
+		At this point the only apparent difference between the Seam version and the EJB3/JSF version of the app is the inclusion of the validator annotation <literal>@NotNull</literal>, and the <literal>@Name</literal> annotation. However, while the EJB3/JSF version of this application requires a further <literal>TodoBean</literal> class to be manually coded and managed in order to handle the interaction between the <literal>Todo</literal> class and the web interface, when using Seam the Seam framework takes care of this work for us. We'll see how this is done in practice as we examine the implementation of the user interface.
+	</para>
+	</section>	
+	
+	<section id="Using_Seam_JSF_Web_Pages">
+		<title>
+			JSF Web Pages - index.xhtml and create.xhtml
+		</title>
+		
+		<para>
+			The <emphasis role="bold">index.xhtml</emphasis> file used is the same as in the EJB3/JSF example.
+		</para>
+		
+		<para>
+			<emphasis role="bold">create.xhtml</emphasis> begins to reveal the difference that coding using the Seam framework makes.
+		</para>
+		
+		<programlisting>&lt;h:form id="create"&gt;
+
+&lt;f:facet name="beforeInvalidField"&gt;
+  &lt;h:graphicImage styleClass="errorImg" value="error.png"/&gt;
+&lt;/f:facet&gt;
+&lt;f:facet name="afterInvalidField"&gt;
+  &lt;s:message styleClass="errorMsg" /&gt;
+&lt;/f:facet&gt;
+&lt;f:facet name="aroundInvalidField"&gt;
+  &lt;s:div styleClass="error"/&gt;
+&lt;/f:facet&gt;
+
+&lt;s:validateAll&gt;
+
+&lt;table&gt;
+
+  &lt;tr&gt;
+    &lt;td&gt;Title:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;s:decorate&gt;
+        &lt;h:inputText id="title" value="#{todo.title}" size="15"/&gt;
+      &lt;/s:decorate&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+
+  &lt;tr&gt;
+    &lt;td&gt;Description:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;s:decorate&gt;
+        &lt;h:inputTextarea id="description" value="#{todo.description}"/&gt;
+      &lt;/s:decorate&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+
+&lt;/table&gt;
+
+&lt;/s:validateAll&gt;
+
+&lt;h:commandButton type="submit" id="create" value="Create"
+                 action="#{todoDao.persist}"/&gt;
+&lt;/h:form&gt;
+		</programlisting>
+		
+		<para>
+			The first thing that is different here is the Java Server Facelet code at the beginning, which works with the <literal>@NotNull</literal> validation constraint of our <literal>todo</literal> class to enforce and indicate invalid input to the user.
+		</para>
+		
+		<para>
+			Also notice here that rather than requiring the use of a <literal>TodoBean</literal> class as we did in the EJB3/JSF example we back the form directly with a <literal>Todo</literal> entity bean. When this page is called, JSF asks Seam to resolve the variable <literal>todo</literal> due to JSF EL references such as <literal>#{todo.title}</literal>. Since there is no value already bound to that variable name, Seam will instantiate an entity bean of the <literal>todo</literal> class and return it to JSF, after storing it in the Seam context. The Seam context replaces the need for an intermediary bean.
+		</para>
+		
+		<para>
+			The form input values are validated against the Hibernate Validator constraints specified in the <literal>todo</literal> class. JSF will redisplay the page if the constraints are violated, or it will bind the form input values to the <literal>Todo</literal> entity bean. 
+		</para>
+		
+		<para>
+			Entity beans shouldn't do database access or transaction management, so we can't use the <literal>Todo</literal> entity bean as a JSF action listener. Instead, creation of a new todo item in the database is accomplished by calling the <literal>persist</literal> method of a <literal>TodoDao</literal> session bean. When JSF requests Seam to resolve the variable <literal>todoDao</literal> through the JSF EL expression <literal>#{todoDao.persist}</literal>, Seam will either instantiate an object if one does not already exist, or else pass the existing stateful <literal>todoDao</literal> object from the Seam context. Seam will intercept the <literal>persist</literal> method call and inject the <literal>todo</literal> entity from the session context. 
+		</para>
+		
+		<para>
+			Let's have a look at the <literal>TodoDao</literal> class (defined in <literal>TodoDao.java</literal>) to see how this injection capability is implemented.
+		</para>
+	</section>
+	
+	<section id="Using_Seam_Session_Bean">
+		<title>
+			Data Access using a Session Bean
+		</title>
+		
+		<para>
+			Let's go through a listing of the code for the <literal>TodoDao</literal> class. 
+		</para>
+				
+		<programlisting>@Stateful
+ at Name("todoDao")
+public class TodoDao implements TodoDaoInt {
+
+  @In (required=false) @Out (required=false)
+  private Todo todo;
+
+  @PersistenceContext (type=EXTENDED)
+  private EntityManager em;
+
+  // Injected from pages.xml
+  Long id;
+ 
+  public String persist () {
+    em.persist (todo);
+    return "persisted";
+  }
+
+  @DataModel
+  private List &lt;Todo&gt; todos;
+
+  @Factory("todos")
+  public void findTodos () {
+    todos = em.createQuery("select t from Todo t")
+                                  .getResultList();
+  }
+
+  public void setId (Long id) {
+    this.id = id;
+    
+    if (id != null) {
+      todo = (Todo) em.find(Todo.class, id);
+    } else {
+      todo = new Todo ();
+    }
+  }
+  
+  public Long getId () {
+    return id;
+  }
+
+  public String delete () {
+    em.remove( todo );
+    return "removed";
+  }
+
+  public String update () {
+    return "updated";
+  }
+
+  @Remove @Destroy
+  public void destroy() {}
+
+}</programlisting>
+
+		<para>
+			First of all notice that this is a stateful session bean. Seam can use both stateful and stateless session beans, the two most common types of EJB3 beans.
+		</para>
+		
+		<para>
+			The <literal>@In</literal> and <literal>@Out</literal> annotations define an attribute that is injected by Seam. The attribute is injected to this object or from this object to another via a Seam context variable named <literal>todo</literal>, a reference to the Seam registered name of our <literal>Todo</literal> class defined in <literal>Todo.java</literal>.
+		</para>
+		
+		<para>
+			The <literal>@PersistenceContext</literal> annotation injects the EJB3 Entity manager, allowing this object to persist objects to the database. Because this is a stateful session bean and the <literal>PersistenceContext</literal> type is set to <literal>EXTENDED</literal>, the same Entity Manager instance is used until the Remove method of the session bean is called. The database to be used (a <literal>persistence-unit</literal>) is defined in the file <filename>resources/META-INF/persistence.xml</filename>
+		</para>
+		
+		<para>
+			Note that this session bean has simultaneous access to context associated with web request (the form values of the <literal>todo</literal> object), and state held in transactional resources (the <literal>EntityManager</literal>). This is a break from traditional J2EE architectures, but Seam does not force you to work this way. You can use more traditional forms of application layering if you wish.
+		</para>
+		
+		<para>
+			The <literal>@DataModel</literal> annotation initializes the <literal>todos</literal> property, which will be outjected or "exposed" to the view. The <literal>@Factory</literal> annotated method performs the work of generating the <literal>todos</literal> list, and is called by Seam if it attempts to access the exposed <literal>DataModel</literal> property and finds it to be null. Notice the absence of property access methods for the <literal>todos</literal> property. Seam takes care of this for you automatically. 
+		</para>
+		
+		<para>
+			Let's take a look at the JSF code that we use for displaying and editing the list of todos, to get an idea of how to use these interfaces in practice.
+		</para>
+		
+		</section>
+		
+		<section id="Using_Seam_Display_and_Edit">
+			<title>
+				JSF Web Pages - todos.xhtml and edit.xhtml
+			</title>
+			
+			<para>	
+				Using the <literal>DataModel</literal> exposed property of the Session Bean it becomes trivial to produce a list of todos:
+			</para>
+			
+			<programlisting>&lt;h:form&gt;
+
+&lt;h:dataTable value="#{todos}" var="todo"&gt;
+  &lt;h:column&gt;
+    &lt;f:facet name="header"&gt;Title&lt;/f:facet&gt;
+    #{todo.title}
+  &lt;/h:column&gt;
+  &lt;h:column&gt;
+    &lt;f:facet name="header"&gt;Description&lt;/f:facet&gt;
+    #{todo.description}
+  &lt;/h:column&gt;
+  &lt;h:column&gt;
+    &lt;a href="edit.seam?tid=#{todo.id}"&gt;Edit&lt;/a&gt;
+  &lt;/h:column&gt;
+&lt;/h:dataTable&gt;
+
+&lt;center&gt;
+  &lt;h:commandButton action="create"
+            value="Create New Todo" type="submit"/&gt;
+&lt;/center&gt;
+
+&lt;/h:form&gt;
+</programlisting>
+		
+		<para> 
+			When the JSF variable resolver encounters <literal>{#todos}</literal> and requests <literal>todos</literal>, Seam finds that there is no "todos" component in the current scope, so it calls the @Factory("todos") method to make one. The todos object is then outjected once the factory method is done since it is annotated with the @DataModel annotation. <!--Seam responses by finding the <literal>todos</literal> <literal>DataModel</literal> registered with it, and outjecting that from the bean.-->
+		</para>
+		
+		<para>
+			Constructing the view for the edit page is similarly straight forward:
+		</para>
+		
+		<programlisting>&lt;h:form id="edit"&gt;
+  
+&lt;f:facet name="beforeInvalidField"&gt;
+  &lt;h:graphicImage styleClass="errorImg" value="error.png"/&gt;
+&lt;/f:facet&gt;
+&lt;f:facet name="afterInvalidField"&gt;
+  &lt;s:message styleClass="errorMsg" /&gt;
+&lt;/f:facet&gt;
+&lt;f:facet name="aroundInvalidField"&gt;
+  &lt;s:div styleClass="error"/&gt;
+&lt;/f:facet&gt;
+
+&lt;s:validateAll&gt;
+
+&lt;table&gt;
+
+  &lt;tr&gt;
+    &lt;td&gt;Title:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;s:decorate&gt;
+        &lt;h:inputText id="title" value="#{todo.title}" size="15"/&gt;
+      &lt;/s:decorate&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+
+  &lt;tr&gt;
+    &lt;td&gt;Description:&lt;/td&gt;
+    &lt;td&gt;
+      &lt;s:decorate&gt;
+        &lt;h:inputTextarea id="description" value="#{todo.description}"/&gt;
+      &lt;/s:decorate&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+
+&lt;/table&gt;
+
+&lt;/s:validateAll&gt;
+
+&lt;h:commandButton type="submit" id="update" value="Update"
+                 action="#{todoDao.update}"/&gt;
+&nbsp;
+&lt;h:commandButton type="submit" id="delete" value="Delete"
+                 action="#{todoDao.delete}"/&gt;
+&lt;/h:form&gt;
+		</programlisting>
+		
+		<para>
+			Here we see the same factors in play. JSF validation code taking advantage of the validation constraints defined in our Entity Bean, and the use of the <literal>todoDao</literal> Session Bean's <literal>update</literal> and <literal>delete</literal> methods to update the database.
+		</para>
+		
+		<para>
+			The call from <filename>todos.xhtml</filename>: <literal>edit.seam?tid=#{todo.id}</literal> causes Seam to create a <literal>todoDao</literal> and set it's <literal>id</literal> property to <literal>tid</literal>. Setting its <literal>id</literal> property causes the <literal>todoDao</literal> to retrieve the appropriate record from the database.
+		</para>
+		
+		<para>
+			The functionality that allows the edit page to be called with a parameter in this way is implemented through <literal>pages.xml</literal>. Let's have a look at the  <literal>pages.xml</literal> file and how it is used by Seam applications.
+		</para>
+	</section>
+	
+	<section id="Using_Seam_XML_Files">
+		<title>
+			Xml Files
+		</title>
+		
+		<para>
+			Seam drastically reduces the amount of xml coding that needs to be done. One file that is of interest is the  <literal>pages.xml</literal>, packaged in the <literal>app.war</literal> file's <literal>WEB-INF</literal> directory. This file is available in the <literal>resources/WEB-INF</literal> directory in the source code bundle. The  <literal>pages.xml</literal> file is used to define page descriptions including Seam page parameters (HTTP <literal>GET</literal> parameters), page actions, page navigation rules, error pages etc. <!--This file defines a number of attributes that affect global behaviour of the application.--> Among other things it can be used in a Seam application to define exception handlers and redirections.
+		</para>
+		<para>
+			In the case of our sample application we are using it to define a Seam page parameter. The <literal>pages.xml</literal> in this example contains the following code:
+		</para>
+		
+		<programlisting>&lt;page view-id="/edit.xhtml"&gt;
+    &lt;param name="tid" value="#{todoDao.id}" 
+           converterId="javax.faces.Long"/&gt;
+&lt;/page&gt;</programlisting>
+		<para>
+			This defines a parameter named <literal>tid</literal> for the <literal>edit.xhtml</literal> page. When the <literal>edit.xhtml</literal> page is loaded, the HTTP <literal>GET</literal> request parameter <literal>tid</literal> is converted to a <literal>Long</literal> value and assigned to the <literal>id</literal> property of the <literal>todoDao</literal> object. You can have as many page parameters as required to bind HTTP <literal>GET</literal> request parameters to the back-end components in your application.
+		</para>
+	</section>
+	
+	<section id="Further_Information">
+		<title>
+			Further Information
+		</title>
+		
+		<para>
+			This completes our walkthrough of the sample Seam application.	For further, detailed information on developing applications using the Seam framework, please refer to the "Seam Reference Guide".
+		</para>
+	</section>
+</chapter>
+




More information about the jboss-cvs-commits mailing list