[
https://jira.jboss.org/browse/JBAS-8455?page=com.atlassian.jira.plugin.sy...
]
Richard Achmatowicz commented on JBAS-8455:
-------------------------------------------
Had a chat with Brian about how to use the ServiceBindingManager to resolve the general
issue of beans which need to construct URLs as attributes and how the URLs are being badly
formed when IPv6 literals are used as the bind address.
This seems to happen in one of two ways:
(i) via direct substitution of the system property ${jboss.bind.address}
// from hsqldb-sd.xml
<connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
(ii) via substitution of an value obtained from the service binding manager, with some
string replacement thrown in, as in
// from deploy/httpha-invoker.sar/META-INF/jboss-service.xml
<mbean code="org.jboss.invocation.http.server.HttpInvoker"
name="jboss:service=invoker,type=http">
<attribute name="InvokerURLPrefix">http://</attribute>
<attribute name="InvokerURLSuffix">
<!-- To get value, ask the ServiceBindingManager to do a string replacement
operation using the HTTP connector port -->
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
<parameter>jboss.web:service=WebServer</parameter>
<parameter>${host}:${port}/invoker/EJBInvokerServlet</parameter>
</value-factory>
</attribute>
<attribute name="UseHostName">true</attribute>
</mbean>
In this call, the value-factory will call ServiceBindingManager.getStringBinding(String
service, String input) method to use the default ServiceBinding (no binding was specified)
for the service jboss.web:service=WebServer and use string replacement to replace the
${host} token with the hostname associated with the default ServiceBinding instance for
service jboss.web:service=WebServer, and similarly for the ${port} token.
The problem is that, at the moment, if we want to use an IPv6 address literal returned by
ServiceBindingManager in a URL, we have no easy way of adding the square brackets around
the literal which would be required to create a well formed URL. If we had a way to tell
the SBM to add brackets to the IP address literal it gives back to us, we could work
around this issue I believe with little impact elsewhere. Many of the startup problems for
AS 6 at the moment involve this sort of issue.
HTTP InvokerLocators being formed incorrectly with IPv6 bind address
--------------------------------------------------------------------
Key: JBAS-8455
URL:
https://jira.jboss.org/browse/JBAS-8455
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Integration
Affects Versions: 6.0.0.M4
Reporter: Richard Achmatowicz
Assignee: Shelly McGowan
Fix For: TBD-6.x
When we boot the AS using an IPv6 bind address, many HTTP invoker locators are formed
incorrectly as URLs.
For example, for the MBean service=invoker,type=httpHA, its invoker locator is given as:
http://3ffe:ffff:0100:f101::1:8080/invoker/EJBInvokerHAServlet
instead of the correct:
http://[3ffe:ffff:0100:f101::1]:8080/invoker/EJBInvokerHAServlet
The source of the problem is in the Http Invoker Service Configuration, defined in
deploy/httpha.invoker.sar/META-INF/jboss-service.xml, where the invoker locators are
constructed. The URLs are constructed by taking the hostname and port, appending a fixed
prefix and appending a fixed suffix, without taking the type of IP address into account.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira