3 Replies Latest reply on Mar 18, 2013 9:15 AM by qtm

    jboss remote naming - too many open files on linux

    qtm

      Hello,

       

      If I specify an invalid hostname in the connection properties, some files/sockets/connections remain open:

       



      final Properties env = new Properties();


      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");   


      env.put(Context.PROVIDER_URL, "remote://inexistent-server-address:4647");

      Context ctx = new InitialContext(env);

       

      I can see lsof -p my_app_pid | wc -l  increasing with each connection try. Eventually it would reach the too many open files point.

      I'm using 1.0.5.

      Context ctx = null;

      try{

             ctx = new InitialContext(env);

      } finally{

      if (ctx != null){

            ctx.close();

      } }does not help.

       

      Any ideas how to solve this problem?