-
-
2. Re: ServiceBindingSet
jaikiran Aug 21, 2009 3:11 AM (in response to bdamato)Please provide more details. Which exact version of JBoss AS? And your log shows that its binding to 9100 which is not the default port that JBoss uses. Did you or someone change some configuration file which sets it to 9100. And how do you start the server? Do you pass the jboss.service.binding.set property to the run script?
See this wiki for details on how to use the Service Binding Manager in AS-5 http://www.jboss.org/community/wiki/AS5ServiceBindingManager -
3. Re: ServiceBindingSet
bdamato Aug 24, 2009 7:52 AM (in response to bdamato)I'm running 5.1.0.GA on Solaris.
I set the port to 8700 but it looks to me like the port offset (which in my case is set to 400) is even getting applied to the explicitly set ports. If I set the port to 8300, jBoss ends up starting the service on port 8700. I'm not sure if that's intended or a bug, but it's reproducible. -
4. Re: ServiceBindingSet
jaikiran Aug 24, 2009 8:06 AM (in response to bdamato)"bdamato" wrote:
I'm running 5.1.0.GA on Solaris.
The file contents that you posted isn't what is shipped in AS-5.1.0.GA. Where did you find that file in the AS?"bdamato" wrote:
I set the port to 8700 but it looks to me like the port offset (which in my case is set to 400) is even getting applied to the explicitly set ports. If I set the port to 8300, jBoss ends up starting the service on port 8700. I'm not sure if that's intended or a bug, but it's reproducible.
If you don't want it to be offset, then why not use the "ports-default" and just change the HTTP port to whatever you want:<bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss.web:service=WebServer</property> <property name="port">8700</property>
-
5. Re: ServiceBindingSet
jaikiran Aug 24, 2009 8:11 AM (in response to bdamato)"jaikiran" wrote:
The file contents that you posted isn't what is shipped in AS-5.1.0.GA. Where did you find that file in the AS?
Wait a minute. After reading your post, i think you added that section in that file, after reading the comments mentioned there. Isn't it?"bdamato" wrote:
I set the port to 8700 but it looks to me like the port offset (which in my case is set to 400) is even getting applied to the explicitly set ports. If I set the port to 8300, jBoss ends up starting the service on port 8700. I'm not sure if that's intended or a bug, but it's reproducible.
Let me see how it's expected to be configured. -
6. Re: ServiceBindingSet
brian.stansberry Aug 24, 2009 12:23 PM (in response to bdamato)This comment needs to be fixed:
<!-- Set of bindings to which the "offset by X" approach can't be applied -->
Should be something more like this:<!-- Set of bindings that are specific to this ServiceBindingSet -->
https://jira.jboss.org/jira/browse/JBAS-7206
You then "fix" the port value (i.e. prevent the offset being applied) by setting the "fixedPort" property, same as you would for one of the elements in the StandardBindings set.<bean name="Ports03Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet"> <constructor> <!-- The name of the set --> <parameter>ports-03</parameter> <!-- Default host name --> <parameter>${jboss.bind.address}</parameter> <!-- The port offset --> <parameter>400</parameter> <!-- Set of bindings to which the "offset by X" approach can't be applied --> <parameter> <set elementClass="org.jboss.services.binding.ServiceBindingMetadata"> <bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss.web:service=WebServer</property> <property name="port">8700</property> <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets </property> <property name="serviceBindingValueSourceConfig"><inject bean="JBossWebConnectorXSLTConfig"/></property> <property name="fixedPort">true</property> </bean> <bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss:service=Naming</property> <property name="bindingName">Port</property> <property name="port">1799</property> <property name="description">The listening socket for the Naming service</property> <property name="fixedPort">true</property> </bean> </set> </parameter> </constructor> </bean>
That's admittedly non-intuitive. The code is written such that the "fixedPort" property controls whether the offset is applied, no matter where the ServiceBindingMetadata comes from. That could be changed, but we'd need to add a mechanism to allow people to say fixedPort=false on an override binding. For example, make the field a Boolean with a null default and add a isFixedPortSet() getter. -
7. Re: ServiceBindingSet
bdamato Aug 24, 2009 12:52 PM (in response to bdamato)That did the trick, thanks.
It might be worth showing an example of this in the wiki. I had to dig around just to figure out the format for that "override" parameter and it was just a wild guess that got me as far as I got. -
8. Re: ServiceBindingSet
brian.stansberry Aug 24, 2009 2:07 PM (in response to bdamato)Thanks for pointing that out. I just updated the wiki page to add more on this topic. But there's some problem going on with publishing the change, so it may be a while before the new content appears.