geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r917744 [30/31] - in /websites/production/geronimo/content: GMOxDOC20/ GMOxDOC20/geronimo-eclipse-plugin-installation-instructions.data/ cache/
Date Tue, 29 Jul 2014 00:52:21 GMT
Modified: websites/production/geronimo/content/GMOxDOC20/using-jndi-in-geronimo-20.html
==============================================================================
--- websites/production/geronimo/content/GMOxDOC20/using-jndi-in-geronimo-20.html (original)
+++ websites/production/geronimo/content/GMOxDOC20/using-jndi-in-geronimo-20.html Tue Jul 29 00:52:18 2014
@@ -95,7 +95,7 @@
 
       <div class="pagecontent">
         <div class="wiki-content">
-          <div class="wiki-content maincontent"><h1><a shape="rect" name="UsingJNDIinGeronimo2.0-Introduction"></a>Introduction</h1>
+          <div class="wiki-content maincontent"><h1 id="UsingJNDIinGeronimo2.0-Introduction">Introduction</h1>
 
 <p>Java Naming and Directory Interface (JNDI) is an interface to connection pools in the Apache Geronimo application server. Through this interface, developers have access to all Java objects, including Enterprise Java Beans (EJBs). </p>
 
@@ -103,7 +103,7 @@
 
 <p>However, the mentioned article is written for Geronimo 1.x. This sample tutorial will demonstrate something similar but using EJB 3.0.</p>
 
-<h1><a shape="rect" name="UsingJNDIinGeronimo2.0-ApplicationOverview"></a>Application Overview</h1>
+<h1 id="UsingJNDIinGeronimo2.0-ApplicationOverview">Application Overview</h1>
 
 <p>The CustomerService application will make use of EJBs to access a database and spit it back to the screen. The point of this sample is to show that you can use JNDI to access an EJB. The overview of the structural content of the EAR file is given in the following example:</p>
 
@@ -123,19 +123,19 @@
 </pre>
 </div></div>
 
-<p><b>persistence.xml</b> references certain Entity Beans and maps them to use certain database pools. In this case, the entity bean Customer is using the database pool <b>CustomerServicePool</b>.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent">
+<p><strong>persistence.xml</strong> references certain Entity Beans and maps them to use certain database pools. In this case, the entity bean Customer is using the database pool <strong>CustomerServicePool</strong>.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;persistence    xmlns="http://java.sun.com/xml/ns/persistence"
-                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
-                xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
-    &lt;persistence-unit name="CustomerPU"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;persistence    xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot;
+                xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; version=&quot;1.0&quot;
+                xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd&quot;&gt;
+    &lt;persistence-unit name=&quot;CustomerPU&quot;&gt;
         &lt;description&gt;Entity Beans for Customer&lt;/description&gt;
         &lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;
         &lt;class&gt;com.service.customer.ejb.Customer&lt;/class&gt;
         &lt;properties&gt;
-            &lt;property name="openjpa.jdbc.SynchronizeMappings" value="false"/&gt;
+            &lt;property name=&quot;openjpa.jdbc.SynchronizeMappings&quot; value=&quot;false&quot;/&gt;
         &lt;/properties&gt;
         &lt;jta-data-source&gt;CustomerServicePool&lt;/jta-data-source&gt;
         &lt;non-jta-data-source&gt;CustomerServicePool&lt;/non-jta-data-source&gt;
@@ -144,15 +144,15 @@
 ]]></script>
 </div></div>
 
-<p><b>openejb-jar.xml</b> is here because we are using OpenEJB. Nothing special is really defined in this file because we do not have any defined MDBs.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent">
+<p><strong>openejb-jar.xml</strong> is here because we are using OpenEJB. Nothing special is really defined in this file because we do not have any defined MDBs.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 
-&lt;openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
-             xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
-             xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
-             xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"&gt;
+&lt;openejb-jar xmlns=&quot;http://www.openejb.org/xml/ns/openejb-jar-2.1&quot;
+             xmlns:naming=&quot;http://geronimo.apache.org/xml/ns/naming-1.1&quot;
+             xmlns:security=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+             xmlns:dep=&quot;http://geronimo.apache.org/xml/ns/deployment-1.2&quot;&gt;
    &lt;dep:environment&gt;
       &lt;dep:moduleId&gt;
          &lt;dep:groupId&gt;${pom.groupId}&lt;/dep:groupId&gt;
@@ -170,14 +170,14 @@
 ]]></script>
 </div></div>
 
-<p><b>web.xml</b> references the EJB that was created in <b>ProcessCustomerSessionBean.java.</b> By doing this we are allowing the contents inside the WAR to use this EJB. </p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>web.xml</b></div><div class="codeContent panelContent">
+<p><strong>web.xml</strong> references the EJB that was created in <strong>ProcessCustomerSessionBean.java.</strong> By doing this we are allowing the contents inside the WAR to use this EJB. </p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>web.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
-&lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
-         version="2.4"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
+&lt;web-app xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
+         xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+         xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;
+         version=&quot;2.4&quot;&gt;
 
   &lt;welcome-file-list&gt;
     &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
@@ -192,11 +192,11 @@
 ]]></script>
 </div></div>
 
-<p><b>geronimo-application.xml</b> specifies the module's information and the context-root in which this web application resides. Additionally, it specifies the database pool plan that we want to create while deploying along with the connector that is needed to deploy this plan into Geronimo. </p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent">
+<p><strong>geronimo-application.xml</strong> specifies the module's information and the context-root in which this web application resides. Additionally, it specifies the database pool plan that we want to create while deploying along with the connector that is needed to deploy this plan into Geronimo. </p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"&gt;
-   &lt;dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"&gt;
+&lt;application xmlns=&quot;http://geronimo.apache.org/xml/ns/j2ee/application-1.1&quot;&gt;
+   &lt;dep:environment xmlns:dep=&quot;http://geronimo.apache.org/xml/ns/deployment-1.1&quot;&gt;
       &lt;dep:moduleId&gt;
          &lt;dep:groupId&gt;${pom.groupId}&lt;/dep:groupId&gt;
          &lt;dep:artifactId&gt;${pom.artifactId}&lt;/dep:artifactId&gt;
@@ -218,12 +218,12 @@
 ]]></script>
 </div></div>
 
-<p><b>application.xml</b> specifies a connector in which the EAR will use when trying to deploy the embedded database pool (<b>CustomerServicePool.xml</b>).</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>application.xml</b></div><div class="codeContent panelContent">
+<p><strong>application.xml</strong> specifies a connector in which the EAR will use when trying to deploy the embedded database pool (<strong>CustomerServicePool.xml</strong>).</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>application.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;application xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
+xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd&quot; version=&quot;5&quot;&gt;
   &lt;description&gt;Geronimo Sample EAR for CustomerService&lt;/description&gt;
   &lt;display-name&gt;Geronimo Sample EAR for CustomerService&lt;/display-name&gt;
   &lt;module&gt;
@@ -242,8 +242,8 @@ xsi:schemaLocation="http://java.sun.com/
 ]]></script>
 </div></div>
 
-<p><b>CustomerServiceJavaBean.java</b> uses JNDI to look up the <b>ProcessCustomerSessionBean</b> EJB.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CustomerServiceJavaBean.java</b></div><div class="codeContent panelContent">
+<p><strong>CustomerServiceJavaBean.java</strong> uses JNDI to look up the <strong>ProcessCustomerSessionBean</strong> EJB.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CustomerServiceJavaBean.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package com.service.customer.web;
 
@@ -264,14 +264,14 @@ public class CustomerServiceJavaBean
    {
       InitialContext initial = null;
 
-      bundle = ResourceBundle.getBundle("customer", Locale.getDefault(), CustomerServiceJavaBean.class.getClassLoader());
-      String jndiName = bundle.getString("jndi.process.ejb");
+      bundle = ResourceBundle.getBundle(&quot;customer&quot;, Locale.getDefault(), CustomerServiceJavaBean.class.getClassLoader());
+      String jndiName = bundle.getString(&quot;jndi.process.ejb&quot;);
 
       try
       {
          initial = new InitialContext();
 		 process = (ProcessCustomerSessionLocal) initial.lookup(jndiName.trim());
-         System.out.println("Successful looking up: '" + jndiName.trim() + "'");
+         System.out.println(&quot;Successful looking up: &#39;&quot; + jndiName.trim() + &quot;&#39;&quot;);
       } // end try
 
       catch (Exception e)
@@ -301,8 +301,8 @@ public class CustomerServiceJavaBean
 ]]></script>
 </div></div>
 
-<p><b>ProcessCustomerSessionBean.java</b> implements <b>ProcessCustomerSessionLocal</b> by grabbing an EntityManagerFactory by making use of the <b>persistence.xml.</b> It grabs it by using the <b>@PersistenceUnit</b> annotation. Since there is only one persistence unit defined in persistence.xml, we do not need to specify any additional parameters in the annotation.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>ProcessCustomerSessionBean.java</b></div><div class="codeContent panelContent">
+<p><strong>ProcessCustomerSessionBean.java</strong> implements <strong>ProcessCustomerSessionLocal</strong> by grabbing an EntityManagerFactory by making use of the <strong>persistence.xml.</strong> It grabs it by using the <strong>@PersistenceUnit</strong> annotation. Since there is only one persistence unit defined in persistence.xml, we do not need to specify any additional parameters in the annotation.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>ProcessCustomerSessionBean.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package com.service.customer.ejb;
 
@@ -331,7 +331,7 @@ public class ProcessCustomerSessionBean 
 
     public List&lt;Customer&gt; findAllCustomers() {
         EntityManager em = emf.createEntityManager();
-        String query = "SELECT * FROM customer";
+        String query = &quot;SELECT * FROM customer&quot;;
         List&lt;Customer&gt; customerList =
             (List&lt;Customer&gt;)em.createNativeQuery(query, Customer.class).getResultList();
         em.close();
@@ -340,7 +340,7 @@ public class ProcessCustomerSessionBean 
 
     public Customer findCustomer(String key) {
         EntityManager em = emf.createEntityManager();
-        String query = "SELECT * FROM customer WHERE id='"+key+"'";
+        String query = &quot;SELECT * FROM customer WHERE id=&#39;&quot;+key+&quot;&#39;&quot;;
         List&lt;Customer&gt; customerList =
             (List&lt;Customer&gt;)em.createNativeQuery(query, Customer.class).getResultList();
         if(customerList.size() == 1) {
@@ -353,9 +353,9 @@ public class ProcessCustomerSessionBean 
 ]]></script>
 </div></div>
 
-<p><b>ProcessCustomerSessionLocal.java</b> defines the business methods that is associated with this bean.</p>
+<p><strong>ProcessCustomerSessionLocal.java</strong> defines the business methods that is associated with this bean.</p>
 
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>ProcessCustomerSessionLocal.java</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>ProcessCustomerSessionLocal.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package com.service.customer.ejb;
 
@@ -369,9 +369,9 @@ public interface ProcessCustomerSessionL
 ]]></script>
 </div></div>
 
-<p><b>Customer.java</b> is the entity bean that represents the <b>Customer</b> table in the database. By using <b>@Entity</b>, <b>@Table(name = "customer")</b>, and <b>@Id</b> it tells OpenEJB that this is an entity bean, which is representative of the table "customer" and has "customerId" as the primary key. By using these annotations no other configuration is needed inside <b>openejb-jar.xml</b> (no ejb-jar.xml is needed at all). </p>
+<p><strong>Customer.java</strong> is the entity bean that represents the <strong>Customer</strong> table in the database. By using <strong>@Entity</strong>, <strong>@Table(name = "customer")</strong>, and <strong>@Id</strong> it tells OpenEJB that this is an entity bean, which is representative of the table "customer" and has "customerId" as the primary key. By using these annotations no other configuration is needed inside <strong>openejb-jar.xml</strong> (no ejb-jar.xml is needed at all). </p>
 
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Customer.java</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Customer.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package com.service.customer.ejb;
 
@@ -381,7 +381,7 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 @Entity
-@Table(name = "customer")
+@Table(name = &quot;customer&quot;)
 public class Customer implements Serializable {
     private String customerId;
     private String fullName;
@@ -436,48 +436,46 @@ public class Customer implements Seriali
 ]]></script>
 </div></div>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-CustomerServiceDatabase"></a>Customer Service Database</h2>
+<h2 id="UsingJNDIinGeronimo2.0-CustomerServiceDatabase">Customer Service Database</h2>
 
-<p>The database that will be used to demonstrate this application is the built-in Derby database. The name of the database will be <b>CustomerDB</b> and it consists of one table:</p>
+<p>The database that will be used to demonstrate this application is the built-in Derby database. The name of the database will be <strong>CustomerDB</strong> and it consists of one table:</p>
 
-<div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Table Name</th><th colspan="1" rowspan="1" class="confluenceTh"> Fields</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">CUSTOMER</td><td colspan="1" rowspan="1" class="confluenceTd">customerId (PRIMARY KEY)<br clear="none">
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Table Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Fields</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>CUSTOMER</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>customerId (PRIMARY KEY)<br clear="none">
 fullname<br clear="none">
 emailaddress<br clear="none">
-interests</td></tr></tbody></table>
-</div>
+interests</p></td></tr></tbody></table></div>
 
 
 <p>The CUSTOMER table stores information about one customer.</p>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-Toolsused"></a>Tools used</h2>
+<h2 id="UsingJNDIinGeronimo2.0-Toolsused">Tools used</h2>
 <p>The tools used for developing and building the Banking applications are:</p>
 
-<h3><a shape="rect" name="UsingJNDIinGeronimo2.0-ApacheDerby"></a>Apache Derby</h3>
+<h3 id="UsingJNDIinGeronimo2.0-ApacheDerby">Apache Derby</h3>
 <p>Apache Derby, an Apache DB subproject, is a relational database implemented in Java. Its footprint is so small you can easily embed it in any Java-based solution. In addition to its embedded framework, Derby supports a more familiar client/server framework with the Derby Network Server.<br clear="none">
 <a shape="rect" class="external-link" href="http://db.apache.org/derby/index.html">http://db.apache.org/derby/index.html</a></p>
 
-<h3><a shape="rect" name="UsingJNDIinGeronimo2.0-ApacheMaven2"></a>Apache Maven 2</h3>
+<h3 id="UsingJNDIinGeronimo2.0-ApacheMaven2">Apache Maven 2</h3>
 <p>Maven is a popular open source build tool for enterprise Java projects, designed to take much of the hard work out of the build process. Maven uses a declarative approach, where the project structure and contents are described, rather than the task-based approach used in Ant or in traditional make files, for example. This helps enforce company-wide development standards and reduces the time needed to write and maintain build scripts. The declarative, lifecycle-based approach used by Maven 1 is, for many, a radical departure from more traditional build techniques, and Maven 2 goes even further in this regard. Maven 2 can be download from the following URL:<br clear="none">
 <a shape="rect" class="external-link" href="http://maven.apache.org">http://maven.apache.org</a></p>
 
-<h1><a shape="rect" name="UsingJNDIinGeronimo2.0-Configuring%2CBuildingandDeployingtheSampleApplication"></a>Configuring, Building and Deploying the Sample Application</h1>
+<h1 id="UsingJNDIinGeronimo2.0-Configuring,BuildingandDeployingtheSampleApplication">Configuring, Building and Deploying the Sample Application</h1>
 <p>Download the CustomerService application from the following link:<br clear="none">
-<a shape="rect" href="using-jndi-in-geronimo-20.data/CustomerService_.zip?version=1&amp;modificationDate=1185448944000">CustomerService</a></p>
+<a shape="rect" href="using-jndi-in-geronimo-20.data/CustomerService_.zip?version=1&amp;modificationDate=1185448944000&amp;api=v2">CustomerService</a></p>
 
-<p>After decompressing the given file, the <b>CustomerService</b> directory will be created.</p>
+<p>After decompressing the given file, the <strong>CustomerService</strong> directory will be created.</p>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-SourceCode"></a>Source Code</h2>
+<h2 id="UsingJNDIinGeronimo2.0-SourceCode">Source Code</h2>
 
 <p>You can checkout the source code of this sample from SVN:</p>
 
 <p>svn checkout <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/CustomerService">http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/CustomerService</a></p>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-Configuring"></a>Configuring</h2>
+<h2 id="UsingJNDIinGeronimo2.0-Configuring">Configuring</h2>
 <p>Configuration of the application consists of creating the database and defining the connection pool to access it. </p>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-CreatingandPopulatingDatabase"></a>Creating and Populating Database</h2>
-<p>After starting Apache Geronimo log into the console and follow the given steps to create <b>CustomerDB.</b></p>
+<h2 id="UsingJNDIinGeronimo2.0-CreatingandPopulatingDatabase">Creating and Populating Database</h2>
+<p>After starting Apache Geronimo log into the console and follow the given steps to create <strong>CustomerDB.</strong></p>
 
 <div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div class="preformattedHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CustomerService.sql</b></div><div class="preformattedContent panelContent">
 <pre>create table customer (
@@ -492,20 +490,20 @@ insert into customer values ('b100','Jan
 </pre>
 </div></div>
 
-<ol><li>Select <b>DB Manager</b> link from the <b>Console Navigation</b> in the left.</li><li>Give the database name as <b>CustomerDB</b> and click <b>Create</b> button.</li><li>Select <b>CustomerDB</b> to the <b>Use DB</b> field.</li><li>Open <b>CustomerService.sql</b> in the <b>CustomerService</b> directory from a text editor.</li><li>Paste the content <b>CustomerService.sql</b> to the <b>SQL Commands</b> text area and press <b>Run SQL</b> button.</li></ol>
+<ol><li>Select <strong>DB Manager</strong> link from the <strong>Console Navigation</strong> in the left.</li><li>Give the database name as <strong>CustomerDB</strong> and click <strong>Create</strong> button.</li><li>Select <strong>CustomerDB</strong> to the <strong>Use DB</strong> field.</li><li>Open <strong>CustomerService.sql</strong> in the <strong>CustomerService</strong> directory from a text editor.</li><li>Paste the content <strong>CustomerService.sql</strong> to the <strong>SQL Commands</strong> text area and press <strong>Run SQL</strong> button.</li></ol>
 
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-Building"></a>Building</h2>
-<p>Use a command prompt to navigate into the <b>CustomerService</b> directory and just give <b>mvn clean install site</b> command to build. It will create the <b>CustomerService-ear-2.0-SNAPSHOT.ear</b> under the <b>CustomerService</b> folder. Now, you are ready to deploy bank application in the Geronimo Application server. </p>
+<h2 id="UsingJNDIinGeronimo2.0-Building">Building</h2>
+<p>Use a command prompt to navigate into the <strong>CustomerService</strong> directory and just give <strong>mvn clean install site</strong> command to build. It will create the <strong>CustomerService-ear-2.0-SNAPSHOT.ear</strong> under the <strong>CustomerService</strong> folder. Now, you are ready to deploy bank application in the Geronimo Application server. </p>
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-DeployingtheApplication"></a>Deploying the Application</h2>
+<h2 id="UsingJNDIinGeronimo2.0-DeployingtheApplication">Deploying the Application</h2>
 <p>Deploying sample application is pretty straight forward as we are going to use the Geronimo Console. </p>
-<ol><li>Scroll down to <b>Deploy New</b> from the <b>Console Navigation</b> panel.</li><li>Load <b>CustomerService-ear-2.0-SNAPSHOT.ear</b> from <b>CustomerService</b> folder in to the <b>Archive</b> input box.</li><li>Press <b>Install</b> button to deploy application in the server.</li></ol>
+<ol><li>Scroll down to <strong>Deploy New</strong> from the <strong>Console Navigation</strong> panel.</li><li>Load <strong>CustomerService-ear-2.0-SNAPSHOT.ear</strong> from <strong>CustomerService</strong> folder in to the <strong>Archive</strong> input box.</li><li>Press <strong>Install</strong> button to deploy application in the server.</li></ol>
 
 
-<h2><a shape="rect" name="UsingJNDIinGeronimo2.0-CustomerServiceWebApplication"></a>Customer Service Web Application</h2>
+<h2 id="UsingJNDIinGeronimo2.0-CustomerServiceWebApplication">Customer Service Web Application</h2>
 <p>To test the sample web application open and browse and type <a shape="rect" class="external-link" href="http://localhost:8080/service" rel="nofollow">http://localhost:8080/service</a>. It will forward you to the index page of the application which has a direct link to view the Customers. <br clear="none">
-<span class="image-wrap" style="display: block; text-align: center"><img src="using-jndi-in-geronimo-20.data/customerservice.bmp" style="border: 0px solid black"></span></p></div>
+<img class="confluence-embedded-image image-center" src="https://cwiki.apache.org/confluence/download/attachments/62209/customerservice.bmp?version=1&amp;modificationDate=1185188093000&amp;api=v2" data-image-src="/confluence/download/attachments/62209/customerservice.bmp?version=1&amp;modificationDate=1185188093000&amp;api=v2"></p></div>
         </div>
 
         

Modified: websites/production/geronimo/content/GMOxDOC20/using-some-of-ejb-30-functionalities.html
==============================================================================
--- websites/production/geronimo/content/GMOxDOC20/using-some-of-ejb-30-functionalities.html (original)
+++ websites/production/geronimo/content/GMOxDOC20/using-some-of-ejb-30-functionalities.html Tue Jul 29 00:52:18 2014
@@ -23,6 +23,7 @@
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
   
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
@@ -95,26 +96,41 @@
 
       <div class="pagecontent">
         <div class="wiki-content">
-          <div class="wiki-content maincontent"><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
+          <div class="wiki-content maincontent">    
+<div class="atb-scrollbar-macro">
+    <div class="prev">
+        <a shape="rect" href="using-jndi-in-geronimo-20.html" rel="prev">
+                                    <span class="aui-icon aui-icon-small atb-icon-arrow-left">Previous</span>
+                                <span class="title">Using JNDI in Geronimo 2.0</span>
+            </a>
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="using-jndi-in-geronimo-20.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="using-jndi-in-geronimo-20.html">Using JNDI in Geronimo 2.0</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="sample-applications.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="sample-applications.html">Sample applications</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="very-simple-entity-ejb-example.html">Very simple Entity EJB example</a></td><td colspan="1" rowspan="1" class="S
 crollbarNextIcon"><a shape="rect" href="very-simple-entity-ejb-example.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
+    </div>
+    <div class="parent">
+                    <a shape="rect" href="sample-applications.html" rel="parent">
+                                            <span class="aui-icon aui-icon-small atb-icon-arrow-up">Up</span>
+                                        <span class="title">Sample applications</span>
+                </a>
+
+            </div>
+    <div class="next">
+        <a shape="rect" href="very-simple-entity-ejb-example.html" rel="next">
+                <span class="title">Very simple Entity EJB example</span>
+                                    <span class="aui-icon aui-icon-small atb-icon-arrow-right">Next</span>
+                            </a>
+
+    </div>
+</div>
 
-<h1><a shape="rect" name="UsingsomeofEJB3.0functionalities-SampleofaStatelessSessionBeaninEJB3.0"></a>Sample of a Stateless Session Bean in EJB 3.0</h1>
+<h1 id="UsingsomeofEJB3.0functionalities-SampleofaStatelessSessionBeaninEJB3.0">Sample of a Stateless Session Bean in EJB 3.0</h1>
 
 <p>This sample will demonstrate the following new features from EJB 3.0</p>
 <ol><li>Elimination of the requirement for EJB component interfaces for session beans. The required business interface for a session bean can be a plain Java interface rather than an EJBObject, EJBLocalObject, or java.rmi.Remote interface.</li><li>Elimination of the requirement for home interfaces for session beans.</li><li>Encapsulation of environmental dependencies and JNDI access through the use of annotations, dependency injection mechanisms, and simple lookup mechanisms.</li><li>Introduction of Java metadata annotations to be used as an alternative to deployment descriptors.</li></ol>
 
 
-<h2><a shape="rect" name="UsingsomeofEJB3.0functionalities-CalculatorImplementation"></a>Calculator Implementation</h2>
+<h2 id="UsingsomeofEJB3.0functionalities-CalculatorImplementation">Calculator Implementation</h2>
 
-<p><b>Calculator.java</b>: A stateless session bean that implements a simple java interface instead of an EJB component interface like EJBObject, EJBLocalObject or java.rmi.Remote. By annotating this class as a @Stateless session there is no need for a deployment descriptor to describe it separately. This class implements both a local and remote business interface, namely CalculatorLocal and CalculatorRemote.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Calculator.java</b></div><div class="codeContent panelContent">
+<p><strong>Calculator.java</strong>: A stateless session bean that implements a simple java interface instead of an EJB component interface like EJBObject, EJBLocalObject or java.rmi.Remote. By annotating this class as a @Stateless session there is no need for a deployment descriptor to describe it separately. This class implements both a local and remote business interface, namely CalculatorLocal and CalculatorRemote.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Calculator.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.slsb.calculator;
 
@@ -134,8 +150,8 @@ public class Calculator implements Calcu
 }
 ]]></script>
 </div></div>
-<p><b>CalculatorLocal.java</b>: Since this is a local business interface, it is optional that the coder marks this class with a @Local annotation. A business interface which is not annotated with @Local or @Remote is assumed to be Local.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorLocal.java</b></div><div class="codeContent panelContent">
+<p><strong>CalculatorLocal.java</strong>: Since this is a local business interface, it is optional that the coder marks this class with a @Local annotation. A business interface which is not annotated with @Local or @Remote is assumed to be Local.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorLocal.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.slsb.calculator;
 
@@ -147,8 +163,8 @@ public interface CalculatorLocal {
 }
 ]]></script>
 </div></div>
-<p><b>CalculatorRemote.java</b>: Since this is a remote business interface, it must be annotated with the @Remote annotation.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorRemote.java</b></div><div class="codeContent panelContent">
+<p><strong>CalculatorRemote.java</strong>: Since this is a remote business interface, it must be annotated with the @Remote annotation.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorRemote.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.slsb.calculator;
 
@@ -164,8 +180,8 @@ public interface CalculatorRemote {
 }
 ]]></script>
 </div></div>
-<p><b>CalculatorServlet.java</b>: This is a servlet to process the form on the jsp page. It uses the stateless session bean Calculator to do some computation and returns the result. Note that CalculatorLocal is being annotated with the @EJB annotation. The ejb container will route every request to different bean instances. Note: a stateful session bean must be declared at the type level, whereas a stateless session bean may be declared at any level.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorServlet.java</b></div><div class="codeContent panelContent">
+<p><strong>CalculatorServlet.java</strong>: This is a servlet to process the form on the jsp page. It uses the stateless session bean Calculator to do some computation and returns the result. Note that CalculatorLocal is being annotated with the @EJB annotation. The ejb container will route every request to different bean instances. Note: a stateful session bean must be declared at the type level, whereas a stateless session bean may be declared at any level.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>CalculatorServlet.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.calculator;
 
@@ -187,23 +203,23 @@ public class CalculatorServlet extends H
     throws ServletException, IOException {
 
         try {
-            String firstNumber = req.getParameter("firstNumber");
-            String secondNumber = req.getParameter("secondNumber");
-            String operation = req.getParameter("operation");
+            String firstNumber = req.getParameter(&quot;firstNumber&quot;);
+            String secondNumber = req.getParameter(&quot;secondNumber&quot;);
+            String operation = req.getParameter(&quot;operation&quot;);
 
             int firstInt = (firstNumber == null) ? 0 : Integer.valueOf(firstNumber).intValue();
             int secondInt = (secondNumber == null) ? 0 : Integer.valueOf(secondNumber).intValue();
 
-            if ( "multiply".equals(operation) ) {
-                req.setAttribute("result", calc.multiply(firstInt, secondInt));
+            if ( &quot;multiply&quot;.equals(operation) ) {
+                req.setAttribute(&quot;result&quot;, calc.multiply(firstInt, secondInt));
             }
-            else if ( "add".equals(operation) ) {
-                req.setAttribute("result", calc.sum(firstInt, secondInt));
+            else if ( &quot;add&quot;.equals(operation) ) {
+                req.setAttribute(&quot;result&quot;, calc.sum(firstInt, secondInt));
             }
 
-            System.out.println("Result is " + req.getAttribute("result"));
+            System.out.println(&quot;Result is &quot; + req.getAttribute(&quot;result&quot;));
 
-            getServletContext().getRequestDispatcher("/sample-docu.jsp").forward(req, resp);
+            getServletContext().getRequestDispatcher(&quot;/sample-docu.jsp&quot;).forward(req, resp);
 
         }
         catch ( Exception e ) {
@@ -215,7 +231,7 @@ public class CalculatorServlet extends H
 ]]></script>
 </div></div>
 
-<h2><a shape="rect" name="UsingsomeofEJB3.0functionalities-DeploymentPlans"></a>Deployment Plans</h2>
+<h2 id="UsingsomeofEJB3.0functionalities-DeploymentPlans">Deployment Plans</h2>
 
 <p>The structure of the deployable should look like the following:</p>
 <div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div class="preformattedContent panelContent">
@@ -227,14 +243,14 @@ public class CalculatorServlet extends H
    |- calculator-stateless-war-2.0-SNAPSHOT.war
 </pre>
 </div></div>
-<p><b>application.xml</b>: The JAR file is referenced to provide the functionality of this deployable. The WAR file is referenced in order to show the usage of this deployable through a web based interface. The context-root is set to be /calculator-stateless so that the URL for this application will be http://&lt;hostname&gt;:&lt;port&gt;/calculator-stateless.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>application.xml</b></div><div class="codeContent panelContent">
+<p><strong>application.xml</strong>: The JAR file is referenced to provide the functionality of this deployable. The WAR file is referenced in order to show the usage of this deployable through a web based interface. The context-root is set to be /calculator-stateless so that the URL for this application will be http://&lt;hostname&gt;:&lt;port&gt;/calculator-stateless.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>application.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;application xmlns="http://java.sun.com/xml/ns/javaee"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
-             version="5"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;application xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;
+             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+             xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd&quot;
+             version=&quot;5&quot;&gt;
     &lt;description&gt;Geronimo Sample EAR for Stateless Session&lt;/description&gt;
     &lt;display-name&gt;Geronimo Sample EAR for Stateless Session&lt;/display-name&gt;
     &lt;module&gt;
@@ -249,13 +265,13 @@ public class CalculatorServlet extends H
 &lt;/application&gt;
 ]]></script>
 </div></div>
