User: tmcsys Date: 01/08/22 08:10:57 Modified: src/docs howtopetstore.xml Log: Update Pet Store manual documentation: JBoss 2.4 BETA Pet Store 1.1.2 Revision Changes Path 1.2 +18 -59 manual/src/docs/howtopetstore.xml Index: howtopetstore.xml =================================================================== RCS file: /cvsroot/jboss/manual/src/docs/howtopetstore.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- howtopetstore.xml 2001/04/27 08:46:30 1.1 +++ howtopetstore.xml 2001/08/22 15:10:57 1.2 @@ -1,6 +1,6 @@ <?xml version = "1.0" encoding = "UTF-8"?> <section id="howtopetstore"> - <title>Deploying the Pet Store 1.1.1 Demo in JBoss</title> + <title>Deploying the Pet Store 1.1.2 Demo in JBoss</title> <para>Author:<author> <firstname>Tom</firstname> <surname>Coleman</surname> @@ -12,35 +12,29 @@ <title>Introduction</title> <para>The Pet Store sample application (demo) is a relatively robust, well-documented demonstration of J2EE technology and concepts. It implements MVC (Model-View-Controller) architecture.</para> <para>The Pet Store demo can allow developers to gain familiarity with J2EE concepts including application portability, a key J2EE design objective.</para> - <para>The Pet Store has been successfully deployed in JBoss PRE 2.1 configured to use Embedded Tomcat and Tomcat 3.2.1/Apache using Sun 1.3 jdk on Linux. The steps provided below apply to JBoss PRE 2.1 since 21st January 2001.</para> + <para>The Pet Store has been successfully deployed in JBoss 2.4 BETA configured to use Embedded Tomcat 3.2.2 using Sun 1.3 jdk on RH Linux 6.2. The steps provided below apply to JBoss 2.4 BETA Rel_2_4_0_23.</para> </section> <section> <title>Outstanding Deployment Issues</title> <para>Please post your experiences with deploying the Pet Store in JBoss to the jboss-user mailing list.</para> <section> - <title>The security adapter</title> - <para>The Pet Store implements non-portable security code that works only with the J2EE RI (Reference Implementation) server. </para> - <para>The non-portable code is contained in the J2eeSecurityAdapter class. The JBoss Pet Store patch replaces this class with a JBossSecurityAdapter class that implements the SecurityAdapter interface.</para> - <para>The steps below change the value for securityAdapterClassName in the Pet Store application to use JBossSecurityAdapter. </para> - <para>See the /docs/security.html page in the Pet Store demo for more information. </para> - </section> - <section> - <title>Adding new users</title> - <para>In order to add new users, you have to configure Tomcat to use a JDBCRealm. See below for details.</para> - </section> - <section> <title>The Admin Client</title> - <para>We still need JBoss specific Deployment descriptors for the Admin client application. Please post them to the mailing list if you have them.</para> + <para>The Admin application apparently needs some work on the deployment descriptors. Please post your experences with the Admin application to the mailing list.</para> + <title>Jetty Deployment</title> + <para>The Pet Store should deploy using Jetty. Please post your experences with deploying the Pet Store using Jetty to the mailing list.</para> + <title>Pet Store Security</title> + <para>The current release of the Pet Store handles security at the application level. It does require that you configure JBoss or Tomcat security services.</para> </section> </section> <section> - <title>Original contributers</title> + <title>Contributors:</title> <itemizedlist> <listitem><para>Mike Lueders, Richard Gyger - Focus Technologies</para></listitem> <listitem><para>Scott Stark</para></listitem> <listitem><para>Anatoly Ackerman</para></listitem> <listitem><para>Tom Coleman</para></listitem> <listitem><para>Aaron Mulder</para></listitem> + <listitem><para>Cuong Tran</para></listitem> </itemizedlist> </section> <section> @@ -48,16 +42,15 @@ <orderedlist> <listitem> <para>Download the Pet Store</para> - <para>You can get the source from <ulink url="http://java.sun.com/j2ee/download.html#blueprints">Sun's J2EE Download Page</ulink>. It's in the "J2EE Blueprints" package. Download the 1.1.1 version. Unpack it anywhere. The root directory of the Pet Store demo is referred to below as $PETSTORE. </para> + <para>You can get the source from <ulink url="http://java.sun.com/j2ee/download.html#blueprints">Sun's J2EE Download Page</ulink>. It's in the "J2EE Blueprints" package. Download the 1.1.2 version. Unpack it anywhere. The root directory of the Pet Store demo is referred to below as $PETSTORE. </para> </listitem> <listitem> <para>Download the JBoss Pet Store patch file</para> - <para>Running the Pet Store demo in JBoss requires several minor changes to deployment files in the Pet Store application (.ear) file. The patch is currently available in the file section of the manual, it is named petstore-1.1.1-patch.zip.</para> - <para>Copy the patch file to a temporary directory and unzip it. The patch contains a zip file that patches the Pet Store demo. </para> + <para>Running the Pet Store demo in JBoss requires several minor changes to deployment files in the Pet Store application (.ear) file. The patch is currently available in the documentation files section of the manual, it is named jps112-01.zip.</para> </listitem> <listitem> <para>Configure JBoss to use Embedded Tomcat</para> - <para>You need a servlet container to run the petstore. These instructions use Tomcat 3.2.1. You can either use a bundled binary JBoss + Tomcat, or see the instructions to configure JBoss to use Embedded Tomcat in <xref linkend="howtotomcat"/>.</para> + <para>You need a servlet container to run the petstore. These instructions use Tomcat 3.2.2. You can either use a bundled binary JBoss + Tomcat, or see the instructions to configure JBoss to use Embedded Tomcat in <xref linkend="howtotomcat"/>.</para> </listitem> <listitem> <para>Select a Database</para> @@ -70,10 +63,10 @@ <para>This step adds the file jboss-web.xml to the WEB-INF directory in petstore.war, modifies the serverType in the web.xml file of that directory to identify the JBoss server to the application, and modifies the application.xml file in the META-INF directory of petstore.ear.</para> <itemizedlist> <listitem> - <para>Copy the petstore-jboss-mods.zip file to the root directory ($PETSTORE) of your Pet Store distribution. Change to this directory and unzip the file. </para> + <para>Copy the jps1.1.2-01.zip file to the root directory ($PETSTORE) of your Pet Store distribution. Change to this directory and unzip the file. </para> <para>Note: This will overwrite the original web.xml file. </para> <para><programlisting>cd $PETSTORE -unzip petstore-jboss-mods.zip +unzip jps1.1.2-01.zip </programlisting></para> </listitem> <listitem> @@ -86,57 +79,23 @@ </listitem> <listitem> <para>Add DB Pools to JBoss</para> - <para>The JBoss Petstore patch file includes the file jboss.jcml. This file defines Pet Store DB Pools for Cloudscape using port 1098. </para> + <para>The JBoss Pet Store patch file includes the file jboss.jcml. This file defines Pet Store DB Pools for JBoss 2.4 using Cloudscape on port 1098.</para> <para>Cloudscape uses port 1099 by default. JBoss uses port 1099 for JNDI.</para> - <para>If you will be using a different database, you will need to define DB pools appropriate for your database. See <xref linkend="jdbc"/> for details</para> + <para>If you will be using a different database, you will need to define the appropriate DB pools for your database. See <xref linkend="jdbc"/> for details</para> </listitem> <listitem> <para>Prepare the Database</para> <para>Modify the Cloudscape startup command to use port 1098.</para> <para>You do this by adding -port port_number. For example:</para> <programlisting>java ... RmiJdbc.RJJdbcServer -port 1098 COM.cloudscape.core.JDBCDriver</programlisting> - <para>Whichever product you're using, create a database or instance or schema (the terminology varies) and then run the appropriate script to populate it.</para> + <para>The current Pet Store application should automatically build required databases the first time the application is started. Apparently, the schema is slightly different from the earlier release, so you may encounter problems if you have an existing Pet Store database from a previous installation. If this is the case, you may need to manually drop all existing tables.</para> <para>Start Cloudscape.</para> </listitem> <listitem> <para>Add JARS to JBoss</para> <para>Copy your DB driver JAR to the lib/extdirectory of your JBoss installation ($JBOSS_HOME). </para> + <para>For Cloudscape, copy client.jar and RmiJdbc.jar to the lib/ext directory. </para> <para>Copy tools.jar from the J2 SDK to the lib/ext directory of your JBoss installation ($JBOSS_HOME).</para> - <para>For Cloudscape, copy cloudscape.jar and RmiJdbc.jar to the lib/ext directory. </para> - </listitem> - <listitem> - <para>Add Tomcat JDBCRealm</para> - <para>Find the following code in the Tomcat server.xml file and comment it out.</para> - <programlisting><![CDATA[<RequestInterceptor - className="org.apache.tomcat.request.SimpleRealm" - debug="0" /> -]]></programlisting> - <para>Add the following code just below the code you commented out.</para> - <programlisting><![CDATA[<RequestInterceptor - className="org.apache.tomcat.request.JDBCRealm" - debug="99" - driverName="COM.cloudscape.coreRmiJdbcDriver" - connectionURL="jdbc:rmi://localhost:1098/jdbc:cloudscape:CloudscapeDB" - userTable="users" - userNameCol="user_name" - userCredCol="user_pass" - userRoleTable="user_roles" - roleNameCol="role_name" - connectionName="estoreuser" - connectionPassword="estore" /> -]]></programlisting> - <para>Make sure the JbossRealm interceptor follows the JDBCRealm definition. </para> - <programlisting><![CDATA[<RequestInterceptor - className="org.jboss.tomcat.security.JbossRealm" /> -]]></programlisting> - <para>Change to the $PETSTORE directory and run the dbrealm script to set up the default Pet Store user. </para> - </listitem> - <listitem> - <para>Modify the Tomcat Users file</para> - <para>The patch contains a tomcat-users.xml file that adds the default Pet Store user. You can copy this file to your $TOMCAT_HOME/conf directory, or add the following line to your existing tomcat-users.xml file. </para> - <para>You don't need to do this if you configure a JDBCRealm as described above. </para> -<programlisting><![CDATA[<user name = "j2ee" password = "j2ee" roles = "customer" /> -]]></programlisting> </listitem> <listitem> <para>Start JBoss</para> _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development