2 Replies Latest reply on Apr 14, 2003 8:33 AM by Juha Lindfors

    help..how to lookup a local

    souchiwang Newbie

      jboss.xml

      <enterprise-beans>

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

      </enterprise-beans>

      ejb-jar.xml
      <ejb-name>Customer</ejb-name>

      iman.customer.interfaces.CustomerHome
      iman.customer.interfaces.Customer

      <local-home>iman.customer.interfaces.CustomerLocalHome</local-home>
      iman.customer.interfaces.CustomerLocal
      <ejb-class>iman.customer.entity.CustomerBean</ejb-class>

      client.java
      Context ctx = new InitialContext();
      CustomerLocalHome home = (CustomerLocalHome)ctx.lookup("Customer");
      CustomerLocal art = home.findByPrimaryKey("iman");
      ....
      there are exception.....ClassCastException..
      how to lookup a localhome..