-<p><b>geronimo-application.xml</b>: Information about the project (e.g. module's unique identification, any dependencies) is described inside the &lt;environment&gt; tag. In this case, there are no dependencies so there is nothing to be listed. However, it is a good idea to give this module some sort of unique identification, so that it can later be referenced by some other deployable application.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent">
+<p><strong>geronimo-application.xml</strong>: Information about the project (e.g. module's unique identification, any dependencies) is described inside the &lt;environment&gt; tag. In this case, there are no dependencies so there is nothing to be listed. However, it is a good idea to give this module some sort of unique identification, so that it can later be referenced by some other deployable application.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;application xmlns=&quot;http://geronimo.apache.org/xml/ns/j2ee/application-1.2&quot;&gt;
 
-    &lt;environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2"&gt;
+    &lt;environment xmlns=&quot;http://geronimo.apache.org/xml/ns/deployment-1.2&quot;&gt;
         &lt;moduleId&gt;
             &lt;groupId&gt;${pom.groupId}&lt;/groupId&gt;
             &lt;artifactId&gt;${pom.artifactId}&lt;/artifactId&gt;
@@ -266,7 +282,7 @@ public class CalculatorServlet extends H
     
     &lt;module&gt;
         &lt;web&gt;calculator-stateless-war-${version}.war&lt;/web&gt;
-        &lt;web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"&gt;
+        &lt;web-app xmlns=&quot;http://geronimo.apache.org/xml/ns/j2ee/web-1.2&quot;&gt;
             &lt;context-root&gt;/calculator-stateless&lt;/context-root&gt;
         &lt;/web-app&gt;
     &lt;/module&gt;
@@ -275,21 +291,26 @@ public class CalculatorServlet extends H
 ]]></script>
 </div></div>
 
-<h3><a shape="rect" name="UsingsomeofEJB3.0functionalities-Installationinstructions"></a>Installation instructions</h3>
+<h3 id="UsingsomeofEJB3.0functionalities-Installationinstructions">Installation instructions</h3>
 
 <ol><li>Checkout the source code of this sample from SVN:
 <br clear="none" class="atl-forced-newline">
-<br clear="none" class="atl-forced-newline"> <tt>svn checkout <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/calculator-stateless-pojo">http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/calculator-stateless-pojo</a></tt>
+<br clear="none" class="atl-forced-newline"> <code>svn checkout <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/calculator-stateless-pojo">http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/calculator-stateless-pojo</a></code>
 <br clear="none" class="atl-forced-newline">
-<br clear="none" class="atl-forced-newline"></li><li>Build the source code by executing <b>mvn install site</b> command. That will create <b>calculator-stateless-ear-2.0-SNAPSHOT.ear</b> file in the current directory.</li><li>Go to the $geronimo_home/bin directory and start the geronimo server.</li><li>Deploy the <b>calculator-stateless-ear-2.0-SNAPSHOT.ear</b> file using the console by clicking on <a shape="rect" class="external-link" href="http://localhost:8080/console/portal/apps/apps_all" rel="nofollow">this</a> link. The userid/password for the console is <em>system/manager</em>. Or to deploy using the command line, use the following command
+<br clear="none" class="atl-forced-newline"></li><li>Build the source code by executing <strong>mvn install site</strong> command. That will create <strong>calculator-stateless-ear-2.0-SNAPSHOT.ear</strong> file in the current directory.</li><li>Go to the $geronimo_home/bin directory and start the geronimo server.</li><li>Deploy the <strong>calculator-stateless-ear-2.0-SNAPSHOT.ear</strong> file using the console by clicking on <a shape="rect" class="external-link" href="http://localhost:8080/console/portal/apps/apps_all" rel="nofollow">this</a> link. The userid/password for the console is <em>system/manager</em>. Or to deploy using the command line, use the following command
 <br clear="none" class="atl-forced-newline">
-<br clear="none" class="atl-forced-newline"> <tt><b>deploy --user system --password manager deploy &lt;path to the ear file&gt;</b></tt>
+<br clear="none" class="atl-forced-newline"> <code><strong>deploy --user system --password manager deploy &lt;path to the ear file&gt;</strong></code>
 <br clear="none" class="atl-forced-newline">
-<br clear="none" class="atl-forced-newline"></li><li>Click on this url <b><a shape="rect" class="external-link" href="http://localhost:8080/calculator-stateless" rel="nofollow">http://localhost:8080/calculator-stateless</a></b>. Read the documentation there.
+<br clear="none" class="atl-forced-newline"></li><li>Click on this url <strong><a shape="rect" class="external-link" href="http://localhost:8080/calculator-stateless" rel="nofollow">http://localhost:8080/calculator-stateless</a></strong>. Read the documentation there.
 <br clear="none" class="atl-forced-newline">
 <br clear="none" class="atl-forced-newline"> 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Once you go the sample application, click on the "<em>source</em>" tab in the top right hand corner to see the source code. Click on the "<em>javadoc</em>" tab to see the javadocs.</td></tr></table></div></li></ol>
-</div>
+    <div class="aui-message hint shadowed information-macro">
+                            <span class="aui-icon icon-hint">Icon</span>
+                <div class="message-content">
+                            <p>Once you go the sample application, click on the "<em>source</em>" tab in the top right hand corner to see the source code. Click on the "<em>javadoc</em>" tab to see the javadocs. </p>
+                    </div>
+    </div>
+</li></ol></div>
         </div>
 
         

Modified: websites/production/geronimo/content/GMOxDOC20/very-simple-entity-ejb-example.html
==============================================================================
--- websites/production/geronimo/content/GMOxDOC20/very-simple-entity-ejb-example.html (original)
+++ websites/production/geronimo/content/GMOxDOC20/very-simple-entity-ejb-example.html Tue Jul 29 00:52:18 2014
@@ -23,6 +23,7 @@
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
   <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='http://geronimo.apache.org/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
   
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
@@ -95,29 +96,44 @@
 
       <div class="pagecontent">
         <div class="wiki-content">
-          <div class="wiki-content maincontent"><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
+          <div class="wiki-content maincontent">    
+<div class="atb-scrollbar-macro">
+    <div class="prev">
+        <a shape="rect" href="using-some-of-ejb-30-functionalities.html" rel="prev">
+                                    <span class="aui-icon aui-icon-small atb-icon-arrow-left">Previous</span>
+                                <span class="title">Using some of EJB 3.0 functionalities</span>
+            </a>
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="using-some-of-ejb-30-functionalities.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="using-some-of-ejb-30-functionalities.html">Using some of EJB 3.0 functionalities</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="sample-applications.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="sample-applications.html">Sample applications</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="very-simple-session-ejb-example.html">Very simple Session EJB example</a></td><
 td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="very-simple-session-ejb-example.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
+    </div>
+    <div class="parent">
+                    <a shape="rect" href="sample-applications.html" rel="parent">
+                                            <span class="aui-icon aui-icon-small atb-icon-arrow-up">Up</span>
+                                        <span class="title">Sample applications</span>
+                </a>
+
+            </div>
+    <div class="next">
+        <a shape="rect" href="very-simple-session-ejb-example.html" rel="next">
+                <span class="title">Very simple Session EJB example</span>
+                                    <span class="aui-icon aui-icon-small atb-icon-arrow-right">Next</span>
+                            </a>
+
+    </div>
+</div>
 
-<h1><a shape="rect" name="VerysimpleEntityEJBexample-ThePhoneBookBeanExample"></a>The Phone Book Bean Example</h1>
+<h1 id="VerysimpleEntityEJBexample-ThePhoneBookBeanExample">The Phone Book Bean Example</h1>
 
