2 Replies Latest reply on Feb 14, 2003 3:33 PM by Sacha Labourey

    JBoss clustering and fail-over help

    mousecat Newbie

      I am very new at Jboss, and hope somebody can help me with it. today, I set up a jboss cluster with 2 nodes. I changed the cluster-service.xml file using HA-JNDI and the nodes recognizes each other. However, when I shutdown one node, this following jsp page just return nothing, instead of saying "HelloWorld". If I don't put the initialization code into jspInit() function, then everything is fine. I think I might be do something wrong. Could anybody can give me some idea?

      <%@ page import="javax.naming.InitialContext,
      test.HelloWorldHome" %>
      private HelloWorld helloworld=null;
      public void jspInit() {
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "host1:56789,host2:56789");
      props.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      try {
      Context ctx=new InitialContext(props);
      Object obj=ctx.lookup("HelloWorld");
      HelloWorldHome home=(HelloWorldHome) javax.rmi
      .PortableRemoteObject.narrow(obj, HelloWorldHome.class);
      helloworld= home.create();
      System.out.println("System initialized");

      } catch (Exception e) {



      <%= helloworld.sayhello()%>