John Mazzitelli created AS7-5321:
------------------------------------
Summary: support expressions for remote-destination-outbound-socket-binding
host attrib
Key: AS7-5321
URL:
https://issues.jboss.org/browse/AS7-5321
Project: Application Server 7
Issue Type: Feature Request
Affects Versions: 7.1.1.Final
Reporter: John Mazzitelli
I appears that remote-destination-outbound-socket-binding resources cannot have attributes
that are expressions - at least the host attrtibute. In JBossAS 4.2.3, we used to have a
stock email service.xml that people could customize by simply passing in new system
properties (rather than editing .xml or going through a CLI to change the values).
However, in AS 7.1.1.Final, we can't do this for the mail service because at least the
host attribute does not appear to allow for expressions:
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp
My host attribute was set to the expression ${rhq.server.email.smtp-host:localhost} and
when I tried to start the server, I got:
Caused by: java.net.UnknownHostException: ${rhq.server.email.smtp-host:localhost}
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) [rt.jar:1.6.0_29]
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
[rt.jar:1.6.0_29]
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
[rt.jar:1.6.0_29]
at java.net.InetAddress.getAllByName0(InetAddress.java:1153) [rt.jar:1.6.0_29]
at java.net.InetAddress.getAllByName(InetAddress.java:1083) [rt.jar:1.6.0_29]
at java.net.InetAddress.getAllByName(InetAddress.java:1019) [rt.jar:1.6.0_29]
at java.net.InetAddress.getByName(InetAddress.java:969) [rt.jar:1.6.0_29]
at
org.jboss.as.network.OutboundSocketBinding.getDestinationAddress(OutboundSocketBinding.java:146)
at
org.jboss.as.mail.extension.MailSessionService.getServerSocketAddress(MailSessionService.java:106)
The weird thing is, the port attribute appears to allow for expressions. When my port is
set to this expression: "${rhq.server.email.smtp-port:25}", the server starts up
fine (that is, after I set to the host to a legitimate hostname like
"localhost")
This JIRA is to request that expressions be supported for the host attribute as it appears
to be supported for the port attribute.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira