3 Replies Latest reply on Oct 15, 2006 1:50 PM by dlofthouse

    JBWS-1115 - Automatic detection of Tomcat port

    dlofthouse

      Quite often users are requesting the ability to automatically set the port to be used for WSDL generation / URL replacement.

      I would like to add something to 'ServerConfigImpl' to query all of the Tomcat connectors currently registered with the MBean server.

      Take the first connector with scheme 'http' and secure set to false as the webServicePort.

      Take the first connector with scheme 'http' and secure set to true as the webServiceSecurePort.

      If multiple connectors are found a warning can be logged.

      The values can then be injected into the ServiceEndpointManager.

      The majority of users appear to have a problem when they are changing the Tomcat port or using the binding manager, this implementation would cover this.

      For users with advanced use cases they can still modify the jboss-beans.xml as before.

        • 1. Re: JBWS-1115 - Automatic detection of Tomcat port
          heiko.braun

          I stumbled across this several times as well.
          If you come up with a solution that would be perfect.

          • 2. Re: JBWS-1115 - Automatic detection of Tomcat port
            heiko.braun

            The only problem i see here is the disconnecgt between the MC and the JMX kernel. That particular attribute is managed by the MC. I think it should somehow be populated when the ServiceEndpointManager is initialized and not just bypassed when the WSDL is delivered.

            • 3. Re: JBWS-1115 - Automatic detection of Tomcat port
              dlofthouse

              I have commited an implementation for this.

              I have added a couple of methods to the ServerConfig interface so that these two values can be retrieved. For the JBoss implementation I query the MBean server for all connectors and return the port for the first one that is secured and the port for the first one that is not secured.

              Within the ServiceEndpointManager if the ports have not already been set I retrieve the ServerConfig using the factory and lookup these two values.

              I have not been able to implement the Tomcat versions of these methods yet as I can not get the latest JBossWS to deploy on Tomcat, however I believe the approach should be similar so I can raised the following task: -

              http://jira.jboss.com/jira/browse/JBWS-1304