1 Reply Latest reply on Sep 13, 2002 3:36 AM by tdang

    EJBLocalHome

    jakasjava

      I have a question with respec to EJBLocalHome
      I was passing remoteinterfaces as parameters in other beans. This was not part of standard. So I changed all the remote interfaces to Local interface I mean EJBLocalHome and EJBLocalObject
      and EntityBean is the bean implementing. as shown in below snippet


      public interface Person extends javax.ejb.EJBLocalObject
      {
      }
      public interface PersonHome extends javax.ejb.EJBLocalHome
      {
      }
      abstract public class PersonBean implements EntityBean
      {
      }

      Now in my ejb-jar.xml I have the dd as


      <ejb-name>ThePerson</ejb-name>
      <local-home>com.epeople.person.PersonHome</local-home>
      com.epeople.person.Person
      <ejb-class>com.epeople.person.PersonBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>PersonBean</abstract-schema-name>
      <cmp-field>
      <field-name>iD</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>personStatusRaw</field-name>
      </cmp-field>
      <cmp-field>


      in jboss.xml
      <configuration-name>ThePerson Container Configuration</configuration-name><ejb-name>ThePerson</ejb-name><jndi-name>epeople/person</jndi-name><read-only>false</read-only>True

      The bean gets deployed. But when I lookup, says epeople/person not found
      when i open the jmx-console, i see local/ThePerson is bound. why does it bound this ? is this by default!!!!


      Pls help.

      thanks
      sudhi

        • 1. Re: EJBLocalHome
          tdang

          For local interfaces use <local-jndi-name> for mapping, so in your case you have to map:

          <local-jndi-name>epeople/person<local-jndi-name>

          Otherwise it is bound to local namespace by default (as in your case now).

          Hope this helps.