@@ -0,0 +1,875 @@
+package org.overlord.commons.config;%0A%0Apublic class JBossServer %7B%0A%0A%09private static String baseUrl = null;%0A%09%0A%09/**%0A     * Uses the 'jboss.bind.address' and 'jboss.socket.binding.port-offset' parameters to construct%0A     * the baseUrl. The scheme defaults to http, but is set to https if the port setting ends in 443.%0A     * Defaults to http://localhost:8080.%0A     * @return baseUrl of the server.%0A     */%0A    public static String getBaseUrl() %7B%0A    %09if (baseUrl==null) %7B%0A%09    %09String hostname = System.getProperty(%22jboss.bind.address%22,%22localhost%22);%0A%09    %09Integer portOffset = Integer.valueOf(System.getProperty(%22jboss.socket.binding.port-offset%22,%220%22));%0A%09    %09String port = String.valueOf(8080 + portOffset);%0A%09    %09String scheme = %22http://%22;%0A%09    %09if (port.endsWith(%22443%22)) scheme = %22https://%22;%0A%09    %09baseUrl = scheme + hostname + %22:%22 + port;%0A    %09%7D%0A    %09return baseUrl;%0A    %7D%0A%7D%0A

fix for https://bugzilla.redhat.com/show_bug.cgi?id=1035321