有关lomboz生成的ejb-jar。xml和jboss。xml文件需要修改地方的记录

jboss。xml

////////////////////////////////////////////////////////////

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">

<jboss>

   <unauthenticated-principal>nobody</unauthenticated-principal>

   <enterprise-beans>

     <!--
       To add beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called jboss-beans.xml that contains
       the <session></session>, <entity></entity> and <message-driven></message-driven>
       markup for those beans.
     -->

      <entity>
         <ejb-name>Item</ejb-name>
         <jndi-name>ItemBean</jndi-name>
         <local-jndi-name>ItemLocal</local-jndi-name>

      </entity>
      <entity>
         <ejb-name>Supplier</ejb-name>
         <jndi-name>SupplierBean</jndi-name>
         <local-jndi-name>SupplierLocal</local-jndi-name>

      </entity>
      <entity>
         <ejb-name>Manager</ejb-name>
         <jndi-name>ManagerBean</jndi-name>
         <local-jndi-name>ManagerLocal</local-jndi-name>
         <resource-ref>
            <res-ref-name>jdbc/hehe</res-ref-name>
            <jndi-name>java:/EJBTEST</jndi-name>
         </resource-ref>

      </entity>
      <entity>
         <ejb-name>Customer</ejb-name>
         <jndi-name>CustomerBean</jndi-name>
         <local-jndi-name>CustomerLocal</local-jndi-name>
         <resource-ref>
            <res-ref-name>jdbc/hehe</res-ref-name>
            <jndi-name>java:/EJBTEST</jndi-name>
         </resource-ref>

      </entity>

      <session>
         <ejb-name>StoreAccessState</ejb-name>
         <jndi-name>StoreAccessStateBean</jndi-name>
         <local-jndi-name>StoreAccessStateLocal</local-jndi-name>
         <configuration-name>Standard Stateful SessionBean</configuration-name>
         <resource-ref>
            <res-ref-name>jdbc/hehe</res-ref-name>
            <jndi-name>java:/EJBTEST</jndi-name>
         </resource-ref>

      </session>
      <session>
         <ejb-name>StoreAccess</ejb-name>
         <jndi-name>StoreAccessBean</jndi-name>
         <local-jndi-name>StoreAccessLocal</local-jndi-name>
         <ejb-local-ref>
            <ejb-ref-name>ejb/ItemLocal</ejb-ref-name>
            <jndi-name>ItemLocal</jndi-name>
         </ejb-local-ref>
         <ejb-local-ref>
            <ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
            <jndi-name></jndi-name>
         </ejb-local-ref>
         <ejb-local-ref>
            <ejb-ref-name>ejb/ManagerLocal</ejb-ref-name>
            <jndi-name>ManagerLocal</jndi-name>
         </ejb-local-ref>
         <ejb-local-ref>
            <ejb-ref-name>ejb/ItemLocal</ejb-ref-name>
            <jndi-name>ItemLocal</jndi-name>
         </ejb-local-ref>
         <ejb-local-ref>
            <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
            <jndi-name>SupplierLocal</jndi-name>
         </ejb-local-ref>
         <resource-ref>
            <res-ref-name>jdbc/hehe</res-ref-name>
            <jndi-name>java:/EJBTEST</jndi-name>
         </resource-ref>

      </session>

      <message-driven>
         <ejb-name>RequestItems</ejb-name>
         <destination-jndi-name>queue/MdbQueue</destination-jndi-name>
         <ejb-local-ref>
            <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
            <jndi-name>SupplierLocal</jndi-name>
         </ejb-local-ref>
         <ejb-ref>
            <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
            <jndi-name>StoreAccessBean</jndi-name>
         </ejb-ref>
      </message-driven>

   </enterprise-beans>

   <resource-managers>
   </resource-managers>

</jboss>

 

ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar >

   <description><![CDATA[No Description.]]></description>
   <display-name>Generated by XDoclet</display-name>

   <enterprise-beans>

      <!-- Session Beans -->
      <session >
         <description><![CDATA[]]></description>

         <ejb-name>StoreAccessState</ejb-name>

         <home>au.com.tusc.sessionState.StoreAccessStateHome</home>
         <remote>au.com.tusc.sessionState.StoreAccessState</remote>
         <local-home>au.com.tusc.sessionState.StoreAccessStateLocalHome</local-home>
         <local>au.com.tusc.sessionState.StoreAccessStateLocal</local>
         <ejb-class>au.com.tusc.sessionState.StoreAccessStateSession</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>

         <resource-ref >
            <res-ref-name>jdbc/hehe</res-ref-name>
            <res-type>javax.sql.Datasource</res-type>
            <res-auth>Container</res-auth>
         </resource-ref>

      </session>

      <session >
         <description><![CDATA[]]></description>

         <ejb-name>StoreAccess</ejb-name>

         <home>au.com.tusc.session.StoreAccessHome</home>
         <remote>au.com.tusc.session.StoreAccess</remote>
         <local-home>au.com.tusc.session.StoreAccessLocalHome</local-home>
         <local>au.com.tusc.session.StoreAccessLocal</local>
         <ejb-class>au.com.tusc.session.StoreAccessSession</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>

         <ejb-local-ref >
            <ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
            <local>au.com.tusc.bmp.CustomerLocal</local>
            <ejb-link>Customer</ejb-link>
         </ejb-local-ref>
         <ejb-local-ref >
            <ejb-ref-name>ejb/ItemLocal</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>au.com.tusc.cmp.ItemLocalHome</local-home>
            <local>au.com.tusc.cmp.ItemLocal</local>
            <ejb-link>Item</ejb-link>
         </ejb-local-ref>
         <ejb-local-ref >
            <ejb-ref-name>ejb/ManagerLocal</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>au.com.tusc.bmp.ManagerLocalHome</local-home>
            <local>au.com.tusc.bmp.ManagerLocal</local>
            <ejb-link>Manager</ejb-link>
         </ejb-local-ref>
         <ejb-local-ref >
            <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>au.com.tusc.cmp.SupplierLocalHome</local-home>
            <local>au.com.tusc.cmp.SupplierLocal</local>
            <ejb-link>Supplier</ejb-link>
         </ejb-local-ref>

         <resource-ref >
            <res-ref-name>jdbc/hehe</res-ref-name>
            <res-type>javax.sql.Datasource</res-type>
            <res-auth>Container</res-auth>
         </resource-ref>

      </session>

     <!--
       To add session beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called session-beans.xml that contains
       the <session></session> markup for those beans.
     -->

      <!-- Entity Beans -->
      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Item</ejb-name>

         <home>au.com.tusc.cmp.ItemHome</home>
         <remote>au.com.tusc.cmp.Item</remote>
         <local-home>au.com.tusc.cmp.ItemLocalHome</local-home>
         <local>au.com.tusc.cmp.ItemLocal</local>

         <ejb-class>au.com.tusc.cmp.ItemCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.String</prim-key-class>
         <reentrant>False</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>MyStoreItem</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[Returns the itemID]]></description>
            <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the supplierID]]></description>
            <field-name>supplierID</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the description]]></description>
            <field-name>description</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the quantity]]></description>
            <field-name>quantity</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the price]]></description>
            <field-name>price</field-name>
         </cmp-field>
         <primkey-field>itemID</primkey-field>

         <query>
            <query-method>
               <method-name>findAll</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM MyStoreItem as a]]></ejb-ql>
         </query>
         <query>
            <query-method>
               <method-name>findBySupplierID</method-name>
               <method-params>
                  <method-param>java.lang.String</method-param>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM MyStoreItem a where a.supplierID = ?1]]></ejb-ql>
         </query>
         <query>
            <query-method>
               <method-name>findByOutOfStock</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(c) FROM MyStoreItem c where c.quantity = 0]]></ejb-ql>
         </query>
   <!-- Write a file named ejb-finders-ItemBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Supplier</ejb-name>

         <home>au.com.tusc.cmp.SupplierHome</home>
         <remote>au.com.tusc.cmp.Supplier</remote>
         <local-home>au.com.tusc.cmp.SupplierLocalHome</local-home>
         <local>au.com.tusc.cmp.SupplierLocal</local>

         <ejb-class>au.com.tusc.cmp.SupplierCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.String</prim-key-class>
         <reentrant>False</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>MyStoreSupplier</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[Returns the supplierID]]></description>
            <field-name>supplierID</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the userID]]></description>
            <field-name>userID</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the firstName]]></description>
            <field-name>firstName</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the lastName]]></description>
            <field-name>lastName</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the address]]></description>
            <field-name>address</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the message]]></description>
            <field-name>message</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Returns the creditLimit]]></description>
            <field-name>creditLimit</field-name>
         </cmp-field>
         <primkey-field>supplierID</primkey-field>

         <query>
            <query-method>
               <method-name>findAll</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM MyStoreSupplier as a]]></ejb-ql>
         </query>
         <query>
            <query-method>
               <method-name>findUserID</method-name>
               <method-params>
                  <method-param>java.lang.String</method-param>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(b) FROM MyStoreSupplier as b where b.userID = ?1]]></ejb-ql>
         </query>
   <!-- Write a file named ejb-finders-SupplierBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Manager</ejb-name>

         <home>au.com.tusc.bmp.ManagerHome</home>
         <remote>au.com.tusc.bmp.Manager</remote>
         <local-home>au.com.tusc.bmp.ManagerLocalHome</local-home>
         <local>au.com.tusc.bmp.ManagerLocal</local>

         <ejb-class>au.com.tusc.bmp.ManagerBMP</ejb-class>
         <persistence-type>Bean</persistence-type>
         <prim-key-class>au.com.tusc.bmp.ManagerPK</prim-key-class>
         <reentrant>False</reentrant>

         <resource-ref >
            <res-ref-name>jdbc/hehe</res-ref-name>
            <res-type>javax.sql.Datasource</res-type>
            <res-auth>Container</res-auth>
         </resource-ref>

      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Customer</ejb-name>

         <home>au.com.tusc.bmp.CustomerHome</home>
         <remote>au.com.tusc.bmp.Customer</remote>
         <local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
         <local>au.com.tusc.bmp.CustomerLocal</local>

         <ejb-class>au.com.tusc.bmp.CustomerBMP</ejb-class>
         <persistence-type>Bean</persistence-type>
         <prim-key-class>au.com.tusc.bmp.CustomerPK</prim-key-class>
         <reentrant>False</reentrant>

         <resource-ref >
            <res-ref-name>jdbc/hehe</res-ref-name>
            <res-type>javax.sql.Datasource</res-type>
            <res-auth>Container</res-auth>
         </resource-ref>

      </entity>

     <!--
       To add entity beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called entity-beans.xml that contains
       the <entity></entity> markup for those beans.
     -->

      <!-- Message Driven Beans -->
      <message-driven >
         <description><![CDATA[]]></description>

         <ejb-name>RequestItems</ejb-name>

         <ejb-class>au.com.tusc.mdb.RequestItemsBean</ejb-class>

         <transaction-type>Bean</transaction-type>
         <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
         <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
         </message-driven-destination>

         <ejb-ref >
            <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>au.com.tusc.session.StoreAccessHome</home>
            <remote>au.com.tusc.session.StoreAccess</remote>
            <ejb-link>StoreAccess</ejb-link>
         </ejb-ref>

         <ejb-local-ref >
            <ejb-ref-name>ejb/SupplierLocal</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>au.com.tusc.cmp.SupplierLocalHome</local-home>
            <local>au.com.tusc.cmp.SupplierLocal</local>
            <ejb-link>Supplier</ejb-link>
         </ejb-local-ref>

      </message-driven>

     <!--
       To add message driven beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called message-driven-beans.xml that contains
       the <message-driven></message-driven> markup for those beans.
     -->

   </enterprise-beans>

   <!-- Relationships -->

   <!-- Assembly Descriptor -->
   <assembly-descriptor >
     <!--
       To add additional assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
     -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- transactions -->

   <!-- finder transactions -->
   </assembly-descriptor>

</ejb-jar>

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页