[jboss-cvs] JBossAS SVN: r82224 - in projects/ejb3/trunk/docs/tutorial: guide and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 11 05:17:21 EST 2008


Author: jaikiran
Date: 2008-12-11 05:17:21 -0500 (Thu, 11 Dec 2008)
New Revision: 82224

Added:
   projects/ejb3/trunk/docs/tutorial/guide/
   projects/ejb3/trunk/docs/tutorial/guide/en/
   projects/ejb3/trunk/docs/tutorial/guide/en/master.xml
   projects/ejb3/trunk/docs/tutorial/guide/en/modules/
   projects/ejb3/trunk/docs/tutorial/guide/en/modules/installing.xml
   projects/ejb3/trunk/docs/tutorial/guide/en/modules/stateless.xml
   projects/ejb3/trunk/docs/tutorial/guide/en/modules/tutorials.xml
   projects/ejb3/trunk/docs/tutorial/guide/pom.xml
Log:
JBoss EJB3 Tutorials User Guide - initial version

Added: projects/ejb3/trunk/docs/tutorial/guide/en/master.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/guide/en/master.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/guide/en/master.xml	2008-12-11 10:17:21 UTC (rev 82224)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN" "../../../../docbook-support/support/docbook-dtd/docbookx.dtd" [
+<!ENTITY installing          SYSTEM "modules/installing.xml">
+<!ENTITY stateless          SYSTEM "modules/stateless.xml">
+]>
+<book lang="en">
+  <bookinfo>
+    <title>JBoss EJB3 Tutorials</title>
+    <subtitle>A guide for using EJB3 on JBoss</subtitle>
+    <releaseinfo>1.0</releaseinfo>
+  </bookinfo>
+  <toc/>
+ <preface id="target" revision="1">
+    <title>Target Audience</title>
+    <para>This tutorial is meant for EJB3 application developers on JBoss Application Server. The tutorial walks you through the EJB 3.0 features and how they deploy to JBoss.  Please check the <xref linkend="Installation">install guide</xref> for system requirements.</para>
+  </preface>
+&installing;&stateless;
+</book>

Added: projects/ejb3/trunk/docs/tutorial/guide/en/modules/installing.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/guide/en/modules/installing.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/guide/en/modules/installing.xml	2008-12-11 10:17:21 UTC (rev 82224)
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="Installation">
+	<title>Installation</title>
+
+
+		<section id="JBossAS5">
+			<title>JBoss Application Server 5.x</title>
+			<para>
+You must set the JBOSS_HOME environment variable to run any of the tutorial examples. 
+
+				<programlisting>
+Unix:    $ export JBOSS_HOME=&lt;where your jboss 5.x distribution is&gt;
+Windows: $ set JBOSS_HOME=&lt;where your jboss 5.x distribution is&gt;
+				</programlisting>
+
+At the time of writing this tutorial, the latest stable version JBossAS 5.0 GA was used. To run these examples you need JBossAS 5.0 GA or higher version (if available). JBossAS can be downloaded from <ulink url="http://www.jboss.org/jbossas/downloads/">here</ulink>.  
+			</para>
+
+		</section>
+
+		<section id="AntOrMaven2">
+			<title>Ant or Maven2</title>
+			<para>
+The tutorials can be built with either Ant (version 1.7) or Maven (version 2.0.9). Depending on which build tool you want to use, you will have to download it from their sites.
+			</para>
+		</section>	
+
+</chapter>
+	
+

Added: projects/ejb3/trunk/docs/tutorial/guide/en/modules/stateless.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/guide/en/modules/stateless.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/guide/en/modules/stateless.xml	2008-12-11 10:17:21 UTC (rev 82224)
@@ -0,0 +1,72 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="Stateless Beans">
+	<title>Introduction to EJB3 Stateless Beans</title>
+
+	<para>
+It is very easy to create a Stateless Bean with EJB 3.0.  All bean types are homeless in EJB 3.0 so all you have to do to
+create a Stateless bean is to create a bean class and have it implement at least one interface. Take a look at <ulink url="http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/stateless/src/org/jboss/tutorial/stateless/bean/CalculatorBean.java">CalculatorBean.java</ulink>
+	</para>
+
+	<para>
+The first thing to notice is that the class is tagged as <literal>@Stateless</literal>.  This marks the class as a stateless bean and
+the deployer will deploy that class as a stateless bean EJB container.
+	</para>
+
+	<para>
+CalculatorBean also implements two interfaces.  One is the remote interface of the EJB the other is the local interface.
+	</para>
+
+	<para>
+Take a look at <ulink url="http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/stateless/src/org/jboss/tutorial/stateless/bean/CalculatorRemote.java">CalculatorRemote.java</ulink>.  To define this as the remote interface of Calculator bean
+you either annotate the bean class and specify what the remote interfaces are, or you annotate each remote interface the bean class
+implements with @javax.ejb.Remote. only need to annotate the bean class with @javax.ejb.Remote.  Similar for <ulink url="http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/stateless/src/org/jboss/tutorial/stateless/bean/CalculatorLocal.java">CalculatorLocal.java</ulink> as you need to annotate the bean class with <literal>@javax.ejb.Local</literal> for it to be the local interface of the CalculatorBean.
+	</para>
+
+	<para>
+		<sect4>
+JNDI Bindings
+		</sect4>
+The Calculator bean will have two JNDI bindings for the remote and Local interface.  By default, JBoss will use ejbName/local and ejbName/remote for the local and
+remote interfaces, respectively.
+	</para>
+
+	<para>
+		<sect4>
+Client
+		</sect4>
+Open up <ulink link="http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/stateless/src/org/jboss/tutorial/stateless/client/Client.java">Client.java</ulink>.  You'll see that it looks up the stateless bean under "ejbName/remote". Also notice that there is no Home interface and you can begin executing on the stateless bean right away.
+
+	</para>
+
+	<para>
+		<sect4>
+Building and Running
+		</sect4>
+		
+		<note>
+			<para>
+To build and run the example, make sure you have installed JBoss 5.x and have JBoss running. See the <xref linkend="JBossAS5">installation section</xref> for details.
+			</para>
+		</note>
+
+		<sect5>
+Ant Users:
+		</sect5>
+	<programlisting>
+$ ant
+$ ant run
+
+	</programlisting>
+
+	<sect5>
+Maven Users:
+	</sect5>
+	
+	<programlisting>
+$ mvn clean install
+	</programlisting>
+
+	</para>
+</chapter>
+	
+

Added: projects/ejb3/trunk/docs/tutorial/guide/en/modules/tutorials.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/guide/en/modules/tutorials.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/guide/en/modules/tutorials.xml	2008-12-11 10:17:21 UTC (rev 82224)
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!ENTITY stateless          SYSTEM "stateless.xml">
+<chapter id="Tutorials">
+	<title>Tutorials</title>
+	<section id="stateless">
+		<title>Stateless Session Beans</title>
+&stateless;
+	</section>
+
+</chapter>
+	
+

Added: projects/ejb3/trunk/docs/tutorial/guide/pom.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/guide/pom.xml	                        (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/guide/pom.xml	2008-12-11 10:17:21 UTC (rev 82224)
@@ -0,0 +1,19 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.jboss</groupId>
+        <artifactId>documentation</artifactId>
+        <version>1.0</version>
+    </parent>
+    
+    <groupId>org.jboss.ejb3.tutorial.documentation</groupId>
+    <artifactId>jboss-ejb3-tutorial-user-guide-${translation}</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>jdocbook</packaging>
+    <name>JBoss EJB3 Tutorials</name>
+
+</project>




More information about the jboss-cvs-commits mailing list