3 Replies Latest reply on Oct 29, 2006 1:09 PM by darrencnz1976

    how to call the session bean after deployed


      hi, i have deployed a sample session bean into jboss as, (java:comp namespace of the JSP.war application:) . the deployment is successfull.

      but i having problem to call it for testing. the structure is:

      Project: JSP
      Package: bean
      files: Hello.java, HelloBean.java, HelloHome.java, HelloLocal.java, HelloLocalHome.java,

      I calling from HelloClient.java , coding as follow:

      Properties props = System.getProperties();
      Context ctx = new InitialContext(props);
      Object obj = ctx.lookup("HelloBean");

      and i have this error msg: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

      what's the right name i should lookup? I have made this file under "META-INF" folder:
      <!DOCTYPE ejb-jar PUBLIC ?-//Sun Microsystems, Inc.//DTD Enterprise Æ
      JavaBeans 2.0//EN? ? http://java.sun.com/dtd/ejb-jar_2_0.dtd?>



      can anyone answer my question. thanks alot