2 Replies Latest reply on Aug 14, 2002 9:34 AM by morgan

    Use LocalHome in jboss,I meet a question

    wellday

      I write a simple hello bean ,use LocalHome instead of Home,but when I try to lookup the bean ,I get a error as "hello not bound".I wonder if there is something diffefent?
      the files I used as follows:
      ejb-jar.xml:
      <ejb-jar>
      <display-name>Hello EJB</display-name>
      <enterprise-beans>

      <ejb-name>Hello</ejb-name>
      <local-home>HelloLocalHome</local-home>
      HelloLocal
      <ejb-class>HelloBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>

      </enterprise-beans>
      </ejb-jar>

      HelloClient.java:
      ...
      InitialContext jndiContext = new InitialContext();
      System.out.println("Got context");

      // Get a reference to the Interest Bean
      Object ref = jndiContext.lookup("Hello");
      System.out.println("Got reference");
      ...

      thanks a lot!!!