1 Reply Latest reply on Nov 12, 2003 4:53 AM by nraghuram

    Using Local- and LocalHome Interfaces

    tdsdev

      Hi,

      can anybody give me an example for using the Local- and LocalHome Intefaces to access EntityBeans?

      Everybody says: "....use Local Intefaces they are faster..." but in every example I saw, they are usig only the Remote Interface.

      Please help!

      Thanx

        • 1. Re: Using Local- and LocalHome Interfaces
          nraghuram

          the home interface will extend EJBLocalHome and the remote interface will extend EJBLocalObject

          your ejb-jar.xml entry for an entity will be like this

          <ejb-name>LOCALEJB</ejb-name>
          <local-home>xyzLocalEntityHome</local-home>
          xyzLocalEntityObject
          <ejb-class>xyzLocalEntityBean</ejb-class>
          <persistence-type>Container</persistence-type>
          <prim-key-class>java.lang.Integer</prim-key-class>
          <primkey-field>Id</primkey-field>
          False
          <cmp-version>2.x</cmp-version>
          <abstract-schema-name>XYZ</abstract-schema-name>

          <cmp-field>
          <field-name>Id</field-name>
          </cmp-field>


          hth
          raghu