Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 7.2.0.GA
    • Fix Version/s: 7.2.2.CR1, 7.2.2.GA
    • Component/s: EJB
    • Labels:
      None

      Description

      Setting heartbeat on client side does not seem to be honored:

        public static Context getOldInitialContext(String host, Integer port, String username, String password)  throws NamingException {
         Properties props = new Properties();
         props.put(Context.INITIAL_CONTEXT_FACTORY,  "org.wildfly.naming.client.WildFlyInitialContextFactory");
         props.put("remote.connections", "node1");
         props.put("remote.connection.node1.port", "8080");  // the default remoting port, replace if necessary
         props.put("remote.connection.node1.host", "localhost");  // the host, replace if necessary
         props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false"); // the server defaults to SSL_ENABLED=false
         props.put("remote.connection.node1.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
         props.put("remote.connection.node1.username", username);
         props.put("remote.connection.node1.password", password);
         props.put("remote.connection.node1.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL", "5000");
         props.put("remote.connection.node1.connect.options.org.xnio.Options.READ_TIMEOUT", "10000");
         props.put("remote.connection.node1.connect.options.org.xnio.Options.KEEP_ALIVE", "true");
      
         props.put(Context.PROVIDER_URL, String.format("%s://%s:%d", "remote+http", host, port));
      
         return new InitialContext(props);
        }
      
      
        public static Context getInitialContext(String host, Integer port, String username, String password)  throws NamingException {
         Properties props = new Properties();
         props.put(Context.INITIAL_CONTEXT_FACTORY,  "org.wildfly.naming.client.WildFlyInitialContextFactory");
         props.put(Context.PROVIDER_URL, String.format("%s://%s:%d", "remote+http", host, port));
         if(username != null && password != null) {
            props.put(Context.SECURITY_PRINCIPAL, username);
            props.put(Context.SECURITY_CREDENTIALS, password);
          }
         props.put("jboss.naming.client.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL", "5000");
         props.put("jboss.naming.client.connect.options.org.xnio.Options.READ_TIMEOUT", "10000");
         props.put("jboss.naming.client.connect.options.org.xnio.Options.KEEP_ALIVE", "true");
         return new InitialContext(props);
        }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tmiyar Teresa Miyar Gil
                  Reporter:
                  bmaxwell Brad Maxwell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: