Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6120 Expand support for System Property substitution
  3. AS7-5321

support expressions for remote-destination-outbound-socket-binding host attrib

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ctomc Tomaz Cerar
                Reporter:
                mazz John Mazzitelli
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: