[jboss-jira] [JBoss JIRA] (REMJMX-86) RemotingConnector needs system property for default value when opening a channel

Brad Maxwell (JIRA) issues at jboss.org
Fri Jun 20 15:23:26 EDT 2014


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

Brad Maxwell edited comment on REMJMX-86 at 6/20/14 3:22 PM:
-------------------------------------------------------------

I see 3 different hard coded timeouts: 

src/main/java/org/jboss/remotingjmx/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) {

 
         // open a connection
         final IoFuture<Connection> futureConnection = endpoint.connect(convert(serviceUrl), getOptionMap(disabledMechanisms), handler);
        IoFuture.Status result = futureConnection.await(5, TimeUnit.SECONDS);

-------------------------------------------

src/main/java/org/jboss/remotingjmx/VersionedConectionFactory.java

static VersionedConnection createVersionedConnection(final Channel channel, final Map<String, ?> environment,
             final JMXServiceURL serviceURL) throws IOException {

IoFuture.Status result = futureHeader.await(5, TimeUnit.SECONDS);


was (Author: bmaxwell):
I see 3 different hard coded timeouts: 


> RemotingConnector needs system property for default value when opening a channel
> --------------------------------------------------------------------------------
>
>                 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: Darran Lofthouse
>
> 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