0 Replies Latest reply on Apr 18, 2016 3:17 AM by Ben Gao

    jboss 7.2.final each time call remote ejb, it produces a connection,and not close

    Ben Gao Novice

      I use remote ejb like this:

        Context context;
        
      try {

        
      // https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Development_Guide/EJB_Client_Properties.html

        
      Properties props = new Properties();

        props
      .put("remote.connections", "default");
        props
      .put("remote.connection.default.host", "127.0.0.1");
        props
      .put("remote.connection.default.port", "4447");

        props
      .put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
        props
      .put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
        props
      .put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");

        props
      .put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        props
      .put("org.jboss.ejb.client.scoped.context", "true");

        context
      = new InitialContext(props);

        
      AddRemote service = (AddRemote) context.lookup(EJB_ADD_JNDI_NAME);


      I call it each time is ok ,but I find the tcp connection not close and it in ESTABLISHED.

      like:

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63198 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63199 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63255 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63256 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63320 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63321 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63376 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63377 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63441 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63442 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63500 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63501 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63563 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63564 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63621 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63622 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63684 ESTABLISHED

      tcp4 0 0 172.17.248.xx.22003 172.17.238.xx.63685 ESTABLISHED

      tcp 0 0 172.17.248.233.22003 *.* LISTEN

       

      22003 is remote port.

       

      I want to know how to close connection or Multiplexing this link