[jboss-jira] [JBoss JIRA] (REMJMX-86) RemotingConnector & VersionedConectionFactory need configurable connection, channel & versioned connection timeouts

Brad Maxwell (JIRA) issues at jboss.org
Wed Jun 25 14:15:28 EDT 2014


    [ https://issues.jboss.org/browse/REMJMX-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979083#comment-12979083 ] 

Brad Maxwell edited comment on REMJMX-86 at 6/25/14 2:14 PM:
-------------------------------------------------------------

Adding configuration options where properties are looked for in the environment map passed into JMXConnectorFactory.connect(...) and the timeouts can be configured.  And also check system properties which will override the properties passed into JMXConnectorFactory.connect

JMXConnector connector = JMXConnectorFactory.connect(serviceURL, environment);

Order of priority: 
- System property overrides values passed into the env map
- Env map property overrides default
- Default is 30 seconds

Order of specificity: 
- specific timeout property set
   -- For Channel timeout: org.jboss.remoting-jmx.timeout.channel
   -- For Connection timeout: org.jboss.remoting-jmx.timeout.connection
   -- For Versioned Connection timeout: org.jboss.remoting-jmx.timeout.versioned.connection
- generic property set and no specific property set
 -- if this property is set org.jboss.remoting-jmx.timeout and the specific property is not set, the generic value will be used instead of the default






> RemotingConnector & VersionedConectionFactory need configurable connection, channel & versioned connection timeouts 
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: REMJMX-86
>                 URL: https://issues.jboss.org/browse/REMJMX-86
>             Project: Remoting JMX
>          Issue Type: Bug
>          Components: Connection
>    Affects Versions: 2.0.0.Final
>            Reporter: Mustafa Musaji
>            Assignee: Brad Maxwell
>             Fix For: 1.1.3.CR1, 2.0.1.CR1
>
>
> In [1] we have the following snippet of code which has a hardcoded value of 5 seconds.
> {code:title=RemotingConnector.java}
> // Now open the channel
>         final IoFuture<Channel> futureChannel = connection.openChannel(serviceName, OptionMap.EMPTY);
>         IoFuture.Status result = futureChannel.await(5, TimeUnit.SECONDS);
>         if (result == IoFuture.Status.DONE) {
>             channel = futureChannel.get();
>         } else if (result == IoFuture.Status.FAILED) {
>             throw new IOException(futureChannel.getException());
>         } else {
>             throw new RuntimeException("Operation failed with status " + result);
>         }
> {code}
> This should be a system property or the default value should be raised.
> [1] https://github.com/jbossas/remoting-jmx/blob/master/src/main/java/org/jboss/remotingjmx/RemotingConnector.java



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list