[jboss-cvs] JBossAS SVN: r91808 - in projects/docs/enterprise/5.0: Getting_Started_Guide and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 29 23:51:01 EDT 2009


Author: irooskov at redhat.com
Date: 2009-07-29 23:51:01 -0400 (Wed, 29 Jul 2009)
New Revision: 91808

Added:
   projects/docs/enterprise/5.0/Getting_Started_Guide/
   projects/docs/enterprise/5.0/Getting_Started_Guide/Makefile
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/About_the_Example_Applications.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix1.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix2.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Author_Group.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.ent
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Preface.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Server_Configurations.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/The_JBoss_Server_A_Quick_Tour.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Other_Databases.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml
Log:
adding in the Getting Started Guide


Added: projects/docs/enterprise/5.0/Getting_Started_Guide/Makefile
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/Makefile	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/Makefile	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,14 @@
+#Makefile for Red Hat Documentation
+#Created by Jeff Fearn <jfearn at redhat.com>
+#Copyright Red Hat Inc. 2006
+
+XML_LANG	= en-US
+DOCNAME		= Installation_And_Getting_Started_Guide
+PRODUCT		= JBoss_Enterprise_Application_Platform
+BRAND 		= JBoss
+
+OTHER_LANGS	= de-DE es-ES fr-FR ja-JP pt-BR zh-CN as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
+TRANSLATIONS	= $(XML_LANG) $(OTHER_LANGS)
+
+COMMON_CONFIG  = /usr/share/publican
+include $(COMMON_CONFIG)/make/Makefile.common

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/About_the_Example_Applications.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/About_the_Example_Applications.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/About_the_Example_Applications.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<chapter id="About_the_Example_Applications">
+	<title>Sample Applications</title>
+	<para>
+	The JBoss Application Server, ships with various sample applications under <literal>JBOSS_HOME/docs/examples</literal>.		
+	</para>
+	<para>
+		For further details, please refer to the accompanying <filename>readme.txt</filename> for the respective sample applications under the above directory.
+	</para>
+	
+</chapter>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix1.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix1.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix1.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,61 @@
+<?xml version='1.0'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+]>
+
+<appendix id="Book-Revision_History">
+	<title></title>
+	<bibliolist>
+		<biblioentry>
+			<revhistory>
+				
+				<revision>
+					<revnumber>5.0.0</revnumber>
+					<date>Jan 08 2007</date>
+					<author>
+						<firstname>S</firstname>
+						<surname>Kittoli</surname>
+						
+					</author>
+					<revdescription>
+						<simplelist>
+							<member>Updated Content </member>
+							
+						</simplelist>
+					</revdescription>
+				</revision>
+				
+				<revision>
+					<revnumber>5.0.0</revnumber>
+					<date>Apr 07 2007</date>
+					<author>
+						<firstname>S</firstname>
+						<surname>Kittoli</surname>
+						
+					</author>
+					<revdescription>
+						<simplelist>
+							<member>Merge Content </member>
+						</simplelist>
+					</revdescription>
+				</revision>
+				
+				<revision>
+					<revnumber>5.0.0.GA<remark></remark></revnumber>
+					<date>Dec 08 2008</date>
+					<author>
+						<firstname>S</firstname>
+						<surname>Stark</surname>
+					</author>
+					<revdescription>
+						<simplelist>
+							<member>Complete the </member>
+						</simplelist>
+					</revdescription>
+				</revision>
+			</revhistory>
+			
+		</biblioentry>
+	</bibliolist>
+</appendix>
+
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix2.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix2.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Appendix2.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+]>
+<appendix id="appendix2">
+    
+    <title>Further Information Sources</title>
+    <para>
+        Developers wanting to get familiar with software development and implementation in  JBoss Application Server can read: <emphasis>JBoss: A Developer's Notebook</emphasis>. (O'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.jboss.org/jbossas/docs"/>.
+    </para>
+    <para>
+        For general EJB instruction, with thorough JBoss coverage, see <emphasis> Enterprise JavaBeans, 4th Edition</emphasis>. (O'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/enterprise/5.0/Getting_Started_Guide/en-US/Author_Group.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Author_Group.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Author_Group.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,20 @@
+<?xml version='1.0'?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+
+<authorgroup>
+	<author>
+		<firstname>JBoss</firstname>
+		<surname>Community</surname>
+	</author>
+	<editor>
+		<firstname>JBoss</firstname>
+		<surname>Community</surname>
+	</editor>
+	<editor>
+		<firstname>Isaac</firstname>
+		<surname>Rooskov</surname>
+	</editor>
+</authorgroup>	
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,31 @@
+<?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="Installation_Guide_JBoss_Enterprise_Application_Platform">
+	<title>Getting Started Guide</title>
+	<subtitle>for Use with JBoss Enterprise Application Platform 5.0</subtitle>
+	<edition>1.0</edition>
+	<pubsnumber>1</pubsnumber>
+	<productname>JBoss Enterprise Application Platform</productname>
+	<productnumber>5.0</productnumber>
+	<pubdate>, 2009</pubdate>
+	<isbn>N/A</isbn>
+	<abstract><para>This Getting Started Guide documents relevant information regarding
+the initial use of the JBoss Enterprise Application Platform</para>
+	</abstract>
+	<corpauthor>
+	  <inlinemediaobject>
+		<imageobject>
+			 <imagedata fileref="Common_Content/images/redhat-logo.svg" />
+		 </imageobject>
+	  </inlinemediaobject>
+	</corpauthor>
+	<copyright>
+		<year>&YEAR;</year>
+		<holder>&HOLDER;</holder>
+	</copyright>
+	<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</bookinfo>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,86 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<chapter id="EJB3_Caveats">
+	<title>
+		EJB3 Caveats in JBoss Application Server 5.0.0
+	</title>
+	
+	<para>
+		There are a number of implementation features that you should be aware of when developing applications for JBoss Application Server 5.0.0. 
+	</para>
+	
+	<section>
+		<title>
+			Unimplemented features
+		</title>
+		
+		<para>
+			The Release Notes for JBoss Application Server 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 fully supports the entire Java 5 Enterprise Edition specification. JBoss Application Server 4.2.2 implemented EJB3 functionality by way of an EJB MBean container running as a plugin in the JBoss Application Server. This had 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, this was 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>

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.ent
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.ent	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.ent	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,4 @@
+<!ENTITY JBEAP "JBoss Enterprise Application Platform">
+<!ENTITY JBEAPVERS "5.0">
+<!ENTITY HOLDER "Red Hat, Inc">
+<!ENTITY YEAR "2009">

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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="Appendix1.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Appendix2.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Revision_History.xml"/>
+
+</book>

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Preface.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Preface.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Preface.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,32 @@
+<?xml version='1.0'?>
+<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+                         "http://www.docbook.org/xml/4.4/docbookx.dtd">
+<preface id="Book-Preface">
+	<title>Introduction</title>
+	<para>
+		JBoss Application Server is the open source implementation of the Java EE suite of services. It comprises a set of offerings for enterprise customers who are looking for preconfigured profiles of JBoss Enterprise Middleware components that have been tested and certified together to provide an integrated experience. It's easy-to-use server architecture and high flexibility makes JBoss the ideal choice for users just starting out with J2EE, as well as senior architects looking for a customizable middleware platform.
+	</para>
+	<para>
+		Because it is Java-based, JBoss Application Server is cross-platform, easy to install and use on any operating system that supports Java. The readily available source code is a powerful learning tool to debug the server and understand it. It also gives you the flexibility to create customized versions for your personal or business use.
+	</para>
+	<para>
+		Installing JBoss Application Server is simple and easy. You can have it installed and running in no time. This guide will teach you to install and get started with the JBoss Application Server.</para>
+
+	<section id="Book-We_Need_Feedback">
+		<title>Help Contribute</title>
+		<para>
+			If you find a typographical error in the <citetitle>Installation Guide and 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">http://jira.jboss.com</ulink> against the project <citetitle>JBoss Application Server</citetitle> and component <citetitle>Docs/Installation and 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/community/5 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/community/5 --username yourusername
+		</screen>
+	</section></preface>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -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="appe-Publican-Revision_History">
+	<title>Revision History</title>
+	<simpara>
+		<revhistory>
+			<revision>
+				<revnumber>1.0</revnumber>
+				<date></date>
+				<author>
+					<firstname></firstname>
+					<surname></surname>
+					<email></email>
+				</author>
+				<revdescription>
+					<simplelist>
+						<member></member>
+					</simplelist>
+				</revdescription>
+			</revision>
+		</revhistory>
+	</simpara>
+</appendix>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,562 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/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>
+					
+<programlisting role="xml">
+&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>
+
+<para>
+	<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>
+					
+<programlisting role="xml">
+&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>
+<para>
+					<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 role="JAVA">
+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. Please install Ant if currently not installed on your computer.
+		</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>
+<screen>[user at localhost jsfejb3]$ ant
+Buildfile: build.xml
+
+compile:
+    [mkdir] Created dir: /jboss/gettingstarted/jsfejb3/build/classes
+    [javac] Compiling 4 source files to /home/user/Desktop/gettingstarted/jsfejb3/build/classes
+    [javac] Note: /jboss/gettingstarted/jsfejb3/src/TodoDao.java uses unchecked or unsafe operations.
+    [javac] Note: Recompile with -Xlint:unchecked for details.
+
+war:
+    [mkdir] Created dir: /jboss/gettingstarted/jsfejb3/build/jars
+      [war] Building war: /jboss/gettingstarted/jsfejb3/build/jars/app.war
+
+ejb3jar:
+      [jar] Building jar: /jboss/gettingstarted/jsfejb3/build/jars/app.jar
+
+ear:
+      [ear] Building ear: /jboss/gettingstarted/jsfejb3/build/jars/jsfejb3.ear
+
+main:
+
+BUILD SUCCESSFUL
+Total time: 3 seconds
+
+</screen>
+			<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>
+<screen>
+15:32:23,997 INFO  [EARDeployer] Init J2EE application: file:/jboss/jboss-as-5.0.0&lt;release&gt;/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:/jboss/jboss-as-5.0.0&lt;release&gt;
+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:/jboss/jboss-as-5.0.0&lt;release&gt;/server/default/deploy/jsfejb3.ear
+</screen>
+		<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"/>
+		</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/enterprise/5.0/Getting_Started_Guide/en-US/Server_Configurations.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Server_Configurations.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Server_Configurations.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,1218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+                         "http://www.docbook.org/xml/4.4/docbookx.dtd">
+<section id="The_JBoss_Server___A_Quick_Tour-Server_Configurations">
+<title>Server Configurations</title>
+<para>
+	Fundamentally, the JBoss architecture consists of the microcontainer, bootstrap beans loaded into the micrcontainer, a collection of deployers for loading various deployment types, and various mcbean(-jboss-beans.xml) and legacy mbean(jboss-service.xml) deployments.
+	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 do not need to do this to be able to run standard Java EE 5 applications though.
+</para>
+<para>
+	You don’t need a detailed understanding of the microcontainer 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 Application Server ships with three different server configurations. Within the	<literal>&lt;JBoss_Home&gt;/server</literal> directory, you will find five subdirectories:
+	<literal>minimal</literal>, <literal>default</literal>, <literal>standard</literal>, <literal>all</literal> and <literal>web</literal> - one for each server configuration. Each of these configurations provide a different set of services. The <literal>default</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 Java EE 5 technologies. This is just the bare server. There is no web container, no EJB or JMS support.
+				</para>
+			</listitem>
+		</varlistentry>
+		<varlistentry>
+			<term>default</term>
+			<listitem>
+				<para>
+					is a base Java EE 5 server profile containing a default set of services. It has the most frequently used services required to deploy a Java EE application. It does not include the JAXR service, the IIOP service, or any of the clustering services.
+				</para>
+			</listitem>
+		</varlistentry>
+		<varlistentry>
+			<term>all</term>
+			<listitem>
+				<para>
+					The all configuration starts all the available services. This includes the RMI/IIOP and clustering services, which are not loaded in the default configuration. 
+				</para>
+			</listitem>
+		</varlistentry>
+		<varlistentry>
+			<term>standard</term>
+			<listitem>
+				<para>
+					is the JavaEE 5 certified configuration of services. 
+				</para>
+			</listitem>
+		</varlistentry>
+		<varlistentry>
+			<term>web</term>
+			<listitem>
+				<para>
+					is a lightweight web container oriented profile that previews the JavaEE 6 web profile.
+				</para>
+			</listitem>
+		</varlistentry>
+	</variablelist>
+</para>
+<para>
+	If you want to know which services are configured in each of these instances, the primary differences will be in the <filename class="directory">&lt;JBoss_Home&gt;/server/&lt;instance-name&gt;/deployers/</filename> directory and also the services deployments in the <filename class="directory">&lt;JBoss_Home&gt;/server/&lt;instance-name&gt;/deploy</filename> directory. For example, the default profile deployers and deploy directory contents are:
+<programlisting>
+[usr at localhost &lt;JBoss_Home&gt;]$<literal>ls server/default/deployers </literal>
+alias-deployers-jboss-beans.xml		jboss-aop-jboss5.deployer
+bsh.deployer				jboss-jca.deployer
+clustering-deployer-jboss-beans.xml		jbossweb.deployer
+dependency-deployers-jboss-beans.xml	jbossws.deployer
+directory-deployer-jboss-beans.xml	j	sr77-deployers-jboss-beans.xml
+ear-deployer-jboss-beans.xml		metadata-deployer-jboss-beans.xml
+ejb-deployer-jboss-beans.xml		seam.deployer
+ejb3.deployer				security-deployer-jboss-beans.xml
+hibernate-deployer-jboss-beans.xml
+[usr at localhost &lt;JBoss_Home&gt;]$<literal>ls server/default/deploy </literal>
+ROOT.war				jsr88-service.xml
+cache-invalidation-service.xml	legacy-invokers-service.xml
+ejb2-container-jboss-beans.xml	mail-ra.rar
+ejb2-timer-service.xml		mail-service.xml
+ejb3-connectors-jboss-beans.xml	management
+ejb3-container-jboss-beans.xml	messaging
+ejb3-interceptors-aop.xml		monitoring-service.xml
+ejb3-timer-service.xml		profileservice-jboss-beans.xml
+hdscanner-jboss-beans.xml		properties-service.xml
+hsqldb-ds.xml			quartz-ra.rar
+http-invoker.sar			remoting-jboss-beans.xml
+jboss-local-jdbc.rar		schedule-manager-service.xml
+jboss-xa-jdbc.rar			scheduler-service.xml
+jbossweb.sar			security
+jbossws.sar			sqlexception-service.xml
+jca-jboss-beans.xml		transaction-jboss-beans.xml
+jms-ra.rar			transaction-service.xml
+jmx-console.war			uuid-key-generator.sar
+jmx-invoker-service.xml		vfs-jboss-beans.xml
+jmx-remoting.sar
+</programlisting>
+	while the web profile deployers and deploy directory contents are:
+<programlisting>
+[usr at localhost &lt;JBoss_Home&gt;]$<literal>ls server/web/deployers </literal>
+alias-deployers-jboss-beans.xml	jbossweb.deployer
+ejb3.deployer			metadata-deployer-jboss-beans.xml
+jboss-aop-jboss5.deployer		security-deployer-jboss-beans.xml
+jboss-jca.deployer
+[usr at localhost &lt;JBoss_Home&gt;]$<literal>ls server/web/deployers </literal>
+ROOT.war				jbossweb.sar
+ejb3-container-jboss-beans.xml	jca-jboss-beans.xml
+hdscanner-jboss-beans.xml		jmx-console.war
+hsqldb-ds.xml			jmx-invoker-service.xml
+http-invoker.sar			security
+jboss-local-jdbc.rar		transaction-jboss-beans.xml
+jboss-xa-jdbc.rar
+</programlisting>
+</para>
+<note>
+	<para>
+		The <emphasis role="bold">default</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="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_table"/> shows the directories inside the server configuration directory (<filename class="directory">&lt;JBoss_Home&gt;/server/&lt;instance-name&gt;</filename>) and their functions.
+	</para>
+	<para>
+		<table id="Server_Configuration_Directory_Structure_table">
+			<title>Server Configuration Directory Structure</title>
+			<tgroup cols="2">
+				<colspec colname="c1" colnum="1" colwidth="1*"/>
+				<colspec colname="c2" colnum="2" colwidth="4*"/>
+				<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>bootstrap.xml</filename> bootstrap descriptor file for a given server configuration. This defines the core microcontainer beans 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.
+						</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. Note that this directory only contains those jars unique to the server configuration. Jars common across the server configurations are now located in <filename class="directory">&lt;JBoss_Home&gt;/common/lib</filename>.
+						</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>jboss-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_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>&lt;JBoss_Home&gt;/server/default</literal> directory. The following example illustrates a truncated directory structure of the <literal>jboss-as-&lt;release&gt;</literal> server configuration files:
+<screen>[user at localhost &lt;JBoss_Home&gt;]$ tree
+|-- bin
+|-- client
+|-- common
+|   |-- lib
+|   |   |-- antlr.jar
+|   |   |-- ... many more jars
+|-- docs
+|   |-- dtd
+|   |-- examples
+|   |   |-- binding-manager
+|   |   |   `-- sample-bindings.xml
+|   |   |-- jca
+|   |   |-- jms
+|   |   |-- jmx
+|   |   |-- netboot
+|   |   |   `-- netboot.war
+|   |   `-- varia
+|   |       |-- deployment-service
+|   |       |-- derby-plugin.jar
+|   |       |-- entity-resolver-manager
+|   |       |   `-- xmlresolver-service.xml
+|   |       `-- jboss-bindings.xml
+|   `-- schema
+|-- lib
+|   |-- commons-codec.jar
+|   |-- commons-httpclient.jar
+|   |-- commons-logging.jar
+|   |-- concurrent.jar
+|   |-- endorsed
+|   |   |-- serializer.jar
+|   |   |-- xalan.jar
+|   |   `-- xercesImpl.jar
+|   |-- getopt.jar
+|   |-- jboss-common.jar
+|   |-- jboss-jmx.jar
+|   |-- jboss-system.jar
+|   |-- jboss-xml-binding.jar
+|   `-- log4j-boot.jar
+`-- server
+|-- all
+|   |-- conf
+|   |   |-- bootstrap/
+|   |   |   |-- aop.xml
+|   |   |   |-- bindings.xml
+|   |   |   |-- aop.xml
+|   |   |   |-- classloader.xml
+|   |   |   |-- deployers.xml
+|   |   |   |-- jmx.xml
+|   |   |   |-- profile-repository.xml
+|   |   |   |-- profile.xml
+|   |   |   |-- vfs.xml
+|   |   |-- bootstrap.xml
+|   |   |-- bootstrap-norepo.xml
+|   |   |-- jacorb.properties
+|   |   |-- java.policy
+|   |   |-- jax-ws-catalog.xml
+|   |   |-- jboss-log4j.xml
+|   |   |-- jboss-service.xml
+|   |   |-- jbossjta-properties.xml
+|   |   |-- jndi.properties
+|   |   |-- login-config.xml
+|   |   |-- props
+|   |   |   |-- jbossws-roles.properties
+|   |   |   |-- jbossws-users.properties
+|   |   |   |-- jmx-console-roles.properties
+|   |   |   `-- jmx-console-users.properties
+|   |   |-- standardjboss.xml
+|   |   |-- standardjbosscmp-jdbc.xml
+|   |   `-- xmdesc
+|   |-- deploy
+|   |-- deploy-hasingleton
+|   |   `-- jms
+|   |-- deployers
+|   `-- lib
+|-- default
+|   |-- conf
+|   |   |-- bootstrap/
+|   |   |   |-- aop.xml
+|   |   |   |-- bindings.xml
+|   |   |   |-- aop.xml
+|   |   |   |-- classloader.xml
+|   |   |   |-- deployers.xml
+|   |   |   |-- jmx.xml
+|   |   |   |-- profile-repository.xml
+|   |   |   |-- profile.xml
+|   |   |   |-- vfs.xml
+|   |   |-- bootstrap.xml
+|   |   |-- bootstrap-norepo.xml
+|   |   |-- jacorb.properties
+|   |   |-- java.policy
+|   |   |-- jax-ws-catalog.xml
+|   |   |-- jboss-log4j.xml
+|   |   |-- jboss-service.xml
+|   |   |-- jbossjta-properties.xml
+|   |   |-- jndi.properties
+|   |   |-- login-config.xml
+|   |   |-- props
+|   |   |   |-- jbossws-roles.properties
+|   |   |   |-- jbossws-users.properties
+|   |   |   |-- jmx-console-roles.properties
+|   |   |   `-- jmx-console-users.properties
+|   |   |-- standardjboss.xml
+|   |   |-- standardjbosscmp-jdbc.xml
+|   |   `-- xmdesc
+|   |       |-- AttributePersistenceService-xmbean.xml
+|   |       |-- ClientUserTransaction-xmbean.xml
+|   |       |-- JNDIView-xmbean.xml
+|   |       |-- Log4jService-xmbean.xml
+|   |       |-- NamingBean-xmbean.xml
+|   |       |-- NamingService-xmbean.xml
+|   |       |-- TransactionManagerService-xmbean.xml
+|   |       |-- org.jboss.deployment.JARDeployer-xmbean.xml
+|   |       |-- org.jboss.deployment.MainDeployer-xmbean.xml
+|   |       `-- org.jboss.deployment.SARDeployer-xmbean.xml
+|   |-- data
+|   |   |-- hypersonic
+|   |   |-- jboss.identity
+|   |   |-- tx-object-store
+|   |   `-- xmbean-attrs
+|   |-- deploy
+|   |-- lib
+|   |-- log
+|   |   |-- boot.log
+|   |   |-- server.log
+|   |   `-- server.log.2008-08-09
+|   |-- tmp
+|   `-- work
+|       `-- jboss.web
+|           `-- localhost
+`-- minimal
+|-- conf
+|   |-- bootstrap/
+|   |-- bootstrap/aop.xml
+|   |-- bootstrap/classloader.xml
+|   |-- bootstrap/deployers.xml
+|   |-- bootstrap/jmx.xml
+|   |-- bootstrap/profile.xml
+|   |-- bootstrap.xml
+|   |-- jboss-log4j.xml
+|   |-- jboss-service.xml
+|   |-- jndi.properties
+|   `-- xmdesc
+|       |-- NamingBean-xmbean.xml
+|       `-- NamingService-xmbean.xml
+|-- deploy/
+|-- deploy/hdscanner-jboss-beans.xml
+|-- deployers/
+`-- lib
+|-- jboss-minimal.jar
+|-- jnpserver.jar
+`-- log4j.jar</screen>
+
+</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 colname="c2" colnum="2" colwidth="4*"/>
+					<thead>
+						<row>
+							<entry>
+								File
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+					<tbody>
+						<row>
+							<entry>
+								<literal>bootstrap.xml</literal>
+							</entry>
+							<entry>
+								This is the <literal>bootstrap.xml</literal> file that defines which additional microcontainer deployments will be loaded as part of the bootstrap phase.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>bootstrap/*</literal>
+							</entry>
+							<entry>
+								This directory contains the microcontainer bootstrap descriptors that are referenced from the <literal>bootstrap.xml</literal> file.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>jboss-service.xml</literal>
+							</entry>
+							<entry>
+								<literal>jboss-service.xml</literal> legacy core mbeans that have yet to be ported to either bootstrap deployments, or deploy services. This file will go away in the near future.
+							</entry>
+						</row>
+						<row>
+							<entry>
+								<literal>jbossjta-properties.xml</literal>
+							</entry>
+							<entry>
+								<literal>jbossjta-properties.xml</literal> specifies the JBossTS transaction manager default properties.
+							</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>java.policy</literal>
+							</entry>
+							<entry>
+								A placeholder java security policy file that simply grants all permissions.
+							</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>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_deployers_directory">
+		<title>Contents of "deployers" directory</title>
+		<para>
+			The files in the <literal>deployers</literal> directory are explained in the following table.
+		</para>
+		<para>
+			<table id="Contents_of_deployers_directory_table1">
+				<title>Contents of "deployers" directory</title>
+				<tgroup cols="2">
+					<colspec colname="c1" colnum="1" colwidth="4*"/>
+					<colspec colname="c2" colnum="2" colwidth="4*"/>
+					<thead>
+						<row>
+							<entry>
+								File
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+					<tbody>
+					<row>
+						<entry>
+							<literal>alias-deployers-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers that know how to handle The know how to handle &lt;alias&gt; in &lt;deployment&gt; as true controller context.
+								Meaning they will only get active/installed when their original is installed. 
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>bsh.deployer</literal>
+						</entry>
+						<entry>
+							This file configures the bean shell deployer, which deploys bean shell scripts as JBoss mbean services.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>clustering-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Clustering-related deployers which add dependencies on needed clustering services to clustered EJB3, EJB2 beans and to distributable web applications. 
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>dependency-deployers-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers for aliases.txt, jboss-dependency.xml  jboss-depedency.xml adds generic dependency on whatever. aliases.txt adds human-readable name for deployments, e.g. vfszip://home/blah/.../jboss-5.0.0.GA/server/default/deploy/some-long-name.ear aliased to ales-app.ear.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>directory-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Adds legacy behavior for directories, handling its children as possible deployments.
+							e.g. .sar's lib directory to treat its .jar files as deployments
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>ear-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							JavaEE 5 enterprise application related deployers
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>ejb-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Legacy JavaEE 1.4 ejb jar related deployers
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>ejb3.deployer</literal>
+						</entry>
+						<entry>
+							This is a deployer that supports JavaEE 5 ejb3, JPA, and application client deployments, .
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>hibernate-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers for Hibernate -hibernate.xml descriptors, which are similar to Hibernate's .cfg.xml files.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>jboss-aop-jboss5.deployer</literal>
+						</entry>
+						<entry>
+							JBossAspectLibrary and base aspects. Why is this in deployers, dependencies?
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>jboss-jca.deployer</literal>
+						</entry>
+						<entry>
+							<literal>jboss-jca.deployer</literal> description
+						</entry>
+					</row>
+
+					<row>
+						<entry>
+							<literal>jbossweb.deployer</literal>
+						</entry>
+						<entry>
+							The JavaEE 5 servlet, JSF, JSP deployers.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>jbossws.deployer</literal>
+						</entry>
+						<entry>
+							The JavaEE 5 webservices endpoint deployers.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>jsr77-deployers-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers for creating the JSR77 MBeans from the JavaEE components.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>metadata-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers for processing the JavaEE metadata from xml, annotations.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>seam.deployer</literal>
+						</entry>
+						<entry>
+							Deployer providing integration support for JBoss Seam applications.
+						</entry>
+					</row>
+					<row>
+						<entry>
+							<literal>security-deployer-jboss-beans.xml</literal>
+						</entry>
+						<entry>
+							Deployers for configuration the security layers of the JavaEE components.
+						</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_table">
+				<title>Contents of "deploy" directory</title>
+				<tgroup cols="2">
+					<colspec colname="c1" colnum="1" colwidth="4*"/>
+					<colspec colname="c2" colnum="2" colwidth="4*"/>
+					<thead>
+						<row>
+							<entry>
+								File
+							</entry>
+							<entry>
+								Description
+							</entry>
+						</row>
+					</thead>
+								<tbody>
+									<row>
+										<entry>
+											<literal>ROOT.war</literal>
+										</entry>
+										<entry>
+											<literal>ROOT.war</literal> establishes the '/' root
+											web application. </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>ejb2-container-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb2-container-jboss-beans.xml</literal>
+											UserTransaction integration bean for the EJB2
+											containers. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>ejb2-timer-service.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb2-timer-service.xml</literal> contains
+											the ejb timer service beans. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>ejb3-connectors-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb3-connectors-jboss-beans.xml</literal>
+											EJB3 remoting transport beans. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>ejb3-container-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb3-container-jboss-beans.xml</literal>
+											UserTransaction integration bean for the EJB3
+											containers. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>ejb3-interceptors-aop.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb3-interceptors-aop.xml</literal> defines
+											the EJB3 container aspects. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>ejb3-timer-service.xml</literal>
+										</entry>
+										<entry>
+											<literal>ejb3-timer-service.xml</literal> an
+											alternate quartz based timer service </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>hdscanner-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>hdscanner-jboss-beans.xml</literal> the
+											deploy directory hot deployment scanning bean
+										</entry>
+									</row>
+									<row>
+										<entry>hsqldb-ds.xml</entry>
+										<entry>configures the Hypersonic embedded database
+											service configuration file. It sets up the embedded
+											database and related connection factories. </entry>
+									</row>
+									<row>
+										<entry>http-invoker.sar</entry>
+										<entry>contains the detached invoker that supports RMI
+											over HTTP. It also contains the proxy bindings for
+											accessing JNDI over HTTP. </entry>
+									</row>
+									<row>
+										<entry>jboss-local-jdbc.rar</entry>
+										<entry>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>jboss-xa-jdbc.rar</entry>
+										<entry>JCA resource adaptors for XA DataSources</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>jbossweb.sar</literal>
+										</entry>
+										<entry>an mbean service supporting TomcatDeployer with
+											web application deployment service
+										management.</entry>
+									</row>
+										<row>
+											<entry><literal>jbossws.sar</literal></entry>
+											<entry>provides JEE web services support. </entry>
+										</row>
+										<row>
+										<entry>
+											<literal>jca-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>jca-jboss-beans.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>jms-ra.rar</literal>
+										</entry>
+										<entry>
+											<literal>jms-ra.rar</literal> JBoss JMS Resource
+											Adapter </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/connection-factories-service.xml</literal>
+										</entry>
+										<entry>configures the DLQ, ExpiryQueue JMS connection
+											factory</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/destinations-service.xml</literal>
+										</entry>
+										<entry>The message persistence store service</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/destinations-service.xml</literal>
+										</entry>
+										<entry>configures the DLQ, ExpiryQueue JMS destinations.
+										</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/jms-ds.xml</literal>
+										</entry>
+										<entry>
+											<literal>jms-ds.xml</literal> configures the
+											JMSProviderLoader and JmsXA inflow resource adaptor
+											connection factory binding. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/legacy-service.xml</literal>
+										</entry>
+										<entry>
+											<literal>legacy-service.xml</literal> configures the
+											JMSProviderLoader and JmsXA inflow resource adaptor
+											connection factory binding. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/messaging-jboss-beans.xml</literal>
+										</entry>
+										<entry> The <literal>messaging-jboss-beans.xml</literal>
+											file configures JMS security and management beans.
+										</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/messaging-service.xml</literal>
+										</entry>
+										<entry> The <literal>messaging-service.xml</literal>
+											file configures the core JBoss Messaging service.
+										</entry>
+									</row>
+									<row>
+										<entry>
+											<literal>messaging/remoting-bisocket-service.xml</literal>
+										</entry>
+										<entry> The
+											<literal>remoting-bisocket-service.xml</literal>
+											configures the JMS remoting service layer. </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.xml</literal>
+										</entry>
+										<entry>
+											<literal>jmx-invoker-service.xml</literal> is an
+											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. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>jmx-remoting.sar</literal>
+										</entry>
+										<entry>
+											<literal>jmx-remoting.sar</literal> is a
+											javax.management.remote implementation providing
+											access to the JMX server. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>legacy-invokers-service.xml</literal>
+										</entry>
+										<entry>
+											<literal>legacy-invokers-service.xml</literal> the
+											legacy detached jmx invoker remoting services.
+										</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>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>profileservice-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>profileservice-jboss-beans.xml</literal>
+											description </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>quartz-ra.rar</literal>
+											</entry>
+											<entry>
+											<literal>quartz-ra.rar</literal> is a resource adaptor for inflow of Quartz events </entry>
+										</row>
+										<row>
+											<entry>
+											<literal>remoting-jboss-beans.xml</literal>
+											</entry>
+											<entry>
+											<literal>remoting-jboss-beans.xml</literal>
+											contains the unified invokers based on JBoss
+											Remoting. </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>security/security-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>security-jboss-beans.xml</literal> security
+											domain related beans. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>security/security-policies-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>security-policies-jboss-beans.xml</literal>
+											security authorization related beans for ejb and web
+											authorization. </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>transaction-jboss-beans.xml</literal>
+										</entry>
+										<entry>
+											<literal>transaction-jboss-beans.xml</literal> JTA
+											transaction manager related beans. </entry>
+									</row>
+									<row>
+										<entry>
+											<literal>transaction-service.xml</literal>
+										</entry>
+										<entry>
+											<literal>transaction-service.xml</literal>
+											ClientUserTransaction proxy service configuration.
+										</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_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">&lt;JBoss_Home&gt;/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 colname="c2" colnum="2" colwidth="4*"/>
+				<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>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>
+				
+				</tbody>
+			</tgroup>
+		</table>
+	</para>
+</section>
+<section id="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 colname="c2" colnum="2" colwidth="4*"/>
+					<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 colname="c2" colnum="2" colwidth="4*"/>
+					<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>
+		<title></title>
+	</section> -->
+	
+</section>

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,144 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<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. 
+		</para>
+<important><title>Remote connection to the JBoss AS server</title>
+	<para>JBoss AS now binds its services to localhost (127.0.0.1) by default, instead of binding to all available interfaces (0.0.0.0). This was primarily done for security reasons because of concerns of users going to production without having secured their servers properly. To enable remote access by binding JBoss services to a particular interface, simply run jboss with the <literal>-b</literal> option. To bind to all available interfaces and re-enable the legacy behaviour use <literal>-b 0.0.0.0</literal>. In any case, be aware you still need to secure your server properly.
+	</para>
+</important>
+<para>
+	For more information including setting up multiple JBoss server instances on one machine and hosting multiple domains with JBoss, please refer to the <ulink url="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/beta500/html-single/index.html">Administration and Configuration Guide</ulink>. Some examples on binding are shipped in  <filename>&lt;JBOSS_HOME&gt;/docs/examples/binding-manager/sample-bindings.xml</filename>.
+</para>
+
+<para>
+	On starting your server, your screen output should look like the following (accounting for installation directory differences) and contain no error or exception messages:
+</para>
+		
+<programlisting>[user at mypc bin]$ ./run.sh 
+=========================================================================
+
+  JBoss Bootstrap Environment
+
+  JBOSS_HOME: /home/user/jboss-as-version/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/user/jboss-as-version/jboss-as/bin/run.jar
+
+=========================================================================
+
+</programlisting>
+
+<para>More options for the JBoss AS <literal>run</literal> script are discussed in <xref linkend="Starting_and_Stopping_the_Server-Start_the_Server_With_Alternate_Configuration"/> below.</para>
+		<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>default</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) [5.0.0 (build: SVNTag=JBoss_5_0_0 date=200801092200)] 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/enterprise/5.0/Getting_Started_Guide/en-US/The_JBoss_Server_A_Quick_Tour.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/The_JBoss_Server_A_Quick_Tour.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/The_JBoss_Server_A_Quick_Tour.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,277 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+                         "http://www.docbook.org/xml/4.4/docbookx.dtd"
+[
+<!ELEMENT xi:include (xi:fallback?) >
+<!ATTLIST xi:include
+xmlns:xi            CDATA       #FIXED       "http://www.w3.org/2001/XInclude"
+href                CDATA       #REQUIRED
+parse               (xml|text)  "xml"
+xpointer            CDATA       #IMPLIED
+encoding            CDATA       #IMPLIED
+accept              CDATA       #IMPLIED
+accept-charset      CDATA       #IMPLIED
+accept-language     CDATA       #IMPLIED >
+<!ELEMENT xi:fallback ANY >
+<!ATTLIST xi:fallback
+xmlns:xi            CDATA       #FIXED "http://www.w3.org/2001/XInclude" >
+<!ENTITY % local.preface.class    "| xi:include" >
+<!ENTITY % local.part.class       "| xi:include" >
+<!ENTITY % local.chapter.class    "| xi:include" >
+<!ENTITY % local.divcomponent.mix "| xi:include" >
+<!ENTITY % local.para.char.mix    "| xi:include" >
+<!ENTITY % local.info.class       "| xi:include" >
+<!ENTITY % local.common.attrib    "xml:base CDATA #IMPLIED
+xmlns:xi            CDATA       #FIXED       'http://www.w3.org/2001/XInclude'" >
+
+]>
+
+<chapter id="The_JBoss_Server___A_Quick_Tour">
+	<title>The JBoss Server - A Quick Tour</title>
+
+<section id="Server_Structure">
+	<title>Server Structure</title>
+	<para>
+		Now that you’ve downloaded JBoss and have run the server for the first time, the next thing you will want to know is how the installation is laid out and what goes where. At first glance there seems to be a lot of stuff in there, and it’s not obvious what you need to look at and what you can safely ignore for the time being. To remedy that, we’ll explore the server directory structure, locations of the key configuration files, log files, deployment and so on. It’s worth familiarizing yourself with the layout at this stage as 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>
+</section>
+	
+	<!-- Embedded sections -->
+	
+	<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/default</filename>, for example).
+		</para>
+		<section id="The_JBoss_Server___A_Quick_Tour-Bootstrap_Configuration">
+			<title>Bootstrap Configuration</title>
+			<para>The microcontainer bootstrap configuration is described by the <filename>conf/bootstrap.xml</filename> and the <filename>conf/bootstrap/*.xml</filename> it references. Its expected that the number of bootstrap beans will be reduced in the future. Its not expected that you would need to edit the bootstrap configuration files for a typical installation.</para>
+		</section>
+		<section id="Basic_Configuration_Issues-Core_Services">
+			<title>Legacy Core Services</title>
+			<para>
+				The legacy core services specified in the <filename>conf/jboss-service.xml</filename> file are started just after server starts up the microcontainer. 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>
+			<note>
+				<para>
+					Eventually this file will be dropped as the services are converted to microcontainer beans or mbeans that are deployed as deploy directory services.</para></note>
+			<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/jboss-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>log/server.log</filename>).
+			</para>
+			<para>
+				There are 6 basic log levels used: <literal>TRACE</literal>, <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>conf/jboss-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 their filenames. Please note 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>conf/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> (used in defining jboss specific configurations for an application) and/or <filename>jboss-web.xml</filename> (used in defining jboss for a Web application. We'll quickly look at how to do this to secure the JMX Console application which ships with JBoss.
+			</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 (additional roles on that username can be added comma separated). 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 restart your browser to use the login dialog window.
+				</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/console-mgr.sar/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, *-jboss-beans.xml</filename>, MC <filename>.beans</filename> archive, or JBoss Service Archive (SAR) files. SARs contains an META-INF/jboss-service.xml descriptor and additional resources the service requires (e.g. classes, library JAR files or other archives), all packaged up into a single archive. Similarly, a <filename>.beans</filename> archive contains a META-INF/jboss-beans.xml and additional resources.
+			</para>
+			<para>
+				Detailed information on all these services can be found in the <emphasis>JBoss Application 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 Application Server comes with Tomcat as the default web container.
+		</para>
+		<para>
+		</para>
+	</section>-->
+</chapter>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Other_Databases.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Other_Databases.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Other_Databases.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,295 @@
+<?xml version='1.0'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+]>
+
+<chapter id="Using_other_Databases">
+	<title>Using other Databases</title>
+	<para>
+		In the previous chapters, we’ve been using the JBossAS default datasource in our applications. This datasource is configured to use the embedded Hypersonic database instance shipped by default with the distribution. This datasource is bound to the JNDI name <literal>java:/DefaultDS</literal> and its descriptor is named <literal>hsqldb-ds.xml</literal> under the deploy directory 
+	</para>
+	<para>
+		Having a database included with JBossAS is very convenient for running the server and examples out-of-the-box. However, this database is not a production quality database and as such should not be used with enterprise-class deployments. As a consequence of this JBoss Support does not provide any official support for Hypersonic.
+	</para>
+	<para>
+		In this chapter we will explain in details how to configure and deploy a datasource to connect JBossAS to the most popular database servers available on the market today.
+	</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 JBoss Application Server Guide available at <ulink url="http://labs.jboss.com/projects/docs/"/>.
+		</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>We would also highly recommend consulting the JCA wiki pages at http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJCA
+	</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>
+			The MySQL® database has become the world's most popular open source database thanks to its consistent fast performance, high reliability and ease of use. This database server is used in millions of installations ranging from large corporations to specialized embedded applications across every continent of the world. . In this section, we'll be using the community version of their database server (GA 5.0.45)  and the latest JDBC driver (GA 5.1.5) both available at <ulink url="http://www.mysql.com"></ulink>.
+		</para>
+	
+		
+		
+		
+		
+		
+		<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 the JBoss Application Server, copy the archive <literal>mysql-mysql-connector-java-5.1.5-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 server configuration you’re running).
+			</para>
+			<para>
+				Then create a text file in the deploy directory called mysql-ds.xml with the following datasource descriptor:
+			</para>
+			
+<programlisting role="XML">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;datasources&gt;
+	&lt;local-tx-datasource&gt;
+	&lt;jndi-name&gt;DefaultDS&lt;/jndi-name&gt;
+	&lt;connection-url&gt;jdbc:mysql://localhost:3306/test&lt;/connection-url&gt;
+	&lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;
+	&lt;user-name&gt;root&lt;/user-name&gt;
+	&lt;password&gt;jboss&lt;/password&gt;
+	&lt;valid-connection-checker-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker&lt;/valid-connection-checker-class-name&gt;
+	&lt;metadata&gt;
+	&lt;type-mapping&gt;mySQL&lt;/type-mapping&gt;
+	&lt;/metadata&gt;
+	&lt;/local-tx-datasource&gt;
+&lt;/datasources&gt;</programlisting>
+
+<para>
+The datasource is pointing at the database called test provided by default with MySQL 5.x.
+Remember to update the connection url attributes as well as the combo username/password to match your environment setup.
+</para>
+		</section>
+		
+		
+		
+		<section id="Using_MySQL_as_the_Default_DataSource-Testing_the_MySQL_DataSource">
+			<title>Testing the MySQL DataSource</title>
+			<para>
+				Using the test client described in <xref linkend="creating_a_jdbc_client"/>, you may now verify the proper installation of your datasource. 
+			</para>
+				
+		</section>
+
+	</section>
+	
+	<section id="Configuring_a_datasource_for_Oracle_DB">
+		<title>Configuring a datasource for Oracle DB</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/technology/products/database/xe/index.html"/>
+		</para>
+		<para>
+		In this section, we'll connect the server to Oracle Database 10g Express Edition using the latest JDBC driver (11g)  available at <ulink url="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html"/>
+		</para>
+			
+		
+		
+		<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>
+				To make the JDBC driver classes available to JBoss Application Server, copy the archive ojdbc5.jar to the lib directory in the default server configuration (assuming that is the server configuration you’re running).
+			</para>
+			<para>
+				Then create a text file in the <filename>deploy</filename> directory called <filename>oracle-ds.xml</filename> with the following datasource descriptor :
+			</para>
+				
+<programlisting role="XML">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;datasources&gt;
+	&lt;local-tx-datasource&gt;
+		&lt;jndi-name&gt;DefaultDS&lt;/jndi-name&gt;
+		&lt;connection-url&gt;jdbc:oracle:thin:@localhost:1521:xe&lt;/connection-url&gt;
+		&lt;driver-class&gt;oracle.jdbc.driver.OracleDriver&lt;/driver-class&gt;
+		&lt;user-name&gt;SYSTEM&lt;/user-name&gt;
+		&lt;password&gt;jboss&lt;/password&gt;
+		&lt;valid-connection-checker-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker&lt;/valid-connection-checker-class-name&gt;
+		&lt;metadata&gt;
+			&lt;type-mapping&gt;Oracle9i&lt;/type-mapping&gt;
+		&lt;/metadata&gt;
+	&lt;/local-tx-datasource&gt;
+&lt;/datasources&gt;</programlisting>
+			
+			<para>
+				The datasource is pointing at the database/SID called “xe” provided by default with Oracle XE.
+			</para>
+			<para>
+				Of course, you need to update the connection url attributes as well as the username/password combination to match your environment setup.
+			</para>
+
+		</section>
+		
+		
+		
+
+		
+		
+		
+	
+		
+		
+		
+		<section id="Setting_up_an_XADataSource_with_Oracle_9i-Testing_the_Oracle_DataSource">
+			<title>Testing the Oracle DataSource</title>
+			<para>
+				Before you can verify the datasource configuration, Oracle XE should be reconfigured to avoid port conflict with JBossAS as by default they  both start a web server on port 8080.
+			</para>
+			<para>Open up an Oracle SQLcommand line and execute the following commands:
+			</para>
+<screen>
+<command>SQL> connect;
+Enter user-name: SYSTEM
+Enter password:</command>
+Connected.
+SQL> <command>begin
+2  dbms_xdb.sethttpport('8090');
+3  end;
+4  /</command>
+PL/SQL procedure successfully completed.
+SQL> <command>select dbms_xdb.gethttpport from dual;</command>
+GETHTTPPORT
+-----------
+8090
+</screen>
+
+<para>
+	The web server started by Oracle XE to provide http-based administration tools is now running on port 8090.
+	Start the JBossAS server instance as you would normally do. You are now ready to use the test client described in Chapter 6.5 to verify the proper installation of your datasource. 
+</para>
+	
+		</section>
+	</section>
+
+	
+	<section><title>Configuring a datasource for Microsoft SQL Server 200x</title>
+		<para>In this section, we'll connect the server to MS SQL Server 2000 using the latest JDBC driver (v1.2) available at <ulink url="http://msdn2.microsoft.com/en-us/data/aa937724.aspx"/>.
+		</para>
+		
+		<section><title>Installing the JDBC Driver and Deploying the DataSource</title>
+		<para>
+			To make the JDBC driver classes available to JBoss Application Server, copy the archive <filename>sqljdbc.jar</filename> from the <filename>sqljdbc_1.2</filename> distribution to the <filename>lib</filename> directory in the default server configuration (assuming that is the server configuration you’re running).
+		</para>
+		<para>
+			Then create a text file in the <literal>deploy</literal> directory called <literal>mssql-ds.xml</literal> with the following datasource descriptor :
+<programlisting><![CDATA[ 
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+  <local-tx-datasource>
+  <jndi-name>DefaultDS</jndi-name>
+  <connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=pubs</connection-url>
+  <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
+  <user-name>sa</user-name>
+  <password>jboss</password>
+  <check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
+  <metadata>
+	  <type-mapping>MS SQLSERVER2000</type-mapping>
+  </metadata>
+  </local-tx-datasource>
+</datasources> ]]>		
+</programlisting>
+
+The datasource is pointing at a database “pubs” provided by default with MS SQL Server 2000.
+</para>
+<para>
+Remember to update the connection url attributes as well as the username/password combination to match your environment setup.
+
+</para>
+		
+<section id="testing_the_datasource"><title>Testing the datasource</title>
+	<para>Using the test client described in <xref linkend="creating_a_jdbc_client"/>, you may now verify the proper installation of your datasource.
+	</para>
+</section>
+	</section>
+</section>	
+	
+
+<section id="configuring_jbossmessaging_persistence_manager"><title>Configuring JBoss Messaging Persistence Manager</title>
+	<para>
+		The persistence manager of JBoss Messaging uses the default datasource to create tables to store messages, transaction data and other indexes. Configuration of "persistence" is grouped in <filename>xxx-persistence-service.xml</filename> files. JBoss Application Server ships with a default <filename>hsqldb-persistence-service.xml</filename> file, which configures the Messaging server to use the Hypersonic database instance that ships by default with the JBoss Application Server.
+	</para>
+	<para>
+		You can view the <filename>hsqldb-persistence-service.xml</filename> file in  configurations based on the <emphasis>all</emphasis> or <emphasis>default</emphasis> configurations:
+		
+		<screen>&lt;JBoss_Home&gt;/server/all/deploy/messaging/hsqldb-persistence-service.xml  and
+			&lt;JBoss_Home&gt;/server/default/deploy/messaging/hsqldb-persistence-service.xml</screen>
+		
+	</para>
+	
+	
+	<warning><title>Warning</title>
+		<para>Please note that the Hypersonic database is not recommended for production environments due to its limited support for transaction isolation and its low reliability under high load</para>
+	</warning>
+	
+	<para>
+		More information on configuring JBoss Messaging can be found in the <ulink url="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/beta500/html-single/index.html#d0e3471">JBoss AS Configuration Guide</ulink>.
+		
+	</para>
+	
+	
+</section>	
+
+
+<section id="creating_a_jdbc_client"><title>Creating a JDBC client</title>
+	<para>
+		When testing a newly configured datasource we suggest using some very basic JDBC client code embedded in a JSP page.
+		First of all, you should create an exploded WAR archive under the deploy directory which is simply a folder named "<literal>jdbcclient.war</literal>". 
+In this folder, create a text document named client.jsp and paste the code below:
+<programlisting><![CDATA[
+<%@page contentType="text/html"
+ import="java.util.*,javax.naming.*,javax.sql.DataSource,java.sql.*"
+ %>
+ <%
+   
+  DataSource ds = null;
+  Connection con = null; 
+  PreparedStatement pr = null; 
+  InitialContext ic; 
+  try {
+  ic = new InitialContext();
+  ds = (DataSource)ic.lookup( "java:/DefaultDS" );
+  con = ds.getConnection(); 
+  pr = con.prepareStatement("SELECT USERID, PASSWD FROM JMS_USERS");
+  ResultSet rs = pr.executeQuery();
+  while (rs.next()) {
+  out.println("<br> " +rs.getString("USERID") + " | " +rs.getString("PASSWD")); 
+  }
+  rs.close();
+  pr.close();
+  }catch(Exception e){
+  out.println("Exception thrown " +e); 
+  }finally{
+  if(con != null){
+  con.close();
+ }      
+}]]> %> </programlisting>
+
+Open up a web browser and hit the url: <ulink url="http://localhost:8080/jdbcclient/client.jsp"/>.
+A list of users and password should show up as a result of the jdbc query:
+<screen>
+dynsub | dynsub 
+guest | guest 
+j2ee | j2ee 
+john | needle 
+nobody | nobody 	
+</screen>
+      
+	</para>
+</section>
+	
+</chapter>
+

Added: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml	                        (rev 0)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml	2009-07-30 03:51:01 UTC (rev 91808)
@@ -0,0 +1,395 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<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>
+		If you are new to Seam, you can find more introductory information from the following url and book:
+<itemizedlist>
+	<listitem>
+		<para>
+				<ulink url="http://docs.jboss.com/seam/2.0.0.GA/reference/en/html_single/">The Seam Reference Guide</ulink>.
+			</para>
+		</listitem>
+		<listitem>
+			<para>
+				<emphasis>Beginning JBoss Seam</emphasis> by Joseph Faisal Nusairat, Apress 2007.
+			</para>
+		</listitem>
+	
+	</itemizedlist>
+	
+	</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>
+	
+	
+	
+	<section id="Using_Seam_Data_Model">
+		<title>
+			Data Model
+		</title>
+		
+		<para>
+			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 entity 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 <ulink url="http://docs.jboss.com/seam/2.0.0.GA/reference/en/html_single/">The Seam Reference Guide</ulink>.
+		</para>
+	</section>
+</chapter>




More information about the jboss-cvs-commits mailing list