前へ     目次     索引     DocHome     次へ     
iPlanet Application Server 開発者ガイド



付録 C   サンプル配置ファイル



この付録には、アプリケーションおよびコンポーネントの配置に使われる iPlanet Application Server 配置記述子 (DD) のサンプルファイルがあります。

この付録には、次の DD XML のサンプルファイルがあります。



アプリケーション DD XML ファイル

アプリケーション DD によって、すべてのアプリケーションの内容をトップレベルから見ることができます。2 つのタイプのアプリケーション DD があります。一つは J2EE アプリケーション DD で、もう一つは iPlanet Application Server アプリケーション DD です。これらの記述子は、DTD によって指定された XML ファイルです。

J2EE アプリケーション DD については、J2EE 仕様書バージョン 2.1 の第 8.4 節の「J2EE: application XML DTD」に説明があります。iPlanet Application Server アプリケーション DD については、第 11 章「配置のためのパッケージ化」の Web アプリケーション DTD を参照してください。


サンプルアプリケーション DD XML ファイル

この節では、J2EE アプリケーションDD XML ファイルの例を示します。この後に示す J2EE アプリケーション DD のファイル名は application.xml です。

<?xml version="1.0" ?>

<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>

<Application>
   <description>Application description</description>
   <display-name>estore</display-name>
   <module>
       <ejb>estoreEjb.jar</ejb>
   </module>
   <module>
       <web>
       <web-uri>estore.war</web-uri>
       <context-root>estore</context-root>
   </web>
   </module>
   <security-role>
       <description>the customer role</description>
       <role-name>customer</role-name>
   </security-role>
</application>



Web アプリケーション DD XML ファイル



Web アプリケーション DD は、開発者、編成者、および配置者間で、Web アプリケーションの要素および設定情報を伝えます。これらの記述子は、DTD によって指定された XML ファイルです。

Web アプリケーション ARchive (.war) ファイルには、J2EE Web アプリケーション DD と iPlanet Application Server Web アプリケーション DD があります。J2EE Web アプリケーション DD については、Java Servlet 仕様書バージョン 2.2 の 第 13 章「Deployment Descriptors」に説明があります。iPlanet Application Server アプリケーション DD については、第 11 章「配置のためのパッケージ化」の Web アプリケーション DTD を参照してください。


サンプル Web アプリケーション DD XML ファイル

この節では、J2EE Web アプリケーションDD XML ファイルの例を示します。この後に示す Web アプリケーション DD のファイル名は web.xml です。

<?xml version="1.0" ?>
<!DOCTYPE web-app>

<web-app>
   <description>no description</description>
   <display-name>DukesPetStoreWebTier</display-name>
   <Servlet>
       <description>no description</description>
       <display-name>centralJsp</display-name>
       <servlet-name>webTierEntryPoint</servlet-name>
       <jsp-file>Main.jsp</jsp-file>
       <load-on-startup>-1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>webTierEntryPoint</servlet-name>
       <url-pattern>/control/*</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>
   <error-page>
       <exception-type>java.lang.Exception</exception-type>
       <location>/errorpage.jsp</location>
   </error-page>
   <security-constraint>
       <web-resource-collection>
          <web-resource-name>MySecureBit0</web-resource-name>
          <description>no description</description>
          <url-pattern>/control/placeorder</url-pattern>
          <http-method>POST</http-method>
          <http-method>GET</http-method>
       </web-resource-collection>
       <auth-constraint>
          <description>no description</description>
          <role-name>customer</role-name>
       </auth-constraint>
       <user-data-constraint>
          <description>no description</description>
          <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>
   </security-constraint>
   <security-constraint>
       <web-resource-collection>
          <web-resource-name>MySecureBit1</web-resource-name>

          <description>no description</description>
          <url-pattern>/Main.jsp/signin</url-pattern>
          <http-method>POST</http-method>
          <http-method>GET</http-method>
       </web-resource-collection>
       <auth-constraint>
          <description>no description</description>
          <role-name>customer</role-name>
       </auth-constraint>
       <user-data-constraint>
          <description>no description</description>
          <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>
   </security-constraint>
   <security-constraint>
       <web-resource-collection>
          <web-resource-name>MySecureBit1</web-resource-name>
          <description>no description</description>
          <url-pattern>/control/signin</url-pattern>
          <http-method>POST</http-method>
          <http-method>GET</http-method>
       </web-resource-collection>
       <auth-constraint>
          <description>no description</description>
          <role-name>customer</role-name>
       </auth-constraint>
       <user-data-constraint>
          <description>no description</description>
          <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>
   </security-constraint>
   <security-constraint>
       <web-resource-collection>
          <web-resource-name>MySecureBit0</web-resource-name>
          <description>no description</description>
          <url-pattern>/Main.jsp/placeorder</url-pattern>
          <http-method>POST</http-method>
          <http-method>GET</http-method>
       </web-resource-collection>
       <auth-constraint>
          <description>no description</description>
          <role-name>customer</role-name>
       </auth-constraint>
       <user-data-constraint>
          <description>no description</description>
          <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>

   </security-constraint>

   <login-config>
       <auth-method>FORM</auth-method>
       <realm-name>default</realm-name>
       <form-login-config>
          <form-login-page>/estore/login.jsp</form-login-page>
          <form-error-page>/estore/error.html</form-error-page>
       </form-login-config>
   </login-config>

   <security-role>
       <description>the customer role</description>
       <role-name>customer</role-name>
   </security-role>

   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>account</ejb-ref-name>
       <ejb-ref-type>Entity</ejb-ref-type>
       <home>com.sun.estore.account.ejb.AccountHome</home>
       <remote>com.sun.estore.account.ejb.Account</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>order</ejb-ref-name>
       <ejb-ref-type>Entity</ejb-ref-type>
       <home>com.sun.estore.order.ejb.OrderHome</home>
       <remote>com.sun.estore.order.ejb.Order</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>mailer</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.sun.estore.mail.ejb.MailerHome</home>
       <remote>com.sun.estore.mail.ejb.Mailer</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>estorekeeper</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.sun.estore.control.ejb.EStorekeeperHome</home>
       <remote>com.sun.estore.control.ejb.EStorekeeper</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>catalog</ejb-ref-name>

       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.sun.estore.catalog.ejb.CatalogHome</home>
       <remote>com.sun.estore.catalog.ejb.Catalog</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>cart</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.sun.estore.cart.ejb.ShoppingCartHome</home>
       <remote>com.sun.estore.cart.ejb.ShoppingCart</remote>
   </ejb-ref>
   <ejb-ref>
       <description>no description</description>
       <ejb-ref-name>inventory</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>com.sun.estore.inventory.ejb.InventoryHome</home>
       <remote>com.sun.estore.inventory.ejb.Inventory</remote>
   </ejb-ref>
</web-app>


サンプル iPlanet Application Server Web アプリケーション DD XML ファイル

この節では、iPlanet Application Server Web アプリケーション DD XML ファイルの例を示します。この後に示す iPlanet Application Server Web アプリケーション DD のファイル名は ias-web.xml です。

<?xml version="1.0" ?>
<!DOCTYPE web-app>

<ias-web-app>
   <Servlet>
       <servlet-name>webTierEntryPoint</servlet-name>
       <guid>{Deadbeef-AB3F-11D2-98C5-000000000000}</guid>
   </servlet>

   <ejb-ref>
       <ejb-ref-name>account</ejb-ref-name>
       <jndi-name>ejb/estoreWar/account</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>order</ejb-ref-name>
       <jndi-name>ejb/estoreWar/order</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>mailer</ejb-ref-name>
       <jndi-name>ejb/estoreWar/mailer</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>estorekeeper</ejb-ref-name>
       <jndi-name>ejb/estoreWar/estorekeeper</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>catalog</ejb-ref-name>
       <jndi-name>ejb/estoreWar/catalog</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>cart</ejb-ref-name>
       <jndi-name>ejb/estoreWar/cart</jndi-name>
   </ejb-ref>
   <ejb-ref>
       <ejb-ref-name>inventory</ejb-ref-name>
       <jndi-name>ejb/estoreWar/inventory</jndi-name>
   </ejb-ref>
</ias-web-app>



EJB-JAR DD XML ファイル



EJB-JAR ファイルには、Enterprise JavaBeans 仕様書バージョン 1.1 に定義されている形式の DD と、第 11 章「配置のためのパッケージ化」で定義されている形式の iPlanet Application Server EJB DD が含まれています。


サンプル J2EE EJB-JAR DD XML ファイル

この節では、J2EE EJB DD XML ファイルの例を示します。この後に示す EJB-JAR DD のファイル名は ejb-jar.xml です。

<?xml version="1.0" ?>

<ejb-jar>
   <description>no description</description>
   <display-name>Ejb1</display-name>
   <enterprise-beans>
       <session>
          <description>no description</description>
          <display-name>TheMailer</display-name>
          <ejb-name>TheMailer</ejb-name>
          <home>com.sun.estore.mail.ejb.MailerHome</home>
          <remote>com.sun.estore.mail.ejb.Mailer</remote>
          <ejb-class>com.sun.estore.mail.ejb.MailerEJB</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          <ejb-ref>
             <ejb-ref-name>account</ejb-ref-name>
             <ejb-ref-type>Entity</ejb-ref-type>
             <home>com.sun.estore.account.ejb.AccountHome</home>
             <remote>com.sun.estore.account.ejb.Account</remote>
             <ejb-link>TheAccount</ejb-link>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>order</ejb-ref-name>
             <ejb-ref-type>Entity</ejb-ref-type>
             <home>com.sun.estore.order.ejb.OrderHome</home>
             <remote>com.sun.estore.order.ejb.Order</remote>
             <ejb-link>TheOrder</ejb-link>
          </ejb-ref>
          <resource-ref>
             <description>description</description>
             <res-ref-name>MailSession</res-ref-name>
             <res-type>javax.mail.Session</res-type>
             <res-auth>Application</res-auth>
          </resource-ref>
       </session>
       <session>
          <description>no description</description>
          <display-name>TheEstorekeeper</display-name>
          <ejb-name>TheEstorekeeper</ejb-name>
          <home>com.sun.estore.control.ejb.EStorekeeperHome</home>
          <remote>com.sun.estore.control.ejb.EStorekeeper</remote>
          <ejb-class>com.sun.estore.control.ejb.EStorekeeperEJB
                    </ejb-class>
          <session-type>Stateful</session-type>
          <transaction-type>Container</transaction-type>
          <env-entry>
             <env-entry-name>sendConfirmationMail</env-entry-name>
             <env-entry-type>java.lang.String</env-entry-type>
             <env-entry-value>false</env-entry-value>
          </env-entry>
          <ejb-ref>
             <ejb-ref-name>account</ejb-ref-name>
             <ejb-ref-type>Entity</ejb-ref-type>
             <home>com.sun.estore.account.ejb.AccountHome</home>
             <remote>com.sun.estore.account.ejb.Account</remote>
             <ejb-link>TheAccount</ejb-link>
          </ejb-ref>

          <ejb-ref>
             <ejb-ref-name>order</ejb-ref-name>
             <ejb-ref-type>Entity</ejb-ref-type>
             <home>com.sun.estore.order.ejb.OrderHome</home>
             <remote>com.sun.estore.order.ejb.Order</remote>
             <ejb-link>TheOrder</ejb-link>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>mailer</ejb-ref-name>
             <ejb-ref-type>Session</ejb-ref-type>
             <home>com.sun.estore.mail.ejb.MailerHome</home>
             <remote>com.sun.estore.mail.ejb.Mailer</remote>
             <ejb-link>TheMailer</ejb-link>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>catalog</ejb-ref-name>
             <ejb-ref-type>Session</ejb-ref-type>
             <home>com.sun.estore.catalog.ejb.CatalogHome</home>
             <remote>com.sun.estore.catalog.ejb.Catalog</remote>
             <ejb-link>TheCatalog</ejb-link>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>cart</ejb-ref-name>
             <ejb-ref-type>Session</ejb-ref-type>
             <home>com.sun.estore.cart.ejb.ShoppingCartHome</home>
             <remote>com.sun.estore.cart.ejb.ShoppingCart</remote>
             <ejb-link>TheCart</ejb-link>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>inventory</ejb-ref-name>
             <ejb-ref-type>Session</ejb-ref-type>
             <home>com.sun.estore.inventory.ejb.InventoryHome
                       </home>
             <remote>com.sun.estore.inventory.ejb.Inventory
                       </remote>
             <ejb-link>TheInventory</ejb-link>
          </ejb-ref>
       </session>

       <entity>
          <description>no description</description>
          <display-name>TheOrder</display-name>
          <ejb-name>TheOrder</ejb-name>
          <home>com.sun.estore.order.ejb.OrderHome</home>
          <remote>com.sun.estore.order.ejb.Order</remote>
          <ejb-class>com.sun.estore.order.ejb.OrderEJB</ejb-class>
          <persistence-type>Bean</persistence-type>

          <prim-key-class>java.lang.Integer</prim-key-class>
          <reentrant>False</reentrant>
          <resource-ref>
             <description>description</description>
             <res-ref-name>EstoreDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Application</res-auth>
          </resource-ref>
       </entity>
       <entity>
          <description>no description</description>
          <display-name>TheAccount</display-name>
          <ejb-name>TheAccount</ejb-name>
          <home>com.sun.estore.account.ejb.AccountHome</home>
          <remote>com.sun.estore.account.ejb.Account</remote>
          <ejb-class>com.sun.estore.account.ejb.AccountEJB
                       </ejb-class>
          <persistence-type>Bean</persistence-type>
          <prim-key-class>java.lang.String</prim-key-class>
          <reentrant>False</reentrant>
          <resource-ref>
             <description>description</description>
             <res-ref-name>EstoreDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Application</res-auth>
          </resource-ref>
       </entity>

       <session>
          <description>no description</description>
          <display-name>TheCart</display-name>
          <ejb-name>TheCart</ejb-name>
          <home>com.sun.estore.cart.ejb.ShoppingCartHome</home>
          <remote>com.sun.estore.cart.ejb.ShoppingCart</remote>
          <ejb-class>com.sun.estore.cart.e
          <transaction-type>Container</transaction-type>
       </session>
       <session>
          <description>no description</description>
          <display-name>TheInventory</display-name>
          <ejb-name>TheInventory</ejb-name>
          <home>com.sun.estore.inventory.ejb.InventoryHome</home>
          <remote>com.sun.estore.inventory.ejb.Inventory</remote>
          <ejb-class>com.sun.estore.inventory.ejb.InventoryEJB
                    </ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>

          <resource-ref>
             <description>description</description>
             <res-ref-name>InventoryDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Application</res-auth>
          </resource-ref>
       </session>
       <session>
          <description>no description</description>
          <display-name>TheCatalog</display-name>
          <ejb-name>TheCatalog</ejb-name>
          <home>com.sun.estore.catalog.ejb.CatalogHome</home>
          <remote>com.sun.estore.catalog.ejb.Catalog</remote>
          <ejb-class>com.sun.estore.catalog.ejb.CatalogEJB
                    </ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          <resource-ref>
             <description>description</description>
             <res-ref-name>InventoryDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Application</res-auth>
          </resource-ref>
       </session>
   </enterprise-beans>
   <assembly-descriptor>
       <container-transaction>
          <method>
             <ejb-name>TheMailer</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>sendOrderConfirmationMail</method-name>
             <method-param>int</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheMailer</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheMailer</ejb-name>
             <method-intf>Remote</method-intf>

             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheMailer</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheMailer</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>handleEvent</method-name>
             <method-param>com.sun.estore.control.event.EStoreEvent
                       </method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getShoppingCart</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>

       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getAccount</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getOrder</method-name>
             <method-param>int</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getOrders</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>

          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheEstorekeeper</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getCatalog</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getOrderDetails</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>

             <method-name>remove</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheOrder</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>changeContactInformation</method-name>
             <method-param>com.sun.estore.util.ContactInformation
                       </method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>

       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>remove</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getAccountDetails</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheAccount</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>updateItemQty</method-name>
             <method-param>java.lang.String</method-param>
             <method-param>int</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>deleteItem</method-name>
             <method-param>java.lang.String</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>

             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>empty</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>addItem</method-name>
             <method-param>java.lang.String</method-param>
             <method-param>int</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getItems</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>

       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>addItem</method-name>
             <method-param>java.lang.String</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCart</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>updateInventory</method-name>

             <method-param>com.sun.estore.inventory.ejb.
                       InventoryDetails</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>updateQuantity</method-name>
             <method-param>java.lang.String</method-param>
             <method-param>int</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getInventory</method-name>
             <method-param>java.lang.String</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheInventory</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getQuantity</method-name>
             <method-param>java.lang.String</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getPrimaryKey</method-name>

          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getEJBHome</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getHandle</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>searchProducts</method-name>
             <method-param>java.util.Vector</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>findProducts</method-name>
             <method-param>com.sun.estore.catalog.ejb.Category
                       </method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>isIdentical</method-name>
             <method-param>javax.ejb.EJBObject</method-param>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>

       <container-transaction>
          <method>
             <ejb-name>TheCatalog</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>getAllCategories</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
       </container-transaction>
   </assembly-descriptor>
</ejb-jar>


サンプル iPlanet Application Server EJB-JAR DD XML ファイル

この節では、 iPlanet Application Server EJB-JAR DD XML ファイルの例を示します。この後に示す EJB-JAR DD のファイル名は ias-ejb-jar.xml です。

<ias-ejb-jar>
   <enterprise-beans>
       <session>
          <ejb-name>TheMailer</ejb-name>
          <guid>{Deadbabe-AB3F-11D2-98C5-0060B0EF0618}</guid>
          <pass-timeout>100</pass-timeout>
          <session-timeout>300</session-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <ejb-ref>
             <ejb-ref-name>account</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheAccount</jndi-name>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>order</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheOrder</jndi-name>
          /ejb-ref>
       </session>
       <session>
          <ejb-name>TheEstorekeeper</ejb-name>
          <guid>{Deadbabe-AB3F-11D2-98C5-000011112222}</guid>
          <pass-timeout>100</pass-timeout>
          <session-timeout>300</session-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <ejb-ref>
             <ejb-ref-name>account</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheAccount</jndi-name>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>order</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheOrder</jndi-name>
          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>mailer</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheMailer</jndi-name>

          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>catalog</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheCatalog</jndi-name>

          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>cart</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheCart</jndi-name>

          </ejb-ref>
          <ejb-ref>
             <ejb-ref-name>inventory</ejb-ref-name>
             <jndi-name>ejb/estoreEjb/TheInventory</jndi-name>
          </ejb-ref>
       </session>
       <session>
          <ejb-name>TheInventory</ejb-name>
          <guid>{deadbabe-ab3f-11d2-98c5-999999990002}</guid>
          <pass-timeout>100</pass-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <session-timeout>300</session-timeout>
       </session>
       <session>
          <ejb-name>TheCatalog</ejb-name>
          <guid>{deadbabe-ab3f-11d2-98c5-999999990003}</guid>
          <pass-timeout>100</pass-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <session-timeout>300</session-timeout>
       </session>
       <session>
          <ejb-name>TheCart</ejb-name>
          <guid>{deadbabe-ab3f-11d2-98c5-999999990001}</guid>
          <pass-timeout>100</pass-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <session-timeout>300</session-timeout>
       </session>
       <entity>
          <ejb-name>TheAccount</ejb-name>
          <guid>{deadbabe-ab3f-11d2-98c5-999999990000}</guid>
          <pass-timeout>100</pass-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <pool-manager>
             <commit-option>NO_CACHE_READY_INSTANCE</commit-option>
             <Ready-pool-timeout>0</Ready-pool-timeout>
             <Ready-pool-maxsize>0</Ready-pool-maxsize>
          </pool-manager>
       </entity>
       <entity>
          <ejb-name>TheOrder</ejb-name>
          <guid>{deadbabe-ab3f-11d2-98c5-333344445555}</guid>
          <pass-timeout>100</pass-timeout>
          <is-thread-safe>false</is-thread-safe>
          <pass-by-value>false</pass-by-value>
          <persistence-manager>
             <persistence-manager-factory-class-name>
                 com.netscape.server.ejb.PersistenceManagerFactory
                 </persistence-manager-factory-class-name>
             <properties-file-location>
             EmployeeRecord_pm1.xml
             </properties-file-location>
             <external-xml-location>
             </external-xml-location>
          </persistence-manager>
          <pool-manager>
             <commit-option>NO_CACHE_READY_INSTANCE</commit-option>
             <Ready-pool-timeout>0</Ready-pool-timeout>
             <Ready-pool-maxsize>0</Ready-pool-maxsize>
          </pool-manager>
       </entity>
   </enterprise-beans>
</ias-ejb-jar>



iPlanet Application Server クライアント DD XML ファイル



サンプル iPlanet Application Server DD XML ファイルは次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<ias-application-client>
   <ejb-ref>
      <ejb-ref-name>External</ejb-ref-name>
      <jndi-name>ejb/com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             Test</jndi-name>
   </ejb-ref>
   <ejb-ref>
      <ejb-ref-name>External1</ejb-ref-name>
      <jndi-name>ejb/com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             Test1</jndi-name>
   </ejb-ref>
</ias-application-client>



RMI/IIOP Client DD XML ファイル



サンプル RMI/IIOP クライアント DD XML ファイルは次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application-client PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN' ユhttp://java.sun.com/j2ee/dtds/application-client_1_2.dtdユ>

<application-client>
   <display-name>appclient_ejb_depC_ejbref_client</display-name>
   <description>CTS appclient ejbref test</description>
   <ejb-ref>
      <ejb-ref-name>External</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <home>com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             TestHome</home>
      <remote>com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             Test</remote>
      <ejb-link>Test</ejb-link>
   </ejb-ref>
   <ejb-ref>
      <ejb-ref-name>External1</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <home>com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             Test1Home</home>
      <remote>com.sun.cts.tests.appclient.deploy.ejb.ejbref.
             Test1</remote>
   </ejb-ref>
</application-client>



リソース DD XML ファイル



サンプルリソース DD XML ファイルは次のとおりです。

<ias-resource>
   <resource>
      <jndi-name>jdbc/SampleSybaseDS1</jndi-name>
      <jdbc>
          <database>nasqadev</database>
          <datasource>SYBFRED</datasource>
          <username>aparna</username>
          <password>aparnak</password>
          <driver-type>SYBASE_CTLIB</driver-type>
      </jdbc>
   </resource>
</ias-resource>


前へ     目次     索引     DocHome     次へ     
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.

最新更新日 2002 年 3 月 6 日