-<p>This is an example of a JSP-page calling an Enity Bean that uses annotations. The result looks like this:<span class="image-wrap" style="display: block; text-align: center"><img src="very-simple-entity-ejb-example.data/myphonebook_.bmp" style="border: 0px solid black"></span></p>
+<p>This is an example of a JSP-page calling an Enity Bean that uses annotations. The result looks like this:<img class="confluence-embedded-image image-center" src="https://cwiki.apache.org/confluence/download/attachments/60085/myphonebook_.bmp?version=1&amp;modificationDate=1182940029000&amp;api=v2" data-image-src="/confluence/download/attachments/60085/myphonebook_.bmp?version=1&amp;modificationDate=1182940029000&amp;api=v2"></p>
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-ApplicationContents"></a>Application Contents</h2>
+<h2 id="VerysimpleEntityEJBexample-ApplicationContents">Application Contents</h2>
 
-<p>First, let us take a look at the <b>PhoneBook</b> Entity Bean that represents a table in the database. Each instance of <b>PhoneBook</b> is a record of the table.<br clear="none">
-<b>PhoneBook.java</b> uses the</p>
+<p>First, let us take a look at the <strong>PhoneBook</strong> Entity Bean that represents a table in the database. Each instance of <strong>PhoneBook</strong> is a record of the table.<br clear="none">
+<strong>PhoneBook.java</strong> uses the</p>
 <ol><li>@Entity annotation to mark this class as an Entity Bean</li><li>@Table annotation to map the table name that is being represented by the Entity Bean.</li><li>@Id annotation to specify the primary key of the table.</li></ol>
 
 
 <p>And, as usual their is an empty constructor for the Entity Bean</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>PhoneBook.java</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>PhoneBook.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.myphonebookpak;
 
@@ -128,7 +144,7 @@ import javax.persistence.Entity;
 import javax.persistence.Table;
 
 @Entity
-@Table(name = "phonebook")
+@Table(name = &quot;phonebook&quot;)
 public class PhoneBook implements Serializable {
 
 	private String number;
@@ -162,8 +178,8 @@ public class PhoneBook implements Serial
 }
 ]]></script>
 </div></div>
-<p><b>MyPhonebookLocal.java</b> is the business interface that drives the above mentioned Entity Bean.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>MyPhonebookLocal.java</b></div><div class="codeContent panelContent">
+<p><strong>MyPhonebookLocal.java</strong> is the business interface that drives the above mentioned Entity Bean.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>MyPhonebookLocal.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.myphonebookpak;
 
@@ -174,12 +190,18 @@ public interface MyPhonebookLocal {
 }
 ]]></script>
 </div></div>
-<p><b>MyPhonebookBean.java</b> is where the implementation of the local (and if there is, a the remote) interface. To explain what the annotations in this Stateless Session Bean means I will enumerate them:</p>
-<ol><li>@Stateless - tells Geronimo that this is a stateless session bean</li><li>@PersistenceUnit - tells Geronimo to retrieve a persistence unit defined in the <b>persistence.xml</b> and place it in the EntityManagerFactory
-<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Note that PersistenceContext is used when you are directly obtaining a EntityManager. For an EntityManagerFactory use PersistenceUnit.</td></tr></table></div></li></ol>
+<p><strong>MyPhonebookBean.java</strong> is where the implementation of the local (and if there is, a the remote) interface. To explain what the annotations in this Stateless Session Bean means I will enumerate them:</p>
+<ol><li>@Stateless - tells Geronimo that this is a stateless session bean</li><li>@PersistenceUnit - tells Geronimo to retrieve a persistence unit defined in the <strong>persistence.xml</strong> and place it in the EntityManagerFactory
+    <div class="aui-message warning shadowed information-macro">
+                            <span class="aui-icon icon-warning">Icon</span>
+                <div class="message-content">
+                            <p>Note that PersistenceContext is used when you are directly obtaining a EntityManager. For an EntityManagerFactory use PersistenceUnit.</p>
+                    </div>
+    </div>
+</li></ol>
 
 
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>MyPhonebookBean.java</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>MyPhonebookBean.java</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 package org.apache.geronimo.samples.myphonebookpak;
 
@@ -193,7 +215,7 @@ import org.apache.geronimo.samples.mypho
 @Stateless
 public class MyPhonebookBean implements MyPhonebookLocal {
 
-	@PersistenceUnit(unitName="PhonePU")
+	@PersistenceUnit(unitName=&quot;PhonePU&quot;)
 	protected EntityManagerFactory emf;
 
 	public MyPhonebookBean() {
@@ -212,31 +234,31 @@ public class MyPhonebookBean implements 
 }
 ]]></script>
 </div></div>
-<p><b>index.jsp</b> is the JSP page that uses the EJB to access the database.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>index.jsp</b></div><div class="codeContent panelContent">
+<p><strong>index.jsp</strong> is the JSP page that uses the EJB to access the database.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>index.jsp</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;%@ page contentType="text/html" import="org.apache.geronimo.samples.myphonebookpak.*, javax.naming.* " %&gt;
+&lt;%@ page contentType=&quot;text/html&quot; import=&quot;org.apache.geronimo.samples.myphonebookpak.*, javax.naming.* &quot; %&gt;
 
 &lt;%
-	String searchName = "";
-	if (request.getParameter("searchname") != null) {
-		searchName=request.getParameter("searchname");
+	String searchName = &quot;&quot;;
+	if (request.getParameter(&quot;searchname&quot;) != null) {
+		searchName=request.getParameter(&quot;searchname&quot;);
 	}
 %&gt;
 
 &lt;html&gt;&lt;head&gt;&lt;title&gt;Phonebook&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
-&lt;form action="index.jsp"&gt;
+&lt;form action=&quot;index.jsp&quot;&gt;
 &lt;b&gt;Search number&lt;/b&gt;:&lt;br&gt;
-Enter name: &lt;input type="text" name="searchname" value="&lt;%=searchName%&gt;"&gt;
-&lt;input type="submit" value="Search"&gt;
-(Test with &lt;a href="index.jsp?searchname=Joe"&gt;Joe&lt;/a&gt;)
+Enter name: &lt;input type=&quot;text&quot; name=&quot;searchname&quot; value=&quot;&lt;%=searchName%&gt;&quot;&gt;
+&lt;input type=&quot;submit&quot; value=&quot;Search&quot;&gt;
+(Test with &lt;a href=&quot;index.jsp?searchname=Joe&quot;&gt;Joe&lt;/a&gt;)
 &lt;/form&gt;
 &lt;%
-	if (! searchName.equals("")) {
-		String number="";
+	if (! searchName.equals(&quot;&quot;)) {
+		String number=&quot;&quot;;
 		try {
 			Context context = new InitialContext();
-			MyPhonebookLocal myPhonebookLocal = (MyPhonebookLocal)context.lookup("java:comp/env/ejb/MyPhonebookBean");
+			MyPhonebookLocal myPhonebookLocal = (MyPhonebookLocal)context.lookup(&quot;java:comp/env/ejb/MyPhonebookBean&quot;);
 			PhoneBook phonebook = myPhonebookLocal.findByPrimaryKey(searchName);
 			if(phonebook != null) {
 				number =  phonebook.getNumber();
@@ -245,25 +267,25 @@ Enter name: &lt;input type="text" name="
 		catch (Exception e) {
 			number=e.toString();
 		}
-		out.println("This is the number returned from the EJB when searching for '"+searchName+"' : " + number);
+		out.println(&quot;This is the number returned from the EJB when searching for &#39;&quot;+searchName+&quot;&#39; : &quot; + number);
 	}
 %&gt;
 &lt;/body&gt;&lt;/html&gt;
 ]]></script>
 </div></div>
 
-<h3><a shape="rect" name="VerysimpleEntityEJBexample-DeploymentPlansforEJB"></a>Deployment Plans for EJB</h3>
+<h3 id="VerysimpleEntityEJBexample-DeploymentPlansforEJB">Deployment Plans for EJB</h3>
 
-<p><b>openejb-jar.xml</b> just specifies the module's information.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent">
+<p><strong>openejb-jar.xml</strong> just specifies the module's information.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;openejb-jar
-		xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
-		xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
-		xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
-		xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
-		xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"&gt;
+		xmlns=&quot;http://www.openejb.org/xml/ns/openejb-jar-2.1&quot;
+		xmlns:nam=&quot;http://geronimo.apache.org/xml/ns/naming-1.1&quot;
+		xmlns:pkgen=&quot;http://www.openejb.org/xml/ns/pkgen-2.0&quot;
+		xmlns:sec=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+		xmlns:sys=&quot;http://geronimo.apache.org/xml/ns/deployment-1.2&quot;&gt;
 	&lt;sys:environment&gt;
 		&lt;sys:moduleId&gt;
 			&lt;sys:groupId&gt;org.apache.geronimo.samples&lt;/sys:groupId&gt;
@@ -275,16 +297,16 @@ Enter name: &lt;input type="text" name="
 &lt;/openejb-jar&gt;
 ]]></script>
 </div></div>
-<p><b>persistence.xml</b> will specify the name of the PersistenceUnit. This name is used when referencing for the EntityManagerFactory. I have denoted it as <b>PhonePU</b>. For some reason I could not get it to reference with jta-data-source. So the alternative method is to explicitly specify the ConnectionURL, ConnectionDriverName, and ConnectionUserName. I added an extra property called SynchronizeMappings so that the data in the database will not be overwritten.</p>
+<p><strong>persistence.xml</strong> will specify the name of the PersistenceUnit. This name is used when referencing for the EntityManagerFactory. I have denoted it as <strong>PhonePU</strong>. For some reason I could not get it to reference with jta-data-source. So the alternative method is to explicitly specify the ConnectionURL, ConnectionDriverName, and ConnectionUserName. I added an extra property called SynchronizeMappings so that the data in the database will not be overwritten.</p>
 
 <p>SEE BELOW FOR POSSIBLE SOLUTION</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;persistence	xmlns="http://java.sun.com/xml/ns/persistence"
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
-		xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
-	&lt;persistence-unit name="PhonePU"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;persistence	xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot;
+		xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; version=&quot;1.0&quot;
+		xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd&quot;&gt;
+	&lt;persistence-unit name=&quot;PhonePU&quot;&gt;
 		&lt;description&gt;Phone Book&lt;/description&gt;
 		&lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;
 		&lt;class&gt;org.apache.geronimo.samples.myphonebookpak.PhoneBook&lt;/class&gt;
@@ -295,16 +317,16 @@ Enter name: &lt;input type="text" name="
 ]]></script>
 </div></div>
 
-<h3><a shape="rect" name="VerysimpleEntityEJBexample-DeploymentPlansforWebApp"></a>Deployment Plans for Web-App</h3>
+<h3 id="VerysimpleEntityEJBexample-DeploymentPlansforWeb-App">Deployment Plans for Web-App</h3>
 
-<p><b>web.xml</b> references the EJB by specifying the package to which the <b>MyPhonebookLocal</b> belongs to.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>web.xml</b></div><div class="codeContent panelContent">
+<p><strong>web.xml</strong> references the EJB by specifying the package to which the <strong>MyPhonebookLocal</strong> belongs to.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>web.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;web-app id="WebApp_ID" version="2.4"
-    xmlns="http://java.sun.com/xml/ns/j2ee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;web-app id=&quot;WebApp_ID&quot; version=&quot;2.4&quot;
+    xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;&gt;
 	&lt;display-name&gt;MyPhonebookWeb&lt;/display-name&gt;
 	&lt;welcome-file-list&gt;
 		&lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
@@ -317,14 +339,14 @@ Enter name: &lt;input type="text" name="
 &lt;/web-app&gt;
 ]]></script>
 </div></div>
-<p><b>geronimo-web.xml</b> specifies the module's information and the context-root for the web-app.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-web.xml</b></div><div class="codeContent panelContent">
+<p><strong>geronimo-web.xml</strong> specifies the module's information and the context-root for the web-app.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-web.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
-         xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
-         xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
-         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;web-app xmlns=&quot;http://geronimo.apache.org/xml/ns/j2ee/web-1.1&quot;
+         xmlns:nam=&quot;http://geronimo.apache.org/xml/ns/naming-1.1&quot;
+         xmlns:sec=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+         xmlns:sys=&quot;http://geronimo.apache.org/xml/ns/deployment-1.1&quot;&gt;
   &lt;sys:environment&gt;
     &lt;sys:moduleId&gt;
       &lt;sys:groupId&gt;${pom.groupId}&lt;/sys:groupId&gt;
@@ -338,16 +360,16 @@ Enter name: &lt;input type="text" name="
 ]]></script>
 </div></div>
 
-<h3><a shape="rect" name="VerysimpleEntityEJBexample-DeploymentPlanfortheapplication"></a>Deployment Plan for the application</h3>
+<h3 id="VerysimpleEntityEJBexample-DeploymentPlanfortheapplication">Deployment Plan for the application</h3>
 
-<p><b>geronimo-application.xml</b> tells the application that there is a database pool that needs to be deployed as well. The db pool is defined in <b>PhoneBookPool.xml</b> and the driver that is needs in order to be deployed is the <b>tranql-connector-ra-1.3.rar</b> file--these two files will reside on the top level layer of the resultant EAR file.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent">
+<p><strong>geronimo-application.xml</strong> tells the application that there is a database pool that needs to be deployed as well. The db pool is defined in <strong>PhoneBookPool.xml</strong> and the driver that is needs in order to be deployed is the <strong>tranql-connector-ra-1.3.rar</strong> file--these two files will reside on the top level layer of the resultant EAR file.</p>
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>geronimo-application.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;application	xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-				xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
-				xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
-				application-name="t6"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;application	xmlns=&quot;http://geronimo.apache.org/xml/ns/j2ee/application-1.1&quot;
+				xmlns:sec=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+				xmlns:sys=&quot;http://geronimo.apache.org/xml/ns/deployment-1.1&quot;
+				application-name=&quot;t6&quot;&gt;
     &lt;sys:environment&gt;
         &lt;sys:moduleId&gt;
             &lt;sys:groupId&gt;${pom.groupId}&lt;/sys:groupId&gt;
@@ -364,62 +386,62 @@ Enter name: &lt;input type="text" name="
 ]]></script>
 </div></div>
 
-<h1><a shape="rect" name="VerysimpleEntityEJBexample-Configuring%2CBuilding%2CandDeployingtheApplication"></a>Configuring, Building, and Deploying the Application</h1>
+<h1 id="VerysimpleEntityEJBexample-Configuring,Building,andDeployingtheApplication">Configuring, Building, and Deploying the Application</h1>
 
-<p>Download the <b>MyPhoneBook</b> application from the following link:<br clear="none">
-<a shape="rect" href="very-simple-entity-ejb-example.data/myphonebook_.zip?version=1&amp;modificationDate=1182940888000">MyPhoneBook</a></p>
+<p>Download the <strong>MyPhoneBook</strong> application from the following link:<br clear="none">
+<a shape="rect" href="very-simple-entity-ejb-example.data/myphonebook_.zip?version=1&amp;modificationDate=1182940888000&amp;api=v2">MyPhoneBook</a></p>
 
-<p>After decompressing the given file, the <b>myphonebook</b> directory will be created.</p>
+<p>After decompressing the given file, the <strong>myphonebook</strong> directory will be created.</p>
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-SourceCode"></a>Source Code</h2>
+<h2 id="VerysimpleEntityEJBexample-SourceCode">Source Code</h2>
 
 <p>You can checkout the source code of this sample from SVN:</p>
 
 <p>svn checkout <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/myphonebook">http://svn.apache.org/repos/asf/geronimo/samples/trunk/samples/myphonebook</a></p>
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-CreatingandPopulatingDatabase"></a>Creating and Populating Database</h2>
+<h2 id="VerysimpleEntityEJBexample-CreatingandPopulatingDatabase">Creating and Populating Database</h2>
 
 <p>After starting Apache Geronimo log into the console and follow the given steps to create the PhoneBookDB.</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>PhoneBook.sql</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>PhoneBook.sql</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 CREATE TABLE phonebook ( name VARCHAR(255) PRIMARY KEY, number VARCHAR(255) );
-INSERT INTO phonebook VALUES ('John', '1234');
-INSERT INTO phonebook VALUES ('Joe', '5678');
+INSERT INTO phonebook VALUES (&#39;John&#39;, &#39;1234&#39;);
+INSERT INTO phonebook VALUES (&#39;Joe&#39;, &#39;5678&#39;);
 ]]></script>
 </div></div>
-<ol><li>Select <b>DB Manager</b> link from the Console Navigation in the left.</li><li>Give the database name as <b>PhoneBookDB</b> and click Create button.</li><li>Select <b>PhoneBookDB</b> to the Use DB field.</li><li>Open <b>PhoneBookDB.sql</b> in the <b>myphonebook/myphonebook-ear/src/main/resources</b> directory from a text editor.</li><li>Paste the content <b>PhoneBookDB.sql</b> to the SQL Commands text area and press <b>Run SQL</b> button.</li></ol>
+<ol><li>Select <strong>DB Manager</strong> link from the Console Navigation in the left.</li><li>Give the database name as <strong>PhoneBookDB</strong> and click Create button.</li><li>Select <strong>PhoneBookDB</strong> to the Use DB field.</li><li>Open <strong>PhoneBookDB.sql</strong> in the <strong>myphonebook/myphonebook-ear/src/main/resources</strong> directory from a text editor.</li><li>Paste the content <strong>PhoneBookDB.sql</strong> to the SQL Commands text area and press <strong>Run SQL</strong> button.</li></ol>
 
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-Building"></a>Building</h2>
+<h2 id="VerysimpleEntityEJBexample-Building">Building</h2>
 
-<p>Use a command prompt to navigate into the <b>myphonebook</b> directory and just give <b>mvn install</b>&#160;followed by <b>mvn&#160;site</b> command to build. It will create the <b>myphonebook-ear-2.0-SNAPSHOT.ear</b> under the <b>myphonebook</b> folder. Now, you are ready to deploy <b>myphonebook</b> application in the Geronimo Application server.</p>
+<p>Use a command prompt to navigate into the <strong>myphonebook</strong> directory and just give <strong>mvn install</strong>&#160;followed by <strong>mvn&#160;site</strong> command to build. It will create the <strong>myphonebook-ear-2.0-SNAPSHOT.ear</strong> under the <strong>myphonebook</strong> folder. Now, you are ready to deploy <strong>myphonebook</strong> application in the Geronimo Application server.</p>
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-DeployingtheApplication"></a>Deploying the Application</h2>
+<h2 id="VerysimpleEntityEJBexample-DeployingtheApplication">Deploying the Application</h2>
 
 <p>Deploying sample application is pretty straight forward as we are going to use the Geronimo Console.</p>
-<ol><li>Scroll down to <b>Deploy New</b> from the Console Navigation panel.</li><li>Load <b>myphonebook-ear-2.0-SNAPSHOT.ear</b> from <b>myphonebook</b> folder in to the <b>Archive</b> input box.</li><li>Press <b>Install</b> button to deploy application in the server.</li></ol>
+<ol><li>Scroll down to <strong>Deploy New</strong> from the Console Navigation panel.</li><li>Load <strong>myphonebook-ear-2.0-SNAPSHOT.ear</strong> from <strong>myphonebook</strong> folder in to the <strong>Archive</strong> input box.</li><li>Press <strong>Install</strong> button to deploy application in the server.</li></ol>
 
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-MyPhoneBookWebApplication"></a>MyPhoneBook Web Application</h2>
+<h2 id="VerysimpleEntityEJBexample-MyPhoneBookWebApplication">MyPhoneBook Web Application</h2>
 
 <p>To test the sample web application open a browser and type <a shape="rect" class="external-link" href="http://localhost:8080/myphonebook" rel="nofollow">http://localhost:8080/myphonebook</a>.</p>
 
-<h2><a shape="rect" name="VerysimpleEntityEJBexample-UntestedInstructionsforusingjtadatasourceinpersistence.xml"></a>Untested Instructions for using jta-datasource in persistence.xml</h2>
+<h2 id="VerysimpleEntityEJBexample-UntestedInstructionsforusingjta-datasourceinpersistence.xml">Untested Instructions for using jta-datasource in persistence.xml</h2>
 
 <p>This app does not use openjpa sequences so apparently you can get by with only a jta-datasource.  In my experience apps that do use openjpa sequences to supply primary key values also need a non-jta-datasource.  When deploying such a non-jta-datasource check the plan and make sure it says &lt;no-transaction/&gt; rather than &lt;local-transaction/&gt; or &lt;xa-transaction/&gt;.</p>
 
 <p>For this app, use the console to deploy a datasource using the database of your choice.  You need to supply a name such as "MyDS" for your datasource.  At the end you should have a name for the module your datasource is in such as console.dbpool/MyDS/1.0/rar.  You need to do two things so geronimo can hook up to your datasource:</p>
 
 <p>1. Include the module name in the app dependencies so geronimo knows to look in the new datasource module for the datasource.  So, the openejb-jar.xml should look something like:</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>openejb-jar.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;openejb-jar
-		xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
-		xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1"
-		xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
-		xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
-		xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"&gt;
+		xmlns=&quot;http://www.openejb.org/xml/ns/openejb-jar-2.1&quot;
+		xmlns:nam=&quot;http://geronimo.apache.org/xml/ns/naming-1.1&quot;
+		xmlns:pkgen=&quot;http://www.openejb.org/xml/ns/pkgen-2.0&quot;
+		xmlns:sec=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+		xmlns:sys=&quot;http://geronimo.apache.org/xml/ns/deployment-1.2&quot;&gt;
 	&lt;sys:environment&gt;
 		&lt;sys:moduleId&gt;
 			&lt;sys:groupId&gt;org.apache.geronimo.samples&lt;/sys:groupId&gt;
@@ -440,19 +462,19 @@ INSERT INTO phonebook VALUES ('Joe', '56
 ]]></script>
 </div></div>
 <p>2. specify the name of the datasource in persistence.xml, something like</p>
-<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent">
+<div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>persistence.xml</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;persistence	xmlns="http://java.sun.com/xml/ns/persistence"
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
-		xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
-	&lt;persistence-unit name="PhonePU"&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;persistence	xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot;
+		xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; version=&quot;1.0&quot;
+		xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd&quot;&gt;
+	&lt;persistence-unit name=&quot;PhonePU&quot;&gt;
 		&lt;description&gt;Phone Book&lt;/description&gt;
 		&lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;
                 &lt;jta-datasource&gt;MyDS&lt;/jta-datasource&gt;
 		&lt;class&gt;org.apache.geronimo.samples.myphonebookpak.PhoneBook&lt;/class&gt;
 		&lt;properties&gt;
-			&lt;property name="openjpa.jdbc.SynchronizeMappings" value="false" /&gt;
+			&lt;property name=&quot;openjpa.jdbc.SynchronizeMappings&quot; value=&quot;false&quot; /&gt;
 		&lt;/properties&gt;
 	&lt;/persistence-unit&gt;
 	&lt;!--



Mime
View raw message