Appendix B: Deployment Descriptors and Document Type Declaration

In this appendix we'll identify the deployment descriptors for the sample Petstore application and the corresponding document type declaration (DTD). The Petstore application is a demonstration program that's available for testing. It and other sample programs are available from http://otn.oracle.com/sample_code/tech/java/oc4j/index.html .

Deployment Descriptor Files

In this section we'll identify key deployment descriptor files, their location, and describe them.

Location

Located in the OC4J $ORACLE_HOME/application-deployments/ application_name directory and in subdirectories beneath it.

Files and Descriptions

In the following sections we'll list each deployment descriptor file, provide a description and DTD link, and show you a sample file.

orion-application.xml

Description: Root application configuration file containing application configuration settings and references to application component files (EJB and WAR).

DTD link: http://xmlns.oracle.com/ias/dtds/orion-application-9_04.dtd

Sample: A sample orion-application.xml file is provided.

 <?xml version="1.0"?> <!DOCTYPE orion-application PUBLIC "-//ORACLE//DTD OC4J Application runtime 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-application-9_04.dtd"> <orion-application deployment-version="9.0.4.0.0" default-data- source="jdbc/OracleDS" treat-zero-as-null="true">         <ejb-module remote="false" path="customerEjb.jar" />         <ejb-module remote="false" path="petstoreEjb.jar" />         <ejb-module remote="false" path="personalizationEjb.jar" />         <ejb-module remote="false" path="shoppingcartEjb.jar" />         <ejb-module remote="false" path="mailerEjb.jar" />         <ejb-module remote="false" path="signonEjb.jar" />         <ejb-module remote="false" path="inventoryEjb.jar" />         <web-module id="petstore" path="petstore.war" />         <persistence path="persistence" />         <principals path="principals.xml" />         <jazn provider="XML" location="jazn-data.xml" />         <log>                 <file path="application.log" />         </log>         <namespace-access>                 <read-access>                         <namespace-resource root="">                                 <security-role-mapping name="&lt;jndi-user- role&gt;">                                         <group name="administrators" />                                 </security-role-mapping>                         </namespace-resource>                 </read-access>                 <write-access>                         <namespace-resource root="">                                 <security-role-mapping name="&lt;jndi-user- role&gt;">                                         <group name="administrators" />                                 </security-role-mapping>                         </namespace-resource>                 </write-access>         </namespace-access> </orion-application> 

jazn-data.xml

Description: Stores JAAS security data when using the XML provider type.

DTD link: http://xmlns.oracle.com/ias/dtds/jazn-data.dtd

Sample: A sample jazn-data.xml file is provided.

 <?xml version="1.0" encoding="UTF-8" standalone='yes'?> <!DOCTYPE jazn-data PUBLIC "JAZN-XML Data" "http://xmlns.oracle.com/ias/dtds/jazn-data.dtd"> <jazn-data> <!-- JAZN Realm Data --> <jazn-realm>   <realm>     <name>jazn.com</name>     <users>     </users>     <roles>     </roles>   </realm> </jazn-realm> <!-- JAZN Policy Data --> <jazn-policy> </jazn-policy> <!-- Permission Class Data --> <jazn-permission-classes> </jazn-permission-classes> <!-- Principal Class Data --> <jazn-principal-classes> </jazn-principal-classes> <!-- Login Module Data --> <jazn-loginconfig> </jazn-loginconfig> </jazn-data> 

principals.xml

Description: Stores user and group configuration for the application.

DTD link: http://xmlns.oracle.com/ias/dtds/principals-9_04.dtd

Sample: A sample principals.xml file is provided.

 <?xml version="1.0"?> <!DOCTYPE principals PUBLIC "//ORACLE//DTD OC4J Principals 9.04//EN" "http://xmlns.oracle.com/ias/dtds/principals-9_04.dtd"> <principals>         <groups>         </groups>         <users>         </users> </principals> 

orion-web .xml

Description: Contains application settings for web application component.

DTD link: http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd

Sample: A sample orion-web.xml file is provided.

 <?xml version="1.0"?> <!DOCTYPE orion-web-app PUBLIC "-//ORACLE//DTD OC4J Web Application 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd"> <orion-web-app         deployment-version="9.0.4.0.0"         jsp-cache-directory="./persistence"         temporary-directory="./temp" >         <!-- Uncomment this element to control web application class loader behavior.                 <web-app-class-loader search-local-classes-first="true" include- war-manifest-class-path="true" />         -->         <resource-ref-mapping name="jdbc/EstoreDataSource" />         <ejb-ref-mapping name="ejb/catalog/Catalog" />         <ejb-ref-mapping name="ejb/cart/Cart" />         <ejb-ref-mapping name="ejb/customer/Customer" />         <ejb-ref-mapping name="ejb/profilemgr/ProfileMgr" />         <ejb-ref-mapping name="ejb/scc/Scc" />         <ejb-ref-mapping name="ejb/inventory/Inventory" /> </orion-web-app> 

orion-ejb-jar .xml

Description: Contains EJB settings within the deployed Petstore mailerEjb.jar file. There is one of these files for each deployed EJB JAR file.

DTD link: http://xmlns.oracle.com/ias/dtds/orion-ejb-jar-9_04.dtd

Sample: A sample orion-ejb-jar.xml file is provided.

 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE orion-ejb-jar PUBLIC "-//ORACLE//DTD OC4J Enterprise JavaBeans runtime 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar-9_04.dtd"> <orion-ejb-jar deployment-version="9.0.4.0.0" deployment-time="fcf1c8610c">         <enterprise-beans>                 <session-deployment name="TheMailer" max-tx-retries="0" location="TheMailer" wrapper ="MailerHome_StatelessSessionHomeWrapper15" persistence-filename="TheMailer">                         <resource-ref-mapping name="mail/MailSession" />                 </session-deployment>         </enterprise-beans>         <assembly-descriptor>                 <default-method-access>                         <security-role-mapping name="&lt;default-ejb-caller- role&gt;" impliesAll="true" />                 </default-method-access>         </assembly-descriptor> </orion-ejb-jar> 

web.xml

Description: Located in $ORACLE_HOME/applications /application_name/application_name /WEB-INF . Contains configuration settings for a web application.

DTD link: http://java.sun.com/j2ee/dtds/web-app_2.2.dtd

Sample: A sample web.xml file is provided.

 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'> <web-app>   <display-name>WebTier</display-name>   <description>Web Tier DD for the PetStore application</description>   <servlet>     <servlet-name>webTierEntryPoint</servlet-name>     <display-name>centralServlet</display-name>     <description>no description</description>     <servlet- class>com.sun.j2ee.blueprints.petstore.control.web.MainServlet</servlet-class>   </servlet>   <servlet-mapping>     <servlet-name>webTierEntryPoint</servlet-name>     <url-pattern>/control/*</url-pattern>   </servlet-mapping>   <servlet>     <servlet-name>populateServlet</servlet-name>     <display-name>Populate Servlet</display-name>     <description>no description</description>     <servlet- class>com.sun.j2ee.blueprints.tools.populate.web.PopulateServlet</servlet-class>   </servlet>   <servlet-mapping>     <servlet-name>populateServlet</servlet-name>     <url-pattern>/populate</url-pattern>   </servlet-mapping>   <session-config>     <session-timeout>54</session-timeout>   </session-config>   <welcome-file-list>     <welcome-file>index.html</welcome-file>   </welcome-file-list>   <resource-ref>     <res-ref-name>jdbc/EstoreDataSource</res-ref-name>     <res-type>javax.sql.DataSource</res-type>     <res-auth>Container</res-auth>   </resource-ref>   <env-entry>     <env-entry-name>ejb/catalog/CatalogDAOClass</env-entry-name>     <env-entry-type>java.lang.String</env-entry-type>     <env-entry- value>com.sun.j2ee.blueprints.shoppingcart.catalog.dao.CatalogDAOImpl</env-entry- value>   </env-entry>   <env-entry>     <env-entry-name>ejb/profilemgr/ProfileMgrDAOClass</env-entry-name>     <env-entry-type>java.lang.String</env-entry-type>     <env-entry- value>com.sun.j2ee.blueprints.personalization.profilemgr.dao.ProfileMgrDAOImpl</e nv-entry-value>   </env-entry>   <env-entry>     <env-entry-name>server/ServerType</env-entry-name>     <env-entry-value>Oracle9iAS (1.0.2.2) Containers for J2EE</env-entry-value>     <env-entry-type>java.lang.String</env-entry-type>   </env-entry>   <ejb-ref>     <ejb-ref-name>ejb/catalog/Catalog</ejb-ref-name>     <ejb-ref-type>Session</ejb-ref-type>     <home>com.sun.j2ee.blueprints.shoppingcart.catalog.ejb.CatalogHome</home>     <remote>com.sun.j2ee.blueprints.shoppingcart.catalog.ejb.Catalog</remote>   </ejb-ref>   <ejb-ref>     <ejb-ref-name>ejb/cart/Cart</ejb-ref-name>     <ejb-ref-type>Session</ejb-ref-type>     <home>com.sun.j2ee.blueprints.shoppingcart.cart.ejb.ShoppingCartHome</home>     <remote>com.sun.j2ee.blueprints.shoppingcart.cart.ejb.ShoppingCart</remote>   </ejb-ref>   <ejb-ref>     <ejb-ref-name>ejb/customer/Customer</ejb-ref-name>     <ejb-ref-type>Session</ejb-ref-type>     <home>com.sun.j2ee.blueprints.customer.customer.ejb.CustomerHome</home>     <remote>com.sun.j2ee.blueprints.customer.customer.ejb.Customer</remote>   </ejb-ref>   <ejb-ref>     <ejb-ref-name>ejb/profilemgr/ProfileMgr</ejb-ref-name>     <ejb-ref-type>Entity</ejb-ref-type> <home>com.sun.j2ee.blueprints.personalization.profilemgr.ejb.ProfileMgrHome</home > <remote>com.sun.j2ee.blueprints.personalization.profilemgr.ejb.ProfileMgr</remote >   </ejb-ref>   <ejb-ref>     <ejb-ref-name>ejb/scc/Scc</ejb-ref-name>     <ejb-ref-type>Session</ejb-ref-type> <home>com.sun.j2ee.blueprints.petstore.control.ejb.ShoppingClientControllerHome</ home> <remote>com.sun.j2ee.blueprints.petstore.control.ejb.ShoppingClientController</re mote>   </ejb-ref>   <ejb-ref>     <ejb-ref-name>ejb/inventory/Inventory</ejb-ref-name>     <ejb-ref-type>Entity</ejb-ref-type>     <home>com.sun.j2ee.blueprints.inventory.ejb.InventoryHome</home>     <remote>com.sun.j2ee.blueprints.inventory.ejb.Inventory</remote>   </ejb-ref> </web-app> 


Oracle Application Server 10g. J2EE Deployment and Administration
Oracle Application Server 10g: J2EE Deployment and Administration
ISBN: 1590592352
EAN: 2147483647
Year: 2004
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net