Okiee...

I'm trying to solve this problem of <ejb-local-ref> and JNDI lookup problems 
for tutorial
i published nearly 2 yrs back using  JBoss-3.2.1 

Here it goes.....
As can be seen by the dtds of jboss.xml for JBoss-3.21 under docs/dtds 
directory...
it states that you don't need <ejb-local-ref>..  as
Snippet from jboss.xml dtd for JBoss.-3.21.
<enterprise-beans>
  |     <entity>
  |       <ejb-name />
  |       <jndi-name />
  |       <local-jndi-name />
  |       <read-only>
  |       <configuration-name>
  |       <security-proxy>                                                      
                                     --------------- no <ejb-local-ref> tag 
defined here... 
  |       <ejb-ref>
  |       <resource-ref>
  |         <res-ref-name />
  |         <resource-name />
  |       </resource-ref>
  |       <resource-env-ref>
  |       <clustered />
  |       <cluster-config>
  |     </entity>
  |     <session>
  |       <ejb-name />
  |       <jndi-name />
  |       <local-jndi-name />
  |       <configuration-name>
  |       <security-proxy>                                                      
                                 ---------------- no  <ejb-local-ref> tag 
defined here... 
  |       <ejb-ref>
  |       <resource-ref>
  |         <res-ref-name />
  |         <resource-name />
  |       </resource-ref>
  |       <resource-env-ref>
  |       <clustered />
  |       <cluster-config>
  |     </session>
Similar is the case for MDB's as well.

So what that mean is that the following tags are not needed as shown in 
tutorial 
at various places as there is a bug in JBoss-3.2.1 for this part of jboss.xml 
file.
Since Item, Supplier, Customer, Manager, DeliverItem, RequestItem are 
invoked by SessionFacades in same JVM we don't need 
<ejb-ref> 
tag so we need only 
<ejb-local-ref> tag only.
But in JBoss-3.2.1 it  is not needed as shown above in the snippet code 
from jboss.xml [/i] dtd and it works fine without that. 

Note : It wont be a good design at all  to invoke call from Session Facade on 
BMP/CMP beans using <ejb-ref> tag if they are in same JVM. As the overhead of 
calls will be very high. 
So lets remove those tags which we don't need at all. And leave rest of the tags
This is from StoreAccessBean.java after all the 8 chapters are completed.
/**
  |  * @ejb.bean name="StoreAccess"
  |  *  jndi-name="StoreAccessBean"
  |  *  type="Stateless" 
  |  *  @ejb.dao class="au.com.tusc.session.StoreAccessDAO"
  |  *      impl-class="au.com.tusc.dao.StoreAccessDAOImpl"
  |  *  @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
  |  *  res-type="javax.sql.Datasource"
  |  *  res-auth="Container"
  |  *  @jboss.resource-ref  res-ref-name="jdbc/DefaultDS"
  |  *  jndi-name="java:/DefaultDS"
  |  *  @ejb.ejb-ref ejb-name="Customer"
  |  *      view-type="local"
  |  *      ref-name="ejb/CustomerLocal"
  |  *  @ejb.ejb-ref ejb-name="Manager"
  |  *      view-type="local"
  |  *      ref-name="ejb/ManagerLocal"
  |  *  @ejb.ejb-ref ejb-name="Item"
  |  *      view-type="local"
  |  *      ref-name="ejb/ItemLocal"
  |  *   @ejb.ejb-ref ejb-name="Supplier"
  |  *      view-type="local"
  |  *      ref-name="ejb/SupplierLocal"
  |  **/
Note : there is no @jboss.ejb-ref-jndi tag shown above ... remove these ones 
shown below from StroAcessBean.java.

@jboss.ejb-ref-jndi ref-name="CustomerLocal"
  |      jndi-name="CustomerLocal"
  | @jboss.ejb-ref-jndi ref-name="ItemLocal"
  |      jndi-name="ItemLocal" 
  | @jboss.ejb-ref-jndi ref-name="SupplierLocal"
  |      jndi-name="SupplierLocal" 
  | @jboss.ejb-ref-jndi ref-name="ManagerLocall"
  |       jndi-name="ItemLocal" 


NOTE : - This is  a mistake in the tutorial :-(
Now in of JBoss-4.0. you will need these tags in StoreAccessBean.java as shown  
below

  | @jboss.ejb-local-ref ref-name=?ejb/SupplierLocal?                           
                                                        
jndi-name=?SupplierLocal?
  | @jboss.ejb-local-ref ref-name=?ejb/ManagerLocal?                            
                                                       jndi-name=?ManagerLocal?
  | @jboss.ejb-local-ref ref-name=?ejb/ItemLocal?                               
                                                    jndi-name=?SupplierLocal?
  | @jboss.ejb-local-ref ref-name=?ejb/CustomerLocal?                           
                                                        
jndi-name=?CustomerLocal?
  | 

No changes are required in Chapter ? 4.

Changes in Chapter 5.
Two changes here... in Customer and Manager bean

  | /**
  |  *  @ejb.bean name="Customer"
  |  *  jndi-name="CustomerBean"
  |  *  type="BMP"
  |  *      view-type="local"
  |  *  @ejb.dao class="au.com.tusc.bmp.CustomerDAO"
  |  *       impl-class="au.com.tusc.dao.CustomerDAOImpl"
  |  *  @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
  |  *       res-type="javax.sql.Datasource"
  |  *       res-auth="Container"
  |  *  @jboss.resource-ref  res-ref-name="jdbc/DefaultDS"
  |  *       jndi-name="java:/DefaultDS"
  |  *  @ejb.util  generate="logical"
  | **/ 
  | 
1. view-type=?local for @ejb.bean has been added so that doesn't generate the 
remote interface (Don't get confused here i'm not referring to Remote interface 
of Bean here ..;-) )
2 . @ejb.util  generate="logical"
this is  being added so that it generates only logical names for lookup not 
physical names, as  beans are in same JVM so we don't need  any physical names.

Similarly for Manager Bean as well. 

  | /**
  |  * @ejb.bean name="Manager"
  |  *  jndi-name="ManagerBean"
  |  *  type="BMP" 
  |  *      view-type="local"
  |  *  @ejb.dao class="au.com.tusc.bmp.ManagerDAO"
  |  *       impl-class="au.com.tusc.dao.ManagerDAOImpl"
  |  *  @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
  |  *       res-type="javax.sql.Datasource"
  |  *       res-auth="Container"
  |  *  @jboss.resource-ref  res-ref-name="jdbc/DefaultDS"
  |  *       jndi-name="java:/DefaultDS"
  |  * @ejb.util  generate="logical"
  | **/
  | 
Chapter 6.
Same as two changes in Chapter 5 in Item Bean and Supplier Bean.

  | 1. @ejb.bean view-type=?local?
  | 2. @ejb.util generate physical=?true?
  | 
In Item Bean  

  | /**
  |  *  @ejb.bean name="Item"
  |  *  jndi-name="ItemBean"
  |  *  type="CMP"
  |  *      primkey-field="itemID"
  |  *      schema="MyStoreItem" 
  |  *      cmp-version="2.x"
  |  *      view-type="local"
  |  *  @ejb.persistence 
  |  *       table-name="Item" 
  |  *  @ejb.finder 
  |  *       query="SELECT OBJECT(a) FROM MyStoreItem as a"  
  |  *       signature="java.util.Collection findAll()"  
  |  *  @ejb.finder 
  |  *       query="SELECT OBJECT(b) FROM MyStoreItem b where b.supplierID = 
?1"  
  |  *       signature="java.util.Collection findSupplierID(java.lang.String 
supplierID)"
  |  *  @ejb.finder 
  |  *       query="SELECT OBJECT(c) FROM MyStoreItem c where c.quantity = 0"  
  |  *       signature="java.util.Collection findByOutOfStock()"  
  | *   @ejb.util  generate="logical"
  | **/
  | 
Supplier Bean

  | /**
  |  * @ejb.bean name="Supplier"
  |  *  jndi-name="SupplierBean"
  |  *  type="CMP"
  |  *      primkey-field="supplierID"
  |  *      schema="MyStoreSupplier" 
  |  *      cmp-version="2.x"
  |  *      view-type="local"
  |  *  @ejb.persistence 
  |  *       table-name="Supplier" 
  |  *  @ejb.finder 
  |  *       query="SELECT OBJECT(a) FROM MyStoreSupplier as a"  
  |  *       signature="java.util.Collection findAll()"
  |  *  @ejb.finder 
  |  *       query="SELECT Object(b) FROM MyStoreSupplier as b where b.userID = 
?1"  
  |  *        signature="au.com.tusc.cmp.SupplierLocal 
findUserID(java.lang.String userID)"  
  |  *  @ejb.util  generate="logical"
  |  **/
  | 

Chapter 7.
Only change here is that

  |  @jboss.ejb-ref-jndi ref-name="ItemLocal"
  |  jndi-name="ItemLocal" 
  | 
is being removed from DeliverItemsBean as it is not needed in this version of 
JBoss-3.2.1 as shown below

  | /**
  |  * @ejb.bean name="DeliverItems" 
  |  *     acknowledge-mode="Auto-acknowledge" 
  |  *     destination-type="javax.jms.Queue" 
  |  *     subscription-durability="NonDurable" 
  |  *     transaction-type="Bean" 
  |  * @ejb.ejb-ref
  |  *      ejb-name="StoreAccess"
  |  *      view-type="remote"
  |  *      ref-name="StoreAccess"
  |  * @ejb.ejb-ref
  |  *      ejb-name="Item"
  |  *      view-type="local"
  |  *      ref-name="ejb/ItemLocal"
  |  * @jboss.ejb-ref-jndi ref-name="StoreAccess"
  |  *  jndi-name="StoreAccessBean"
  |  * @jboss.destination-jndi-name
  |  *      name="queue/DelMdbQueue"
  |   **/
  | 
But with JBoss-4.0 you will need this tag 

  | @jboss.ejb-local-ref ref-name=?ejb/ItemLocal?                               
                                                    jndi-name=?ItemLocal?
  | 

Similarly in RequestItem Bean

  | /**
  |  * @ejb.bean name="RequestItems" 
  |  *      acknowledge-mode="Auto-acknowledge" 
  |  *      destination-type="javax.jms.Queue" 
  |  *      subscription-durability="NonDurable" 
  |  *      transaction-type="Bean" 
  |  * @ejb.ejb-ref
  |  *      ejb-name="StoreAccess"
  |  *      view-type="remote"
  |  *      ref-name="StoreAccess"
  |  * @ejb.ejb-ref
  |  *      ejb-name="Supplier"
  |  *      view-type="local"
  |  *      ref-name="ejb/SupplierLocal"
  |  *  @jboss.ejb-ref-jndi ref-name="StoreAccess"
  |  *       jndi-name="StoreAccessBean"
  |  *  @jboss.destination-jndi-name
  |  *      name="queue/MdbQueue"
  |  **/
  | 

You will have to add this tag shown below with JBoss-4.0 
@jboss.ejb-local-ref ref-name=?ejb/SupplierLocal? jndi-name=?SupplierLocal?
  | 

No Change is required for chapter 9 as it uses Local interfaces of 
StoreAccessBean,  which is being generated along with remote ones

Also this is how ejb-jar.xml looks like finally.

  | <?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>
  |          
