0 Replies Latest reply on Aug 7, 2005 1:24 AM by arvind p

    JNDI Lookup in Cluster Environment

    arvind p Newbie

      Hi all,

      We have developed our application on a Weblogic server and right now we are migrating to JBoss. I have gone through the tutorials of Jboss Cluserting. And I'm testing my application in Jboss clustering environment and my application is failing and this is happening because od JNDI lookup in my JSP page.

      In my Jboss-xml, I specified JNDI name as


      JNDI lookup code in my JSP for InitializationSLBean is given below and the error which it is printing it on the console is ClassCastException and the last debug statement is printed as InitializationSLHomeHome.

      Properties prop = new Properties();
      prop.put(InitialContext.PROVIDER_URL, "jnp://localhost:1099");
      Context context = new InitialContext(prop);
      InitializationSLHome initializationSLHome = (InitializationSLHome) context.lookup("InitializationSLHome");
      System.out.println("initializationSLHome ::: " + initializationSLHome);

      Same code is working in a non clustered environment.

      please help me to solve this problem