6 Replies Latest reply on Jul 1, 2006 11:18 AM by Garth

    Is JBoss 4.0.4 CR2 ready for production?

    Garth Newbie

      I am trying to get a simple Session Bean to work. The client is below. If this is not ready I can go to J2EE 1.4 version. GarthSession is in LDAP. I saw it in JMX View JNDIView.
      Please advise.


      public static void main(String[] args) throws NamingException {
      Object ref = null;
      InitialContext ctx = new InitialContext();
      ctx.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      // ctx.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      // ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      // ctx.addToEnvironment(Context.PROVIDER_URL,"localhost");

      ref= ctx.lookup("GarthSessionBean");
      GarthSessionRemote emp = (GarthSessionRemote)PortableRemoteObject.narrow(ref,GarthSessionRemote.class);
      // String test = emp.getAnswer();
      System.out.println("employee = " + emp.getAnswer());