[jbosstools-issues] [JBoss JIRA] (JBIDE-24991) Improve server port offset detection by inspecting configured system properties

Rob Stryker (JIRA) issues at jboss.org
Wed Sep 13 13:38:00 EDT 2017


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

Rob Stryker commented on JBIDE-24991:
-------------------------------------

To understand your usecase, I'm assuming you:
  1) Create a new server in local+filesystem mode
  2) Open teh server editor
  3) Open the launch configuration
  4) Add the sysprops you want to use to override the standalone.xml values
  5) Save the launch configuration
  6) Get annoyed that the server editor is not updated with the new values from the launch config

The launch configuration pulls data from the server editor, and not the other way around.  The server editor can pull data from the underlying xml files... but those xml files won't know what value is being passed into the sysprop. 

If you're going through the effort of customizing the launch configuration's VM args tab, then you also need to in to the server editor and update the port section. We cannot introduce a circular logic here without breaking the tools. What you're basically suggesting is that:
  1) User requests launch config
  2) Launch config tries to get ports from server editor
  3) Server object tries to get ports from launch config sysprops.
  4) Since launch config isn't made yet, a new launch config is created, and tries to get ports from server editor
  5) Server object tries  to get ports from launch config sysprops.
  6) Since launch config isn't made yet, a new launch config is created, and tries to get ports from server editor
  7) Server object tries  to get ports from launch config sysprops.
  8)  etc etc etc.  

This would be an endless loop. 

Basically, you can change the xml file directly, and have your changes automatically detected. But if you are opening the launch config and adding custom flags, then you must also override the port section in the editor so the tooling knows what ports to access on the server. 


Does this make sense to you? 


> Improve server port offset detection by inspecting configured system properties
> -------------------------------------------------------------------------------
>
>                 Key: JBIDE-24991
>                 URL: https://issues.jboss.org/browse/JBIDE-24991
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: server
>    Affects Versions: 4.5.0.Final
>         Environment: JBDS11, WF10
>            Reporter: Vsevolod Golovanov
>            Assignee: Rob Stryker
>             Fix For: 4.5.x
>
>
> The default Wildfly standalone.xml config has port offset configured like this: 
> {code}
> <socket-binding-group ... port-offset="${jboss.socket.binding.port-offset:0}">
> {code}
> With the way our configuration process is set up we don't change that. Instead we add a system property to the same config file:
> {code}
> <system-properties>
>     <property name="jboss.socket.binding.port-offset" value="10"/>
> </system-properties>
> {code}
> The problem is JBoss Tools doesn't detect this currently. It could be improved to inspect the port-offset attribute and find the corresponding system property value.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list