<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/DefaultDS</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/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/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/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/DefaultDS</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>
  |          <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>findSupplierID</method-name>
  |                <method-params>
  |                   <method-param>java.lang.String</method-param>
  |                </method-params>
  |             </query-method>
  |             <ejb-ql>[CDATA[SELECT OBJECT(b) FROM MyStoreItem b where 
b.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>
  |          <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>
  |          <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/DefaultDS</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>
  |          <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/DefaultDS</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>
  |             <subscription-durability>NonDurable</subscription-durability>
  |          </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>
  |       <message-driven >
  |          <description>[CDATA[]]</description>
  |          <ejb-name>DeliverItems</ejb-name>
  |          <ejb-class>au.com.tusc.mdb.DeliverItemsBean</ejb-class>
  |          <transaction-type>Bean</transaction-type>
  |          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
  |          <message-driven-destination>
  |             <destination-type>javax.jms.Queue</destination-type>
  |             <subscription-durability>NonDurable</subscription-durability>
  |          </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/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>
  |       </message-driven>
  |    </enterprise-beans>
  |    <!-- Relationships -->
  |    <!-- Assembly Descriptor -->
  |    <assembly-descriptor >
  |    <!-- finder transactions -->
  |    </assembly-descriptor>
  | </ejb-jar>
  | 

And finally jboss.xml looks like this

  | <?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>
  |          <local-jndi-name>ItemLocal</local-jndi-name>
  |       </entity>
  |       <entity>
  |          <ejb-name>Supplier</ejb-name>
  |          <local-jndi-name>SupplierLocal</local-jndi-name>
  |       </entity>
  |       <entity>
  |          <ejb-name>Manager</ejb-name>
  |          <local-jndi-name>ManagerLocal</local-jndi-name>
  |          <resource-ref>
  |             <res-ref-name>jdbc/DefaultDS</res-ref-name>
  |             <jndi-name>java:/DefaultDS</jndi-name>
  |          </resource-ref>
  |       </entity>
  |       <entity>
  |          <ejb-name>Customer</ejb-name>
  |          <local-jndi-name>CustomerLocal</local-jndi-name>
  |          <resource-ref>
  |             <res-ref-name>jdbc/DefaultDS</res-ref-name>
  |             <jndi-name>java:/DefaultDS</jndi-name>
  |          </resource-ref>
  |       </entity>
  |       <session>
  |          <ejb-name>StoreAccessState</ejb-name>
  |          <jndi-name>StoreAccessStateBean</jndi-name>
  |   <local-jndi-name>StoreAccessStateLocal</local-jndi-name>
  |          <resource-ref>
  |             <res-ref-name>jdbc/DefaultDS</res-ref-name>
  |             <jndi-name>java:/DefaultDS</jndi-name>
  |          </resource-ref>
  |       </session>
  |       <session>
  |          <ejb-name>StoreAccess</ejb-name>
  |          <jndi-name>StoreAccessBean</jndi-name>
  |          <local-jndi-name>StoreAccessLocal</local-jndi-name>
  |          <resource-ref>
  |             <res-ref-name>jdbc/DefaultDS</res-ref-name>
  |             <jndi-name>java:/DefaultDS</jndi-name>
  |          </resource-ref>
  |       </session>
  |       <message-driven>
  |          <ejb-name>RequestItems</ejb-name>
  |          <destination-jndi-name>queue/MdbQueue</destination-jndi-name>
  |          <ejb-ref>
  |             <ejb-ref-name>ejb/StoreAccess</ejb-ref-name>
  |             <jndi-name>StoreAccessBean</jndi-name>
  |          </ejb-ref>
  |       </message-driven>
  |       <message-driven>
  |          <ejb-name>DeliverItems</ejb-name>
  |          <destination-jndi-name>queue/DelMdbQueue</destination-jndi-name>
  |          <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>
  | 

And this how JNDIView looks like after deploying the MyStoreMgr.jar 
Some bits has been  removed in this snippet.



java:comp namespace of the StoreAccess bean:
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- jdbc (class: org.jnp.interfaces.NamingContext)
  |   |   +- DefaultDS[link -> java:/DefaultDS] (class: javax.naming.LinkRef)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- SupplierLocal[link -> SupplierLocal] (class: javax.naming.LinkRef)
  |   |   +- CustomerLocal[link -> CustomerLocal] (class: javax.naming.LinkRef)
  |   |   +- ManagerLocal[link -> ManagerLocal] (class: javax.naming.LinkRef)
  |   |   +- ItemLocal[link -> ItemLocal] (class: javax.naming.LinkRef)

java:comp namespace of the RequestItems bean:
  +- UserTransaction (class: javax.transaction.UserTransaction)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- SupplierLocal[link -> SupplierLocal] (class: javax.naming.LinkRef)
  |   |   +- StoreAccess[link -> StoreAccessBean] (class: javax.naming.LinkRef)

Global JNDI Namespace
org.jboss.mq.SpyXAConnectionFactory)
  +- queue (class: org.jnp.interfaces.NamingContext)
  |   +- D (class: org.jboss.mq.SpyQueue)
  |   +- C (class: org.jboss.mq.SpyQueue)
  |   +- B (class: org.jboss.mq.SpyQueue)
  |   +- A (class: org.jboss.mq.SpyQueue)
  |   +- DelMdbQueue (class: org.jboss.mq.SpyQueue)
  |   +- testQueue (class: org.jboss.mq.SpyQueue)
  |   +- ex (class: org.jboss.mq.SpyQueue)
  |   +- DLQ (class: org.jboss.mq.SpyQueue)
  |   +- MdbQueue (class: org.jboss.mq.SpyQueue)
  +- StoreAccessLocal (proxy: $Proxy222 implements interface 
au.com.tusc.session.StoreAccessLocalHome)
  +- ItemLocal (proxy: $Proxy218 implements interface 
au.com.tusc.cmp.ItemLocalHome)
  +- RMIConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  +- SupplierLocal (proxy: $Proxy219 implements interface 
au.com.tusc.cmp.SupplierLocalHome)
org.jboss.mq.SpyXAConnectionFactory)
  +- topic (class: org.jnp.interfaces.NamingContext)
  |   +- testDurableTopic (class: org.jboss.mq.SpyTopic)
  |   +- testTopic (class: org.jboss.mq.SpyTopic)
  |   +- securedTopic (class: org.jboss.mq.SpyTopic)
  +- StoreAccessStateBean (proxy: $Proxy223 implements interface 
au.com.tusc.sessionState.StoreAccessStateHome,interface javax.ejb.Handle)
  +- ManagerLocal (proxy: $Proxy220 implements interface 
au.com.tusc.bmp.ManagerLocalHome)
  +- ejb (class: org.jnp.interfaces.NamingContext)
  |   +- mgmt (class: org.jnp.interfaces.NamingContext)
  |   |   +- MEJB (proxy: $Proxy42 implements interface 
javax.management.j2ee.ManagementHome,interface javax.ejb.Handle)
  +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
  +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  +- CustomerLocal (proxy: $Proxy221 implements interface 
au.com.tusc.bmp.CustomerLocalHome)
  +- RMIXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- OIL2XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- HASessionState (class: org.jnp.interfaces.NamingContext)
  |   +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
  +- UIL2XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  +- invokers (class: org.jnp.interfaces.NamingContext)
  |   +- localhost.localdomain (class:   +- StoreAccessBean (proxy: $Proxy224 
implements interface au.com.tusc.session.StoreAccessHome,interface 
javax.ejb.Handle)
  +- UILConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  +- jetty (class: org.jnp.interfaces.NamingContext)
  |   +- CMPState (proxy: $Proxy39 implements interface 
org.mortbay.j2ee.session.interfaces.CMPStateHome,interface javax.ejb.Handle)
  +- jmx (class: org.jnp.interfaces.NamingContext)
  |   +- invoker (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor (proxy: $Proxy31 implements interface 
org.jboss.jmx.adaptor.rmi.RMIAdaptor)
  |   +- rmi (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor (class: 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868463#3868463

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868463


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to