[
https://issues.jboss.org/browse/AS7-5321?page=com.atlassian.jira.plugin.s...
]
Heiko Rupp commented on AS7-5321:
---------------------------------
[15:45:44] <pilhuhn> Looks like a bug, as the metadata says:
[15:45:46] <pilhuhn> "host" => {
[15:45:46] <pilhuhn> "type" => STRING,
[15:45:46] <pilhuhn> "description" => "Der Hostname
oder die IP-Adresse des Remote-Ziels, mit dem sich dieses ausgehende Socket verbinden
wird.",
[15:45:46] <pilhuhn> "expressions-allowed" => true,
[15:46:00] <pilhuhn> look at expressions-allowed
[15:47:11] <pilhuhn> and then
[15:47:12] <pilhuhn> [standalone@localhost:9999
remote-destination-outbound-socket-binding=mail-smtp]
:write-attribute(name=host,value="${foo.bar:localhost}")
[15:47:26] <pilhuhn> is successful for me
[15:48:15] <pilhuhn> ah ok I see, so the api allows to write an expression, but the
underlying code does not know how to cope
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