geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Geronimo Wiki] Update of "PetStore" by JacekLaskowski
Date Wed, 06 Jul 2005 20:53:06 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by JacekLaskowski:
http://wiki.apache.org/geronimo/PetStore

------------------------------------------------------------------------------
  == Deploying PetStore ==
  
   {{{
- NOTE: 07/06: It's still a work in progress
+ It's still a work in progress
  }}}
  
  Before going on, please keep in mind that {{{"whom ever wrote petstore should be hunted
down..."}}}. It's been said during one IRC session and I couldn't resist to include it.
@@ -33, +33 @@

  
  NOTE: Commands are MS Windows specific - Linux version is on its way.
  
- NOTE: 
+ Throughout the document the following variables are assumed to be set:
  
-  i. GERONIMO_HOME - the directory where Geronimo is installed or built, e.g. C:\projs\geronimo\modules\assembly\target\geronimo-1.0-SNAPSHOT
+  * GERONIMO_HOME - the directory where Geronimo is installed or built, e.g. C:\projs\geronimo\modules\assembly\target\geronimo-1.0-SNAPSHOT
- 
-  i. PETSTORE_HOME - the directory where petstore.ear is unpacked, e.g. C:\projs\petstore\porting\petstore
+  * PETSTORE_HOME - the directory where petstore.ear is unpacked, e.g. C:\projs\petstore\porting\petstore
  
   1. Unpack petstore.ear (one of the files that constitute the application) to a directory
PETSTORE_HOME
  
-  2. Change the current working directory to PETSTORE_HOME.
+  1. Change the current working directory to PETSTORE_HOME.
  
-  3. Edit {{{META-INF/application.xml}}} so that it looks like this:
+  1. Edit {{{META-INF/application.xml}}} so that it looks like this:
  
   {{{
  <?xml version="1.0" encoding="UTF-8"?>
@@ -87, +86 @@

  </application>
  }}}
  
-  4. Create {{{META-INF/geronimo-application.xml}}}:
+  1. Create {{{META-INF/geronimo-application.xml}}}:
  
   {{{
  <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application" parentId="org/apache/geronimo/SystemDatabase"
configId="petstore">
@@ -136, +135 @@

  
  Note: The file configures alternate Geronimo deployment descriptors so that we don't have
to modify any jars. These deployment descriptors configure Geronimo resources which are mapped
to the virtual ones defined in ejb-jar.xml's, e.g. JNDI name of an EJB, CMP mapping, etc.
  
-  5. Create {{{petstore-ejb.xml}}}:
+  1. Create {{{petstore-ejb.xml}}}:
  
   {{{
  <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar" xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
configId="catalog-ejb">
@@ -156, +155 @@

  </openejb-jar>
  }}}
  
-  6. Create {{{customer-ejb.xml}}}:
+  1. Create {{{customer-ejb.xml}}}:
  
+ ...to be added later as Wiki doesn't like it yet...
-  {{{
- <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar" xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
configId="customer-ejb">
-   <naming:cmp-connection-factory>
-     <naming:resource-link>DerbyDatasource</naming:resource-link>
-   </naming:cmp-connection-factory>
-   <enterprise-beans>
-     <entity>
-       <ejb-name>CustomerEJB</ejb-name>
-       <table-name>CUSTOMERS</table-name>
-       <cmp-field-mapping>
-         <!-- Would be better when the filed named field-name -->
-         <cmp-field-name>userId</cmp-field-name>
-         <table-column>userId</table-column>
-       </cmp-field-mapping>
-     </entity>
-     <entity>
-       <ejb-name>ProfileEJB</ejb-name>
-       <table-name>PROFILES</table-name>
-       <cmp-field-mapping>
-         <cmp-field-name>id</cmp-field-name>
-         <cmp-field-class>java.lang.Integer</cmp-field-class>
-         <table-column>id</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>preferredLanguage</cmp-field-name>
-         <table-column>preferredLanguage</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>myListPreference</cmp-field-name>
-         <table-column>myListPreference</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>favoriteCategory</cmp-field-name>
-         <table-column>favoriteCategory</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>bannerPreference</cmp-field-name>
-         <table-column>bannerPreference</table-column>
-       </cmp-field-mapping>
-       <primkey-field>id</primkey-field>
-       <automatic-key-generation>
-         <generator-name>geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator</generator-name>
-         <primary-key-class>java.lang.Integer</primary-key-class>
-       </automatic-key-generation>
-     </entity>
-     <entity>
-       <ejb-name>CreditCardEJB</ejb-name>
-       <table-name>CREDITCARDS</table-name>
-       <cmp-field-mapping>
-         <cmp-field-name>id</cmp-field-name>
-         <cmp-field-class>java.lang.Integer</cmp-field-class>
-         <table-column>id</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>cardType</cmp-field-name>
-         <table-column>cardType</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>expiryDate</cmp-field-name>
-         <table-column>expiryDate</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>cardNumber</cmp-field-name>
-         <table-column>cardNumber</table-column>
-       </cmp-field-mapping>
-       <primkey-field>id</primkey-field>
-       <automatic-key-generation>
-         <generator-name>geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator</generator-name>
-         <primary-key-class>java.lang.Integer</primary-key-class>
-       </automatic-key-generation>
-     </entity>
-     <entity>
-       <ejb-name>ContactInfoEJB</ejb-name>
-       <table-name>CONTACTINFOS</table-name>
-       <cmp-field-mapping>
-         <cmp-field-name>id</cmp-field-name>
-         <cmp-field-class>java.lang.Integer</cmp-field-class>
-         <table-column>id</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>familyName</cmp-field-name>
-         <table-column>familyName</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>telephone</cmp-field-name>
-         <table-column>telephone</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>givenName</cmp-field-name>
-         <table-column>givenName</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>email</cmp-field-name>
-         <table-column>email</table-column>
-       </cmp-field-mapping>
-       <primkey-field>id</primkey-field>
-       <automatic-key-generation>
-         <generator-name>geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator</generator-name>
-         <primary-key-class>java.lang.Integer</primary-key-class>
-       </automatic-key-generation>
-     </entity>
-     <entity>
-       <ejb-name>AddressEJB</ejb-name>
-       <table-name>ADDRESSES</table-name>
-       <cmp-field-mapping>
-         <cmp-field-name>id</cmp-field-name>
-         <cmp-field-class>java.lang.Integer</cmp-field-class>
-         <table-column>id</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>zipCode</cmp-field-name>
-         <table-column>zipCode</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>state</cmp-field-name>
-         <table-column>state</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>streetName2</cmp-field-name>
-         <table-column>streetName2</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>streetName1</cmp-field-name>
-         <table-column>streetName1</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>country</cmp-field-name>
-         <table-column>country</table-column>
-       </cmp-field-mapping>
-       <cmp-field-mapping>
-         <cmp-field-name>city</cmp-field-name>
-         <table-column>city</table-column>
-       </cmp-field-mapping>
-       <primkey-field>id</primkey-field>
-       <automatic-key-generation>
-         <generator-name>geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator</generator-name>
-         <primary-key-class>java.lang.Integer</primary-key-class>
-       </automatic-key-generation>
-     </entity>
-     <entity>
-       <ejb-name>AccountEJB</ejb-name>
-       <table-name>ACCOUNTS</table-name>
-       <cmp-field-mapping>
-         <cmp-field-name>status</cmp-field-name>
-         <table-column>status</table-column>
-       </cmp-field-mapping>
-       <primkey-field>status</primkey-field>
-       <automatic-key-generation>
-         <generator-name>geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator</generator-name>
-         <primary-key-class>java.lang.Integer</primary-key-class>
-       </automatic-key-generation>
-     </entity>
-   </enterprise-beans>
-   <relationships>
-     <ejb-relation>
-       <ejb-relation-name>CustomerEJBaccount</ejb-relation-name>
-       <ejb-relationship-role>
-         <ejb-relationship-role-name>CustomerEJB</ejb-relationship-role-name>
-         <relationship-role-source>
-           <ejb-name>CustomerEJB</ejb-name>
-         </relationship-role-source>
-         <cmr-field>
-           <cmr-field-name>account</cmr-field-name>
-         </cmr-field>
-         <role-mapping>
-           <cmr-field-mapping>
-             <key-column>userId</key-column>
-             <foreign-key-column>AF1</foreign-key-column>
-           </cmr-field-mapping>
-         </role-mapping>
-       </ejb-relationship-role>
-     </ejb-relation>
-     <ejb-relation>
-       <ejb-relation-name>ContactInfoEJBaddress</ejb-relation-name>
-       <ejb-relationship-role>
-         <ejb-relationship-role-name>ContactInfoEJB</ejb-relationship-role-name>
-         <relationship-role-source>
-           <ejb-name>ContactInfoEJB</ejb-name>
-         </relationship-role-source>
-         <cmr-field>
-           <cmr-field-name>address</cmr-field-name>
-         </cmr-field>
-         <role-mapping>
-           <cmr-field-mapping>
-             <key-column>id</key-column>
-             <foreign-key-column>AF1</foreign-key-column>
-           </cmr-field-mapping>
-         </role-mapping>
-       </ejb-relationship-role>
-     </ejb-relation>
-     <ejb-relation>
-       <ejb-relation-name>CustomerEJBprofile</ejb-relation-name>
-       <ejb-relationship-role>
-         <ejb-relationship-role-name>CustomerEJB</ejb-relationship-role-name>
-         <relationship-role-source>
-           <ejb-name>CustomerEJB</ejb-name>
-         </relationship-role-source>
-         <cmr-field>
-           <cmr-field-name>profile</cmr-field-name>
-         </cmr-field>
-         <role-mapping>
-           <cmr-field-mapping>
-             <key-column>userId</key-column>
-             <foreign-key-column>AF1</foreign-key-column>
-           </cmr-field-mapping>
-         </role-mapping>
-       </ejb-relationship-role>
-     </ejb-relation>
-     <ejb-relation>
-       <ejb-relation-name>AccountEJBcontactInfo</ejb-relation-name>
-       <ejb-relationship-role>
-         <ejb-relationship-role-name>AccountEJB</ejb-relationship-role-name>
-         <relationship-role-source>
-           <ejb-name>AccountEJB</ejb-name>
-         </relationship-role-source>
-         <cmr-field>
-           <cmr-field-name>contactInfo</cmr-field-name>
-         </cmr-field>
-         <role-mapping>
-           <cmr-field-mapping>
-             <key-column>status</key-column>
-             <foreign-key-column>AF1</foreign-key-column>
-           </cmr-field-mapping>
-         </role-mapping>
-       </ejb-relationship-role>
-     </ejb-relation>
-     <ejb-relation>
-       <ejb-relation-name>AccountEJBcreditCard</ejb-relation-name>
-       <ejb-relationship-role>
-         <ejb-relationship-role-name>AccountEJB</ejb-relationship-role-name>
-         <relationship-role-source>
-           <ejb-name>AccountEJB</ejb-name>
-         </relationship-role-source>
-         <cmr-field>
-           <cmr-field-name>creditCard</cmr-field-name>
-         </cmr-field>
-         <role-mapping>
-           <cmr-field-mapping>
-             <key-column>status</key-column>
-             <foreign-key-column>AF1</foreign-key-column>
-           </cmr-field-mapping>
-         </role-mapping>
-       </ejb-relationship-role>
-     </ejb-relation>
-   </relationships>
-   <gbean gbeanName="geronimo.server:J2EEServer=geronimo,J2EEApplication=petstore,J2EEModule=customer-ejb,j2eeType=PKGenerator,name=AutoEntityGenerator"
class="org.openejb.entity.cmp.pkgenerator.AutoIncrementTablePrimaryKeyGeneratorWrapper">
-     <reference name="ManagedConnectionFactoryWrapper">
-       <gbean-name>geronimo.server:JCAResource=geronimo-derby-connector-1.0-SNAPSHOT.rar,name=DerbyDatasource,J2EEServer=geronimo,J2EEApplication=petstore,j2eeType=JCAManagedConnectionFactory</gbean-name>
-     </reference>
-     <attribute name="sql" type="java.lang.String">
-       insert into customer_ejb_sequence_table (dummy) values (1)
-     </attribute>
-     <attribute name="returnType" type="java.lang.Class">
-       java.lang.Integer
-     </attribute>
-   </gbean>
- </openejb-jar>
- }}}
  
   1. Create {{{asyncsender-ejb.xml}}}:
  

Mime
View raw message