[rhq] Branch 'rhq-on-as7' - 19 commits - .classpath etc/apt etc/classloaders-test etc/samples modules/common modules/core modules/enterprise modules/integration-tests modules/jopr modules/plugins

mazz mazz at fedoraproject.org
Thu Aug 2 18:28:57 UTC 2012


 .classpath                                                                                                                        |    9 
 etc/apt/pom.xml                                                                                                                   |    2 
 etc/classloaders-test/plugin1/pom.xml                                                                                             |    2 
 etc/classloaders-test/plugin2/pom.xml                                                                                             |    2 
 etc/samples/perspectives/sample-perspective/perspective/pom.xml                                                                   |    2 
 etc/samples/skeleton-plugin/pom.xml                                                                                               |    2 
 modules/common/drift/pom.xml                                                                                                      |    2 
 modules/core/client-api/pom.xml                                                                                                   |    2 
 modules/core/comm-api/pom.xml                                                                                                     |    2 
 modules/core/dbutils/pom.xml                                                                                                      |    2 
 modules/core/domain/pom.xml                                                                                                       |    2 
 modules/core/gui/pom.xml                                                                                                          |    2 
 modules/core/util/pom.xml                                                                                                         |    2 
 modules/enterprise/agentupdate/pom.xml                                                                                            |    2 
 modules/enterprise/binding/pom.xml                                                                                                |    2 
 modules/enterprise/comm/pom.xml                                                                                                   |    2 
 modules/enterprise/gui/content_http-war/pom.xml                                                                                   |    2 
 modules/enterprise/gui/coregui/pom.xml                                                                                            |    2 
 modules/enterprise/gui/installer-war/pom.xml                                                                                      |    2 
 modules/enterprise/gui/installer/pom.xml                                                                                          |  407 ++++++
 modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/Address.java                              |   82 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java              |   34 
 modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java                     |   77 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java                        |  304 ++++
 modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java          |  110 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java                             |  651 ++++++++++
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java              |   62 
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java               |  105 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java                  |  115 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java               |   53 
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java             |  100 +
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java       |  161 ++
 modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java             |  274 ++++
 modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml                            |   35 
 modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties                   |   21 
 modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties   |   23 
 modules/enterprise/gui/installer/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator         |    1 
 modules/enterprise/gui/installer/src/main/webapp/WEB-INF/web.xml                                                                  |    9 
 modules/enterprise/gui/installer/src/main/webapp/index.html                                                                       |   45 
 modules/enterprise/gui/pom.xml                                                                                                    |    3 
 modules/enterprise/gui/portal-war/pom.xml                                                                                         |    2 
 modules/enterprise/gui/rest-war/pom.xml                                                                                           |    2 
 modules/enterprise/gui/webdav-war/pom.xml                                                                                         |  286 ----
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java                           |   36 
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java                                             |   96 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java                                      |   75 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java                                             |   89 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java                                            |   95 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java                                      |   88 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java                                   |  129 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java                                            |  120 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java                                                |  120 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java                                               |   45 
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java                                            |  106 -
 modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java                                     |  110 -
 modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml                                                           |    5 
 modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml                                                                 |   27 
 modules/enterprise/pom.xml                                                                                                        |    2 
 modules/enterprise/remoting/cli/pom.xml                                                                                           |    2 
 modules/enterprise/server/appserver/pom.xml                                                                                       |  323 ++++
 modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.bat                                           |  115 +
 modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.sh                                            |  159 ++
 modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server-console.bat                                             |    2 
 modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.bat                                                     |  223 +++
 modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.security-policy                                         |   10 
 modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.sh                                                      |  483 +++++++
 modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf                                    |  214 +++
 modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.dll                                 |binary
 modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.exe                                 |binary
 modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.jar                                 |binary
 modules/enterprise/server/appserver/src/main/bin-resources/jbossas/standalone/configuration/rhq.truststore                        |binary
 modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc                                     |   16 
 modules/enterprise/server/appserver/src/main/downloadable-resources/cli-alert-scripts/fix-bundle-deployment.js                    |  484 +++++++
 modules/enterprise/server/appserver/src/main/downloadable-resources/connectors/README.txt                                         |   22 
 modules/enterprise/server/appserver/src/main/resources/alert-scripts/README.txt                                                   |    2 
 modules/enterprise/server/appserver/src/main/resources/alert-scripts/example.rb                                                   |   16 
 modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt                                                            |  135 ++
 modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/jboss-web.xml |    5 
 modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/web.xml       |   20 
 modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/index.html            |   17 
 modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/start.jsf             |   13 
 modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/welcome.jsf           |   13 
 modules/enterprise/server/appserver/src/main/resources/plugins/README.txt                                                         |    7 
 modules/enterprise/server/appserver/src/main/scripts/rhq-container.assembly.xml                                                   |   39 
 modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml                                                      |  604 +++++++++
 modules/enterprise/server/client-api/pom.xml                                                                                      |    2 
 modules/enterprise/server/ear/pom.xml                                                                                             |    2 
 modules/enterprise/server/jar/pom.xml                                                                                             |    2 
 modules/enterprise/server/plugins/alert-cli/pom.xml                                                                               |    2 
 modules/enterprise/server/plugins/alert-email/pom.xml                                                                             |    2 
 modules/enterprise/server/plugins/alert-irc/pom.xml                                                                               |    2 
 modules/enterprise/server/plugins/alert-log4j/pom.xml                                                                             |    2 
 modules/enterprise/server/plugins/alert-microblog/pom.xml                                                                         |    2 
 modules/enterprise/server/plugins/alert-mobicents/pom.xml                                                                         |    2 
 modules/enterprise/server/plugins/alert-operations/pom.xml                                                                        |    2 
 modules/enterprise/server/plugins/alert-roles/pom.xml                                                                             |    2 
 modules/enterprise/server/plugins/alert-scriptlang/pom.xml                                                                        |    2 
 modules/enterprise/server/plugins/alert-sms/pom.xml                                                                               |    2 
 modules/enterprise/server/plugins/alert-snmp/pom.xml                                                                              |    2 
 modules/enterprise/server/plugins/alert-subject/pom.xml                                                                           |    2 
 modules/enterprise/server/plugins/ant-bundle/pom.xml                                                                              |    2 
 modules/enterprise/server/plugins/cloud/pom.xml                                                                                   |    2 
 modules/enterprise/server/plugins/cobbler/pom.xml                                                                                 |    2 
 modules/enterprise/server/plugins/disk/pom.xml                                                                                    |    2 
 modules/enterprise/server/plugins/drift-mongodb/pom.xml                                                                           |    2 
 modules/enterprise/server/plugins/drift-rhq/pom.xml                                                                               |    2 
 modules/enterprise/server/plugins/filetemplate-bundle/pom.xml                                                                     |    2 
 modules/enterprise/server/plugins/groovy-script/pom.xml                                                                           |    2 
 modules/enterprise/server/plugins/jboss-software/pom.xml                                                                          |    2 
 modules/enterprise/server/plugins/packagetype-cli/pom.xml                                                                         |    2 
 modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml                                                           |    2 
 modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml                                                         |    2 
 modules/enterprise/server/plugins/url/pom.xml                                                                                     |    2 
 modules/enterprise/server/plugins/yum/pom.xml                                                                                     |    2 
 modules/enterprise/server/safe-invoker/pom.xml                                                                                    |    2 
 modules/enterprise/server/sars/agent-sar/pom.xml                                                                                  |    2 
 modules/enterprise/server/xml-schemas/pom.xml                                                                                     |    2 
 modules/integration-tests/mod_cluster-plugin-test/pom.xml                                                                         |    2 
 modules/jopr/dist/server/pom.xml                                                                                                  |    4 
 modules/plugins/JBossOSGi/pom.xml                                                                                                 |    2 
 modules/plugins/aliases/pom.xml                                                                                                   |    2 
 modules/plugins/ant-bundle/pom.xml                                                                                                |    2 
 modules/plugins/apache/pom.xml                                                                                                    |    2 
 modules/plugins/augeas/pom.xml                                                                                                    |    2 
 modules/plugins/byteman/pom.xml                                                                                                   |    2 
 modules/plugins/cobbler/pom.xml                                                                                                   |    2 
 modules/plugins/cron/pom.xml                                                                                                      |    2 
 modules/plugins/database/pom.xml                                                                                                  |    2 
 modules/plugins/filetemplate-bundle/pom.xml                                                                                       |    2 
 modules/plugins/grub/pom.xml                                                                                                      |    2 
 modules/plugins/hadoop/pom.xml                                                                                                    |    2 
 modules/plugins/hibernate/pom.xml                                                                                                 |    2 
 modules/plugins/hosts/pom.xml                                                                                                     |    2 
 modules/plugins/iis/pom.xml                                                                                                       |    2 
 modules/plugins/iptables/pom.xml                                                                                                  |    2 
 modules/plugins/irc/pom.xml                                                                                                       |    2 
 modules/plugins/jboss-as-5/pom.xml                                                                                                |    2 
 modules/plugins/jboss-as-7/pom.xml                                                                                                |    2 
 modules/plugins/jboss-as/pom.xml                                                                                                  |    2 
 modules/plugins/jboss-cache-v3/pom.xml                                                                                            |    2 
 modules/plugins/jboss-cache/pom.xml                                                                                               |    2 
 modules/plugins/jdbctrace/pom.xml                                                                                                 |    2 
 modules/plugins/jira/pom.xml                                                                                                      |    2 
 modules/plugins/jmx/pom.xml                                                                                                       |    2 
 modules/plugins/kickstart/pom.xml                                                                                                 |    2 
 modules/plugins/lsof/pom.xml                                                                                                      |    2 
 modules/plugins/mod-cluster/pom.xml                                                                                               |    4 
 modules/plugins/mysql/pom.xml                                                                                                     |    2 
 modules/plugins/netservices/pom.xml                                                                                               |    2 
 modules/plugins/noop/pom.xml                                                                                                      |    2 
 modules/plugins/nss/pom.xml                                                                                                       |    2 
 modules/plugins/onewire/pom.xml                                                                                                   |    2 
 modules/plugins/oracle/pom.xml                                                                                                    |    2 
 modules/plugins/pattern-generator/pom.xml                                                                                         |    2 
 modules/plugins/perftest/pom.xml                                                                                                  |    2 
 modules/plugins/platform/pom.xml                                                                                                  |    2 
 modules/plugins/postfix/pom.xml                                                                                                   |    2 
 modules/plugins/postgres/pom.xml                                                                                                  |    2 
 modules/plugins/raw-config-test/pom.xml                                                                                           |    2 
 modules/plugins/rhq-agent/pom.xml                                                                                                 |    2 
 modules/plugins/rhq-server/pom.xml                                                                                                |    2 
 modules/plugins/samba/pom.xml                                                                                                     |    2 
 modules/plugins/script/pom.xml                                                                                                    |    2 
 modules/plugins/script2/pom.xml                                                                                                   |    2 
 modules/plugins/services/pom.xml                                                                                                  |    2 
 modules/plugins/snmptrapd/pom.xml                                                                                                 |    2 
 modules/plugins/sshd/pom.xml                                                                                                      |    2 
 modules/plugins/sudoers/pom.xml                                                                                                   |    2 
 modules/plugins/tomcat/pom.xml                                                                                                    |    2 
 modules/plugins/twitter/pom.xml                                                                                                   |    2 
 modules/plugins/virt/pom.xml                                                                                                      |    2 
 171 files changed, 5711 insertions(+), 1539 deletions(-)

New commits:
commit 90fdd7a74366b55e0a512b6075965910bc8da98e
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Aug 2 12:30:53 2012 -0400

    in all pom.xml files' dev profiles, need to point to the new AS7 deployments folder

diff --git a/etc/apt/pom.xml b/etc/apt/pom.xml
index 882bdee..f008992 100644
--- a/etc/apt/pom.xml
+++ b/etc/apt/pom.xml
@@ -135,7 +135,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/etc/classloaders-test/plugin1/pom.xml b/etc/classloaders-test/plugin1/pom.xml
index 465db1c..2c405e2 100644
--- a/etc/classloaders-test/plugin1/pom.xml
+++ b/etc/classloaders-test/plugin1/pom.xml
@@ -158,7 +158,7 @@
             <rhq.rootDir>/rhq/trunk</rhq.rootDir>
             <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
          <build>
             <plugins>
diff --git a/etc/classloaders-test/plugin2/pom.xml b/etc/classloaders-test/plugin2/pom.xml
index 265b305..a67aff1 100644
--- a/etc/classloaders-test/plugin2/pom.xml
+++ b/etc/classloaders-test/plugin2/pom.xml
@@ -158,7 +158,7 @@
             <rhq.rootDir>/rhq/trunk</rhq.rootDir>
             <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
          <build>
             <plugins>
diff --git a/etc/samples/perspectives/sample-perspective/perspective/pom.xml b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
index d50b4e4..9e7fb92 100644
--- a/etc/samples/perspectives/sample-perspective/perspective/pom.xml
+++ b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
@@ -108,7 +108,7 @@
          <properties>
             <rhq.rootDir>../../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/etc/samples/skeleton-plugin/pom.xml b/etc/samples/skeleton-plugin/pom.xml
index 39fc241..6d173ff 100644
--- a/etc/samples/skeleton-plugin/pom.xml
+++ b/etc/samples/skeleton-plugin/pom.xml
@@ -159,7 +159,7 @@
             <rhq.rootDir>/rhq/trunk</rhq.rootDir>
             <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
          <build>
             <plugins>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index cd0c979..1e3174e 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -35,7 +35,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index 6f6a937..c8cd401 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -151,7 +151,7 @@
       <properties>
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
       </properties>
 
       <build>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index bf501fc..d964e39 100644
--- a/modules/core/comm-api/pom.xml
+++ b/modules/core/comm-api/pom.xml
@@ -26,7 +26,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index d4b5505..bad3adf 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -367,7 +367,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
             </properties>
             <build>
                 <plugins>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 64ffe1c..41e2cb9 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -324,7 +324,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.jar</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 51781ce..936df5e 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -148,7 +148,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-portal.war/WEB-INF/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-portal.war/WEB-INF/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index 2737ce3..89f1f81 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -83,7 +83,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 6069aaf..736cdb1 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -150,7 +150,7 @@ rhq-agent.latest.build-number=${buildNumber}
           <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
           <rhq.projectJar>${project.build.finalName}.jar</rhq.projectJar>
           <rhq.deploymentJar>rhq-enterprise-agent-${project.version}.jar</rhq.deploymentJar>
-          <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-agent</rhq.deploymentDir>
+          <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-agent</rhq.deploymentDir>
         </properties>
 
         <build>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 7d37053..4e9453e 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -252,7 +252,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index f784d42..b890e39 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -172,7 +172,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/gui/content_http-war/pom.xml b/modules/enterprise/gui/content_http-war/pom.xml
index 78f8982..795ac54 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -206,7 +206,7 @@
                 <rhq.rootDir>../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
                 <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index e3aca30..0de696c 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -421,7 +421,7 @@
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
         <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
         <rhq.deploymentDir>
-          ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}
+          ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}
                 </rhq.deploymentDir>
       </properties>
 
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index e26a864..3b10f14 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -242,7 +242,7 @@
             <rhq.rootDir>../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.deploymentName}</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.deploymentName}</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/gui/installer/pom.xml b/modules/enterprise/gui/installer/pom.xml
index 2c0193c..0cf27cb 100644
--- a/modules/enterprise/gui/installer/pom.xml
+++ b/modules/enterprise/gui/installer/pom.xml
@@ -272,7 +272,7 @@
                 <rhq.rootDir>../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
                 <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 5e034ef..1456342 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -493,7 +493,7 @@
             <rhq.rootDir>../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 4c18901..abe1903 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -125,7 +125,7 @@
              <rhq.rootDir>../../../..</rhq.rootDir>
              <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
              <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-             <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+             <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
           </properties>
 
           <build>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index e572daf..2add8fe 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -74,7 +74,7 @@
             <module>server/plugins</module>
             <module>server/ear</module>
             <module>server/container-lib</module>
-            <module>server/container</module>
+            <module>server/appserver</module>
             <module>server/client-api</module>
             <module>server/itests</module>
          </modules>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 3924ff0..1c26ead 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -252,7 +252,7 @@
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.projectJar>${project.build.finalName}.zip</rhq.projectJar>
             <rhq.deploymentZip>rhq-remoting-cli-${project.version}.zip</rhq.deploymentZip>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-client</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-client</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/server/client-api/pom.xml b/modules/enterprise/server/client-api/pom.xml
index 91682fa..ff3e891 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -65,7 +65,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 10b613e..4c42453 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -846,7 +846,7 @@
             <rhq.rootDir>../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.ear</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.deploymentName}</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.deploymentName}</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index aa0aad3..69970e0 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -981,7 +981,7 @@
         <rhq.rootDir>../../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
         <rhq.deploymentName>${project.build.finalName}-ejb3.jar</rhq.deploymentName>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
       </properties>
 
       <build>
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml b/modules/enterprise/server/plugins/alert-cli/pom.xml
index 0977465..bdef215 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -44,7 +44,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml b/modules/enterprise/server/plugins/alert-email/pom.xml
index a7db8c7..d3bc96b 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -50,7 +50,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml b/modules/enterprise/server/plugins/alert-irc/pom.xml
index 53b67dd..6ade9c8 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -47,7 +47,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml b/modules/enterprise/server/plugins/alert-log4j/pom.xml
index 5f01f19..6a548a4 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -37,7 +37,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml b/modules/enterprise/server/plugins/alert-microblog/pom.xml
index ceb88ad..a793f92 100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -45,7 +45,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
index 01e8ed2..2cf41c0 100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -37,7 +37,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 032030c..e768090 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -112,7 +112,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml b/modules/enterprise/server/plugins/alert-roles/pom.xml
index e1b2b68..21a5269 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -64,7 +64,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
index 843b2af..b8f95b5 100644
--- a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
+++ b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
@@ -67,7 +67,7 @@
              <properties>
                  <rhq.rootDir>../../../../..</rhq.rootDir>
                  <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                 <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                 <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
              </properties>
 
              <build>
diff --git a/modules/enterprise/server/plugins/alert-sms/pom.xml b/modules/enterprise/server/plugins/alert-sms/pom.xml
index 31fdfd7..0d550db 100644
--- a/modules/enterprise/server/plugins/alert-sms/pom.xml
+++ b/modules/enterprise/server/plugins/alert-sms/pom.xml
@@ -80,7 +80,7 @@
              <properties>
                  <rhq.rootDir>../../../../..</rhq.rootDir>
                  <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                 <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                 <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
              </properties>
 
              <build>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 5e272f6..ae600ed 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -45,7 +45,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml b/modules/enterprise/server/plugins/alert-subject/pom.xml
index 1e168a0..b3eff38 100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -37,7 +37,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins
                 </rhq.deploymentDir>
             </properties>
 
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 5cb7d9d..3ef990a 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -138,7 +138,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/cloud/pom.xml b/modules/enterprise/server/plugins/cloud/pom.xml
index 6ed8c41..18c4f66 100644
--- a/modules/enterprise/server/plugins/cloud/pom.xml
+++ b/modules/enterprise/server/plugins/cloud/pom.xml
@@ -65,7 +65,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index db45a30..4f42411 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -89,7 +89,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml b/modules/enterprise/server/plugins/disk/pom.xml
index f695434..57c366b 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -64,7 +64,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 985cd67..821ff02 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -140,7 +140,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index 141b792..4c7b8a5 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -78,7 +78,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
index 1d3afe9..873d66f 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -115,7 +115,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index f708881..7ab7666 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -141,7 +141,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml b/modules/enterprise/server/plugins/jboss-software/pom.xml
index ba40c46..23c1604 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -68,7 +68,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
index 523a7b8..3c5f4fc 100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -37,7 +37,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins
                 </rhq.deploymentDir>
             </properties>
 
diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
index 601d777..3014ee3 100644
--- a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
@@ -26,7 +26,7 @@
             <properties>
                 <rhq.rootDir>../../../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
index 141eaef..de9054b 100644
--- a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
@@ -80,7 +80,7 @@
          <properties>
             <rhq.rootDir>../../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index 56877dd..b25e44a 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -73,7 +73,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml b/modules/enterprise/server/plugins/yum/pom.xml
index 4d91ffd..8242ec3 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -58,7 +58,7 @@
             <properties>
                 <rhq.rootDir>../../../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 1a515f3..6c0d86d 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -48,7 +48,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.jar</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index e2ae626..c6dad71 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -147,7 +147,7 @@
             <rhq.rootDir>../../../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentName>${project.build.finalName}.sar</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.deploymentName}</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.deploymentName}</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index 8e4bc21..8fce608 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -166,7 +166,7 @@
       <properties>
         <rhq.rootDir>../../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/lib</rhq.deploymentDir>
       </properties>
 
       <build>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 63fb98d..4f6f13b 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -270,7 +270,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/jopr/dist/server/pom.xml b/modules/jopr/dist/server/pom.xml
index 0e95346..778f92f 100644
--- a/modules/jopr/dist/server/pom.xml
+++ b/modules/jopr/dist/server/pom.xml
@@ -121,7 +121,7 @@
                 </artifactItem>
 
               </artifactItems>
-              <outputDirectory>${project.build.outputDirectory}/jbossas/server/default/deploy/rhq.ear.rej/rhq-downloads/rhq-plugins</outputDirectory>
+              <outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-downloads/rhq-plugins</outputDirectory>
             </configuration>
           </execution>
 
@@ -142,7 +142,7 @@
                 </artifactItem>
 
               </artifactItems>
-              <outputDirectory>${project.build.outputDirectory}/jbossas/server/default/deploy/rhq.ear.rej/rhq-serverplugins</outputDirectory>
+              <outputDirectory>${project.build.outputDirectory}/jbossas/standalone/deployments/rhq.ear.rej/rhq-serverplugins</outputDirectory>
             </configuration>
           </execution>
           <!-- -->
diff --git a/modules/plugins/JBossOSGi/pom.xml b/modules/plugins/JBossOSGi/pom.xml
index 0abd4b2..8f2e904 100644
--- a/modules/plugins/JBossOSGi/pom.xml
+++ b/modules/plugins/JBossOSGi/pom.xml
@@ -40,7 +40,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 17cd506..a24d504 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -188,7 +188,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 35bad6b..f70c25c 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -191,7 +191,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 92b0521..0cbb22d 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -250,7 +250,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index b770b07..9383052 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -119,7 +119,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index c6fbfed..1a9a6f0 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -160,7 +160,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 840b4b6..49e8ef3 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -193,7 +193,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index fa4f7d3..4a701cc 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -182,7 +182,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 24d0e1c..fa70c8e 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -32,7 +32,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index 8c0a155..c13b377 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -169,7 +169,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 5c56712..9fc6948 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -179,7 +179,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 7aae62d..a4ef034 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -36,7 +36,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index e7a1349..1753d14 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -162,7 +162,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 4794d78..882cedf 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -189,7 +189,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 60c3f2c..f96d8da 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -118,7 +118,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/iptables/pom.xml b/modules/plugins/iptables/pom.xml
index d6eeff3..f5a19771 100644
--- a/modules/plugins/iptables/pom.xml
+++ b/modules/plugins/iptables/pom.xml
@@ -134,7 +134,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index 0750d4b..f000590 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -59,7 +59,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 8ca5f8a..91bd0f5 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -584,7 +584,7 @@
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
         <rhq.deploymentDir>
-          ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+          ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
         </rhq.deploymentDir>
       </properties>
 
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index a640c0541..c9145ca 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -539,7 +539,7 @@
       <properties>
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
       </properties>
 
       <build>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index 866838e..75166b9 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -288,7 +288,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml b/modules/plugins/jboss-cache-v3/pom.xml
index 1519908..eca07c1 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -427,7 +427,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index 1079417..329038e 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -152,7 +152,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/jdbctrace/pom.xml b/modules/plugins/jdbctrace/pom.xml
index 4d6b14a..a5a71f3 100644
--- a/modules/plugins/jdbctrace/pom.xml
+++ b/modules/plugins/jdbctrace/pom.xml
@@ -190,7 +190,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/jira/pom.xml b/modules/plugins/jira/pom.xml
index 4839ea0..c4462ba 100644
--- a/modules/plugins/jira/pom.xml
+++ b/modules/plugins/jira/pom.xml
@@ -236,7 +236,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index c38a4d0..630114b 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -191,7 +191,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 8ee8062..ed92bcc 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -42,7 +42,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
          <build>
             <plugins>
diff --git a/modules/plugins/lsof/pom.xml b/modules/plugins/lsof/pom.xml
index d3d6b24..d44843c 100644
--- a/modules/plugins/lsof/pom.xml
+++ b/modules/plugins/lsof/pom.xml
@@ -160,7 +160,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 11ef595..835f315 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -73,7 +73,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
@@ -179,7 +179,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index fb018ca..a5c96f3 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -164,7 +164,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 748cc07..4418ed4 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -169,7 +169,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/noop/pom.xml b/modules/plugins/noop/pom.xml
index cc31433..64c3b0d 100644
--- a/modules/plugins/noop/pom.xml
+++ b/modules/plugins/noop/pom.xml
@@ -44,7 +44,7 @@
       <properties>
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
         </rhq.deploymentDir>
       </properties>
 
diff --git a/modules/plugins/nss/pom.xml b/modules/plugins/nss/pom.xml
index e5e9534..560f605 100644
--- a/modules/plugins/nss/pom.xml
+++ b/modules/plugins/nss/pom.xml
@@ -26,7 +26,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/onewire/pom.xml b/modules/plugins/onewire/pom.xml
index 3595d8d..2608c9f 100644
--- a/modules/plugins/onewire/pom.xml
+++ b/modules/plugins/onewire/pom.xml
@@ -78,7 +78,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index 60fdb03..d245a00 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -78,7 +78,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 28d63d4..a098195 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -36,7 +36,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 9f93a29..653766d 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -135,7 +135,7 @@
       <properties>
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-        <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+        <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
       </properties>
 
       <build>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index b098b14..6198683 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -117,7 +117,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index a40b63d..0a60ede 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -187,7 +187,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 46c873e..1df36ab 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -163,7 +163,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 5b023ba..62b4f33 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -135,7 +135,7 @@
         <rhq.rootDir>../../..</rhq.rootDir>
         <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
         <rhq.deploymentDir>
-          ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+          ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
         </rhq.deploymentDir>
       </properties>
 
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 46b0171..71d5435 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -130,7 +130,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index c3af4c6..4bc81e1 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -161,7 +161,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 0f7bd3d..f9319bd 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -187,7 +187,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 9a1370b..e66c881 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -117,7 +117,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 0c0bee5..0e8cd93 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -90,7 +90,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/services/pom.xml b/modules/plugins/services/pom.xml
index a484f18..5e63827 100644
--- a/modules/plugins/services/pom.xml
+++ b/modules/plugins/services/pom.xml
@@ -33,7 +33,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 4f60a52..46faaa9 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -74,7 +74,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index c3db44f..d265152 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -179,7 +179,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 4aed11b..802792f 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -177,7 +177,7 @@
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
             <rhq.deploymentDir>
-               ${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins
+               ${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins
             </rhq.deploymentDir>
          </properties>
 
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index ca0576f..c7bfcf4 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -144,7 +144,7 @@
          <properties>
             <rhq.rootDir>../../..</rhq.rootDir>
             <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+            <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
          </properties>
 
          <build>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index daf4755..faa83ee 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -34,7 +34,7 @@
             <properties>
                 <rhq.rootDir>../../..</rhq.rootDir>
                 <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
             </properties>
 
             <build>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index e9fbb43..28c4f1b 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -205,7 +205,7 @@
           <properties>
              <rhq.rootDir>../../..</rhq.rootDir>
              <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-             <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+             <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
           </properties>
 
           <build>


commit b2002ac53a64ffa10d7c13f22d9be7c2d603e653
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Aug 2 11:19:30 2012 -0400

    remove the webdav module - it is obsolete, was never in the distro and REST is now the way to obtain this functionality

diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index b9ca5f5..00a4222 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -31,7 +31,6 @@
         <module>installer</module>
         <module>base-perspective-jar</module>
         <module>base-perspective-war</module>
-        <!--<module>webdav-war</module>-->
         <module>content_http-war</module>
         <module>coregui</module>
         <module>rest-war</module>
diff --git a/modules/enterprise/gui/webdav-war/pom.xml b/modules/enterprise/gui/webdav-war/pom.xml
deleted file mode 100644
index 3ab00df..0000000
--- a/modules/enterprise/gui/webdav-war/pom.xml
+++ /dev/null
@@ -1,286 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.rhq</groupId>
-      <artifactId>rhq-parent</artifactId>
-      <version>4.3.0-SNAPSHOT</version>
-      <relativePath>../../../../pom.xml</relativePath>
-   </parent>
-
-   <artifactId>rhq-webdav</artifactId>
-   <packaging>war</packaging>
-
-   <name>RHQ Enterprise WebDav</name>
-   <description>The RHQ WebDav inventory access</description>
-
-   <dependencies>
-
-      <!-- Internal Deps -->
-
-      <dependency>
-         <groupId>org.rhq</groupId>
-         <artifactId>rhq-core-domain</artifactId>
-         <version>${project.version}</version>
-         <scope>provided</scope> <!-- by rhq.ear (as ejb-jar) -->
-      </dependency>
-
-      <dependency>
-         <groupId>org.rhq</groupId>
-         <artifactId>rhq-core-gui</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-
-      <dependency>
-         <groupId>org.rhq</groupId>
-         <artifactId>rhq-enterprise-server</artifactId>
-         <version>${project.version}</version>
-         <scope>provided</scope> <!-- by rhq.ear (as ejb-jar) -->
-      </dependency>
-
-      <dependency>
-         <groupId>org.rhq</groupId>
-         <artifactId>rhq-core-util</artifactId>
-         <version>${project.version}</version>
-         <scope>provided</scope> <!-- by rhq.ear -->
-      </dependency>
-
-      <!-- 3rd Party Deps -->
-        <dependency>
-            <groupId>com.ettrema</groupId>
-            <artifactId>milton-api</artifactId>
-            <version>1.4.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.ettrema</groupId>
-            <artifactId>milton-servlet</artifactId>
-            <version>1.4.1</version>
-        </dependency>
-
-
-       <dependency>
-           <groupId>org.slf4j</groupId>
-           <artifactId>slf4j-jdk14</artifactId>
-           <version>1.4.3</version>
-       </dependency>
-
-
-      <dependency>
-         <groupId>hibernate</groupId>
-         <artifactId>hibernate3</artifactId>
-         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-      <!-- used by a test JSP -->
-      <dependency>
-         <groupId>hibernate-entitymanager</groupId>
-         <artifactId>hibernate-entitymanager</artifactId>
-         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-      <!-- needed for referenced domain entities that use Hibernate annotations (due to JDK5 bug) -->
-      <dependency>
-         <groupId>hibernate-annotations</groupId>
-         <artifactId>hibernate-annotations</artifactId>
-         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-
-      <!-- needed for referenced domain entities that use JPA annotations (due to JDK5 bug) -->
-      <dependency>
-         <groupId>javax.persistence</groupId>
-         <artifactId>persistence-api</artifactId>
-         <version>1.0</version>
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-      <dependency>
-         <groupId>javax.servlet</groupId>
-         <artifactId>jstl</artifactId>
-         <version>1.1.2</version>
-      </dependency>
-
-      <!-- needed for EJB3 annotations (e.g. ApplicationException) -->
-      <dependency>
-         <groupId>jboss</groupId>
-         <artifactId>jboss-ejb3x</artifactId>
-         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-      <dependency>
-         <groupId>jboss</groupId>
-         <artifactId>jboss-j2ee</artifactId>
-         <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
-         <scope>provided</scope> <!-- by JBossAS -->
-      </dependency>
-
-
-
-
-
-
-
-       <dependency>
-          <groupId>commons-fileupload</groupId>
-          <artifactId>commons-fileupload</artifactId>
-          <version>1.2</version>
-       </dependency>
-
-       <dependency>
-          <groupId>commons-httpclient</groupId>
-          <artifactId>commons-httpclient</artifactId>
-          <version>3.0.1</version>
-          <scope>provided</scope> <!-- by JBossAS -->
-       </dependency>
-
-       <dependency>
-          <groupId>commons-io</groupId>
-          <artifactId>commons-io</artifactId>
-          <version>1.3.1</version>
-       </dependency>
-
-       <dependency>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-          <version>1.0.4</version>
-          <scope>provided</scope> <!-- by JBossAS -->
-       </dependency>
-
-       <dependency>
-          <groupId>commons-validator</groupId>
-          <artifactId>commons-validator</artifactId>
-          <version>1.1.4</version>
-       </dependency>
-
-   </dependencies>
-
-   <build>
-      <finalName>rhq-webdav</finalName>
-      <plugins>
-
-         <plugin>
-            <artifactId>maven-war-plugin</artifactId>
-            <version>2.1-alpha-1</version>
-            <configuration>
-               <archive>
-                  <manifest>
-                     <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-                     <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                  </manifest>
-                  <manifestEntries>
-                     <Build-Number>${buildNumber}</Build-Number>
-                  </manifestEntries>
-               </archive>
-               <webResources>
-                  <resource>
-                     <filtering>false</filtering>
-                     <directory>${basedir}/src/main/webapp</directory>
-                  </resource>
-               </webResources>
-            </configuration>
-         </plugin>
-
-      </plugins>
-
-   </build>
-
-   <profiles>
-
-      <profile>
-         <id>dev</id>
-
-         <properties>
-            <rhq.rootDir>../../../..</rhq.rootDir>
-            <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-            <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
-         </properties>
-
-         <build>
-            <plugins>
-
-               <plugin>
-                 <artifactId>maven-antrun-plugin</artifactId>
-                 <executions>
-
-                     <execution>
-                        <id>deploy-classes</id>
-                        <phase>compile</phase>
-                        <configuration>
-                          <target>
-                            <property name="classes.dir" location="${rhq.deploymentDir}/WEB-INF/classes" />
-                            <echo>*** Copying updated files from target/classes to ${classes.dir}...</echo>
-                            <copy todir="${classes.dir}" verbose="${rhq.verbose}">
-                               <fileset dir="target/classes" />
-                            </copy>
-                            <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                            <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to ${deployment.dir}${file.separator}...</echo>
-                            <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
-                               <fileset dir="${basedir}/src/main/webapp" />
-                            </copy>
-                            <!-- TODO: Also copy the files from src/main/webapp-filtered/, and then filter them ourselves. -->
-                          </target>
-                        </configuration>
-                        <goals>
-                          <goal>run</goal>
-                        </goals>
-                     </execution>
-
-                     <execution>
-                        <id>deploy</id>
-                        <phase>package</phase>
-                        <configuration>
-                          <target>
-                            <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                            <echo>*** Copying updated files from target${file.separator}${project.build.finalName}${file.separator} to ${deployment.dir}${file.separator}...</echo>
-                            <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
-                               <fileset dir="${basedir}/target/${project.build.finalName}" />
-                            </copy>
-                          </target>
-                        </configuration>
-                        <goals>
-                          <goal>run</goal>
-                        </goals>
-                     </execution>
-
-                     <execution>
-                        <id>undeploy</id>
-                        <phase>clean</phase>
-                        <configuration>
-                          <target>
-                            <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                            <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
-                            <delete dir="${deployment.dir}" />
-                          </target>
-                        </configuration>
-                        <goals>
-                          <goal>run</goal>
-                        </goals>
-                     </execution>
-
-                  </executions>
-               </plugin>
-
-            </plugins>
-         </build>
-      </profile>
-
-   </profiles>
-
-    <repositories>
-        <repository>
-            <id>ettrema</id>
-            <url>http://www.ettrema.com/maven2</url>
-            <snapshots>
-               <enabled>false</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-
-</project>
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java
deleted file mode 100644
index 5a86620..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.util.List;
-
-import com.bradmcevoy.http.CollectionResource;
-import com.bradmcevoy.http.Resource;
-
-import org.rhq.core.domain.auth.Subject;
-
-/**
- * This is the {@link CollectionResource} interface with an additional ability
- * to obtain the collection given a specific subject.
- * 
- * @author John Mazzitelli
- */
-public interface AuthenticatedCollectionResource extends CollectionResource {
-    List<? extends Resource> getChildren(Subject subject);
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java
deleted file mode 100644
index cb61cc42..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import javax.security.auth.login.LoginException;
-
-import com.bradmcevoy.http.Resource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * Provides a utility object to perform user authentication.
- * 
- * @author John Mazzitelli
- */
-public class Authenticator {
-    private static final Log LOG = LogFactory.getLog(Authenticator.class);
-
-    private Subject subject = null;
-
-    public Authenticator(Subject subject) {
-        this.subject = subject;
-    }
-
-    /**
-     * If the user has successfully authenticated himself, this will return the Subject for that login.
-     * If the user never logged in or failed to authenticate successfully, this will be <code>null</code>.
-     * 
-     * @return the authenticated subject, or <code>null</code> if user is not authenticated
-     */
-    public Subject getSubject() {
-        return this.subject;
-    }
-
-    /**
-     * For those times when a user does not need to be authenticated to obtain data, use
-     * the overlord user, which provides full superuser authentication.
-     * 
-     * @return the overlord user
-     */
-    public Subject getOverlord() {
-        return LookupUtil.getSubjectManager().getOverlord();
-    }
-
-    /**
-     * Logs the user in with the given credentials.
-     * 
-     * <i>This signature must match that of {@link Resource#authenticate(String, String)}</i>
-     *
-     * @param username
-     * @param password
-     * 
-     * @return the {@link Subject} of the authenticated user
-     */
-    public Object authenticate(String username, String password) {
-        try {
-            this.subject = LookupUtil.getSubjectManager().login(username, password);
-            LOG.debug("User [" + username + "] logged into the webdav server");
-        } catch (LoginException e) {
-            LOG.warn("User [" + username + "] failed to log into the webdav server");
-            this.subject = null;
-        }
-        return this.subject;
-    }
-
-    /**
-     * Returns the security realm that the user must authenticate with.
-     * 
-     * <i>This signature must match that of {@link Resource#getRealm()}</i>
-     * 
-     * @return security realm name
-     */
-    public String getRealm() {
-        return "Jopr Management Environment";
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java
deleted file mode 100644
index 31eaf11..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.util.Date;
-
-import com.bradmcevoy.http.PropFindableResource;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.measurement.Availability;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.measurement.AvailabilityManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * The property to indicate if the resource is up or down.
- * 
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public class AvailabilityResource extends BasicResource implements PropFindableResource {
-    private Availability availability;
-
-    public AvailabilityResource(Subject subject, Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    public String getUniqueId() {
-        return "avail_" + getAvailability().getId();
-    }
-
-    public String getName() {
-        return "availability_is_" + getAvailability().getAvailabilityType().getName();
-    }
-
-    /**
-     * The modified date is that when the current availability took effect.
-     * This is the same as {@link #getCreateDate()}.
-     */
-    public Date getModifiedDate() {
-        return getAvailability().getStartTime();
-    }
-
-    /**
-     * The created date is that when the current availability took effect.
-     * This is the same as {@link #getModifiedDate()}.
-     */
-    public Date getCreateDate() {
-        return getModifiedDate();
-    }
-
-    private Availability getAvailability() {
-        if (this.availability == null) {
-            AvailabilityManagerLocal am = LookupUtil.getAvailabilityManager();
-            this.availability = am.getCurrentAvailabilityForResource(getSubject(), getManagedResource().getId());
-        }
-        return this.availability;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java
deleted file mode 100644
index e21f026..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import com.bradmcevoy.http.Auth;
-import com.bradmcevoy.http.PropFindableResource;
-import com.bradmcevoy.http.Request;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * Represents a basic managed resource. Provides some hooks to the authentication subsystem to
- * ensure the user is allowed to see the resource.
- * 
- * @see ResourceFolder
- *
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public abstract class BasicResource extends Authenticator implements PropFindableResource {
-
-    private static final Log LOG = LogFactory.getLog(BasicResource.class);
-
-    private final Resource managedResource;
-
-    public BasicResource(Subject subject, Resource managedResource) {
-        super(subject);
-
-        if (managedResource == null) {
-            throw new NullPointerException("managedResource == null");
-        }
-        this.managedResource = managedResource;
-    }
-
-    protected Resource getManagedResource() {
-        return this.managedResource;
-    }
-
-    /**
-     * This implementation of authorise simply assures that the user has authenticated himself
-     * and the user is allowed to view the managed resource. Subclasses may wish to further
-     * restrict the authorization (e.g. deny access if the configuration of the resource
-     * is to be edited but the user is not allowed to change the configuration).
-     */
-    public boolean authorise(Request request, Request.Method method, Auth auth) {
-        boolean authorized = false;
-
-        if (auth != null) {
-            Subject subject = (Subject) auth.getTag();
-            if (subject != null) {
-                AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
-                authorized = authorizationManager.canViewResource(subject, getManagedResource().getId());
-            }
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("BasicResource [" + getManagedResource() + "], auth=[" + auth.getTag() + "], isAuthorized="
-                    + authorized);
-            }
-        }
-
-        return authorized;
-    }
-
-    public String checkRedirect(Request request) {
-        return null; // no-op
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java
deleted file mode 100644
index 1fc7ad5..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.io.ByteArrayOutputStream;
-import java.util.Date;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.Property;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.configuration.ConfigurationManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * Provides the resource configuration XML for a given resource.
- *
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public class ConfigResource extends GetableBasicResource {
-
-    private Configuration configuration;
-    private String content;
-
-    public ConfigResource(Subject subject, Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    public String getUniqueId() {
-        return "config_" + getConfiguration().getId();
-    }
-
-    public String getName() {
-        return "resource_configuration.xml";
-    }
-
-    /**
-     * The modified date is that of the last time the configuration changed.
-     */
-    public Date getModifiedDate() {
-        return new Date(getConfiguration().getModifiedTime());
-    }
-
-    /**
-     * The creation date is that of the configuration itself, not of the managed resource.
-     */
-    public Date getCreateDate() {
-        return new Date(getConfiguration().getCreatedTime());
-    }
-
-    protected String loadContent() {
-        if (this.content == null) {
-            try {
-                JAXBContext context = JAXBContext.newInstance(Configuration.class, Property.class);
-                Marshaller marshaller = context.createMarshaller();
-                marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                marshaller.marshal(getConfiguration(), baos);
-                this.content = baos.toString();
-            } catch (JAXBException e) {
-                throw new RuntimeException("Failed to translate configuration to XML", e);
-            }
-        }
-        return this.content;
-    }
-
-    private Configuration getConfiguration() {
-        if (this.configuration == null) {
-            ConfigurationManagerLocal cm = LookupUtil.getConfigurationManager();
-            this.configuration = cm.getResourceConfiguration(getManagedResource().getId());
-        }
-        return this.configuration;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java
deleted file mode 100644
index 870f52f..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-import com.bradmcevoy.http.Auth;
-import com.bradmcevoy.http.GetableResource;
-import com.bradmcevoy.http.Range;
-import com.bradmcevoy.http.exceptions.NotAuthorizedException;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.util.stream.StreamUtil;
-
-/**
- * Extends the {@link BasicResource} by providing hooks to stream file content to the user.
- * 
- * @author John Mazzitelli
- */
-public abstract class GetableBasicResource extends BasicResource implements GetableResource {
-
-    public GetableBasicResource(Subject subject, Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    /**
-     * This implementation assumes the content will be of type "text/xml".
-     * Subclasses are free to override this behavior if they are returning content
-     * other than XML data.
-     */
-    public String getContentType(String accepts) {
-        return "text/xml";
-    }
-
-    public Long getContentLength() {
-        return Long.valueOf(loadContent().length());
-    }
-
-    public void sendContent(OutputStream out, Range range, Map<String, String> params, String str) throws IOException,
-        NotAuthorizedException {
-
-        byte[] bytes = loadContent().getBytes();
-        long start = (range != null) ? range.getStart() : 0L;
-        long length = (range != null) ? ((range.getFinish() - start) + 1) : bytes.length;
-
-        InputStream in = new ByteArrayInputStream(bytes);
-        StreamUtil.copy(in, out, start, length);
-    }
-
-    /**
-     * This implementation assumes the user client should not cache the content.
-     * Subclasses are free to override this if they allow the content to be cached
-     * on the client side.
-     */
-    public Long getMaxAgeSeconds(Auth auth) {
-        return Long.valueOf(0L);
-    }
-
-    /**
-     * Subclasses must implement this to return the content as a String. Note that this really
-     * only supports small content since you don't want to load large files in memory. If you need
-     * content that is large, implement {@link GetableResource} directly; do not use this abstract class.
-     * 
-     * @return the content as a string, must never be <code>null</code>
-     */
-    protected abstract String loadContent();
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java
deleted file mode 100644
index 8f095b8..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.rhq.gui.webdav;
-
-import java.util.Date;
-import java.util.List;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementSchedule;
-import org.rhq.core.domain.measurement.ui.MetricDisplaySummary;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.measurement.MeasurementChartsManagerLocal;
-import org.rhq.enterprise.server.measurement.MeasurementPreferences;
-import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal;
-import org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricRangePreferences;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * The measurement data WebDAV resource that provides information on metrics of a managed resource.
- * 
- * @author John Mazzitelli
- */
-public class MeasurementDataResource extends GetableBasicResource {
-
-    private String content;
-    private List<MetricDisplaySummary> measurements;
-
-    public MeasurementDataResource(Subject subject, Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    public String getUniqueId() {
-        return "metrics_" + getManagedResource().getId();
-    }
-
-    public String getName() {
-        return "measurement_data.xml";
-    }
-
-    /**
-     * We do not reply with any relevent date. The only way for a relevent date to
-     * be calculated is for us to actually query the database for the measurement data.
-     * To avoid querying the DB t(which is expensive), we simply return the current
-     * date, since the majority of the time, a new measurement collection interval
-     * will have triggered in the time the user took between getting the measurement data.
-     */
-    public Date getModifiedDate() {
-        return new Date();
-    }
-
-    /**
-     * The created date is the date of the resource itself was created.
-     */
-    public Date getCreateDate() {
-        return new Date(getManagedResource().getCtime());
-    }
-
-    protected String loadContent() {
-        if (this.content == null) {
-            StringBuilder str = new StringBuilder();
-            str.append("<?xml version=\"1.0\"?>\n");
-            str.append("<measurements>\n");
-            for (MetricDisplaySummary meas : getMeasurements()) {
-                str.append("   <measurement>\n");
-                str.append("      <name>").append(meas.getLabel()).append("</name>\n");
-                str.append("      <description>").append(meas.getDescription()).append("</description>\n");
-                str.append("      <alert-count>").append(meas.getAlertCount()).append("</alert-count>\n");
-                str.append("      <min-value>").append(meas.getMinMetric().getValue()).append("</min-value>\n");
-                str.append("      <max-value>").append(meas.getMaxMetric().getValue()).append("</max-value>\n");
-                str.append("      <avg-value>").append(meas.getAvgMetric().getValue()).append("</avg-value>\n");
-                str.append("      <last-value>").append(meas.getLastMetric().getValue()).append("</last-value>\n");
-                str.append("      <units>").append(meas.getUnits()).append("</units>\n");
-                str.append("      <begin-time>").append(new Date(meas.getBeginTimeFrame())).append("</begin-time>\n");
-                str.append("      <end-time>").append(new Date(meas.getEndTimeFrame())).append("</end-time>\n");
-                str.append("      <schedule-id>").append(meas.getScheduleId()).append("</schedule-id>\n");
-                str.append("   </measurement>\n");
-            }
-            str.append("</measurements>\n");
-            this.content = str.toString();
-        }
-        return this.content;
-    }
-
-    private List<MetricDisplaySummary> getMeasurements() {
-        if (this.measurements == null) {
-
-            int resourceId = getManagedResource().getId();
-
-            // determine the user's preferences so we know how far back to get the measurement data
-            MeasurementPreferences measurementPrefs = new MeasurementPreferences(getSubject());
-            MetricRangePreferences range = measurementPrefs.getMetricRangePreferences();
-
-            // get all the enabled measurement schedules
-            MeasurementScheduleManagerLocal sm = LookupUtil.getMeasurementScheduleManager();
-            List<MeasurementSchedule> measurementSchedules = sm.findSchedulesForResourceAndType(getSubject(),
-                resourceId, DataType.MEASUREMENT, null, true);
-            int[] scheduleIds = new int[measurementSchedules.size()];
-            int i = 0;
-            for (MeasurementSchedule sched : measurementSchedules) {
-                scheduleIds[i++] = sched.getId();
-            }
-
-            // now get the measurement data for all the scheduled as far back as the user's range preferences says so
-            MeasurementChartsManagerLocal chartManager = LookupUtil.getMeasurementChartsManager();
-            this.measurements = chartManager.getMetricDisplaySummariesForResource(getSubject(), resourceId,
-                scheduleIds, range.begin, range.end);
-        }
-
-        return this.measurements;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java
deleted file mode 100644
index 73f55f1..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import com.bradmcevoy.http.Resource;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.resource.InventoryStatus;
-import org.rhq.core.domain.resource.composite.ResourceFacets;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.server.resource.ResourceManagerLocal;
-import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * Represents a managed resource along with its children resources.
- * 
- * @see BasicResource
- *
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public class ResourceFolder extends BasicResource implements AuthenticatedCollectionResource {
-
-    private List<Resource> children;
-
-    public ResourceFolder(Subject subject, org.rhq.core.domain.resource.Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    public String getUniqueId() {
-        return String.valueOf(getManagedResource().getId());
-    }
-
-    public String getName() {
-        String name = getManagedResource().getName();
-        return SafeEncoder.encode(name);
-    }
-
-    public Date getModifiedDate() {
-        return new Date(getManagedResource().getMtime());
-    }
-
-    public Date getCreateDate() {
-        return new Date(getManagedResource().getCtime());
-    }
-
-    public Resource child(String childName) {
-        List<? extends Resource> children = getChildren();
-        for (Resource child : children) {
-            if (childName.equals(child.getName())) {
-                return child;
-            }
-        }
-        return null;
-    }
-
-    public List<? extends Resource> getChildren() {
-        return getChildren(getSubject());
-    }
-
-    public List<? extends Resource> getChildren(Subject subject) {
-        if (this.children == null) {
-            PageList<org.rhq.core.domain.resource.Resource> childs;
-            ResourceManagerLocal rm = LookupUtil.getResourceManager();
-            childs = rm.findChildResources(subject, getManagedResource().getId(), PageControl.getUnlimitedInstance());
-
-            // inventory
-            this.children = new ArrayList<Resource>(childs.size());
-            for (org.rhq.core.domain.resource.Resource child : childs) {
-                if (child.getInventoryStatus() == InventoryStatus.COMMITTED) {
-                    this.children.add(new ResourceFolder(subject, child));
-                }
-            }
-
-            ResourceTypeManagerLocal rtm = LookupUtil.getResourceTypeManager();
-            ResourceFacets facets = rtm.getResourceFacets(getManagedResource().getResourceType().getId());
-
-            // availability
-            this.children.add(new AvailabilityResource(subject, getManagedResource()));
-
-            // resource configuration
-            if (facets.isConfiguration()) {
-                this.children.add(new ConfigResource(subject, getManagedResource()));
-            }
-
-            // traits
-            if (facets.isMeasurement()) {
-                this.children.add(new TraitsResource(subject, getManagedResource()));
-            }
-
-            // measurement data
-            if (facets.isMeasurement()) {
-                this.children.add(new MeasurementDataResource(subject, getManagedResource()));
-            }
-        }
-        return this.children;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java
deleted file mode 100644
index 89c78fd..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import com.bradmcevoy.http.Auth;
-import com.bradmcevoy.http.PropFindableResource;
-import com.bradmcevoy.http.Request;
-import com.bradmcevoy.http.Resource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.resource.ResourceCategory;
-import org.rhq.core.domain.resource.composite.ResourceComposite;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.enterprise.server.resource.ResourceManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * This represents the top of the managed environment (i.e. all of the top-level platforms being managed).
- * 
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public class RootFolder extends Authenticator implements AuthenticatedCollectionResource, PropFindableResource {
-
-    private static final Log LOG = LogFactory.getLog(RootFolder.class);
-
-    private List<ResourceFolder> roots;
-
-    public RootFolder() {
-        super(null);
-    }
-
-    public String getUniqueId() {
-        return "/";
-    }
-
-    public String getName() {
-        return "/";
-    }
-
-    public Date getModifiedDate() {
-        return new Date();
-    }
-
-    public Date getCreateDate() {
-        return new Date();
-    }
-
-    /**
-     * This implementation of authorise simply assures that the user has authenticated himself.
-     * If the user is logged in, <code>true</code> is returned; otherwise, <code>false</code> is returned.
-     */
-    public boolean authorise(Request request, Request.Method method, Auth auth) {
-        boolean authorized = (auth != null) && (auth.getTag() != null);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("RootFolder auth=[" + ((auth != null) ? auth.getTag() : auth) + "], isAuthorized=" + authorized);
-        }
-        return authorized;
-    }
-
-    public String checkRedirect(Request request) {
-        return null; // no-op
-    }
-
-    public Resource child(String childName) {
-        List<? extends Resource> children = getChildren();
-        for (Resource child : children) {
-            if (childName.equals(child.getName())) {
-                return child;
-            }
-        }
-        return null;
-    }
-
-    public List<? extends Resource> getChildren() {
-        return getChildren(getSubject());
-    }
-
-    public List<? extends Resource> getChildren(Subject subject) {
-        if (this.roots == null) {
-            ResourceManagerLocal rm = LookupUtil.getResourceManager();
-
-            List<ResourceComposite> foundRoots = rm.findResourceComposites(subject, ResourceCategory.PLATFORM, null,
-                null, null, null, true, PageControl.getUnlimitedInstance());
-
-            if (foundRoots != null) {
-                this.roots = new ArrayList<ResourceFolder>(foundRoots.size());
-                for (ResourceComposite comp : foundRoots) {
-                    this.roots.add(new ResourceFolder(subject, comp.getResource()));
-                }
-            } else {
-                this.roots = new ArrayList<ResourceFolder>();
-            }
-        }
-        return this.roots;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java
deleted file mode 100644
index 8805335..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.rhq.gui.webdav;
-
-/**
- * Seems like some of our resource names aren't able to safely become URLs that contain characters
- * like \ or /. This utility will attempt to change names so they can safely be handled.
- * 
- * @author John Mazzitelli
- */
-public abstract class SafeEncoder {
-    // pick things that are at least half-sane, even if they doesn't look perfect
-    private static final String[][] REPLACEMENTS = new String[][] { { "\\", "||" }, { "/", "|" } };
-
-    public static String encode(String name) {
-        for (String[] replacement : REPLACEMENTS) {
-            name = name.replace(replacement[0], replacement[1]);
-        }
-        return name;
-    }
-
-    public static String decode(String name) {
-        for (String[] replacement : REPLACEMENTS) {
-            name = name.replace(replacement[1], replacement[0]);
-        }
-        return name;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java
deleted file mode 100644
index 9293127..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.rhq.gui.webdav;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * The measurement traits resource that provides information on all traits of a managed resource.
- * 
- * @author John Mazzitelli
- */
-public class TraitsResource extends GetableBasicResource {
-
-    private List<MeasurementDataTrait> traits;
-    private String content;
-
-    public TraitsResource(Subject subject, Resource managedResource) {
-        super(subject, managedResource);
-    }
-
-    public String getUniqueId() {
-        return "traits_" + getManagedResource().getId();
-    }
-
-    public String getName() {
-        return "measurement_traits.xml";
-    }
-
-    /**
-     * The modified date is that of the last time a trait changed.
-     */
-    public Date getModifiedDate() {
-        long latestTimestamp = 0L;
-        for (MeasurementDataTrait trait : getTraits()) {
-            if (latestTimestamp < trait.getTimestamp()) {
-                latestTimestamp = trait.getTimestamp();
-            }
-        }
-        return new Date(latestTimestamp);
-    }
-
-    /**
-     * The created date is the date of the resource itself was created.
-     */
-    public Date getCreateDate() {
-        return new Date(getManagedResource().getCtime());
-    }
-
-    protected String loadContent() {
-        if (this.content == null) {
-            StringBuilder str = new StringBuilder();
-            str.append("<?xml version=\"1.0\"?>\n");
-            str.append("<traits>\n");
-            for (MeasurementDataTrait trait : getTraits()) {
-                str.append("   <trait>\n");
-                str.append("      <name>").append(trait.getName()).append("</name>\n");
-                str.append("      <value>").append(trait.getValue()).append("</value>\n");
-                str.append("      <last-changed>").append(new Date(trait.getTimestamp())).append("</last-changed>\n");
-                str.append("      <schedule-id>").append(trait.getScheduleId()).append("</schedule-id>\n");
-                str.append("   </trait>\n");
-            }
-            str.append("</traits>\n");
-            this.content = str.toString();
-        }
-        return this.content;
-    }
-
-    private List<MeasurementDataTrait> getTraits() {
-        if (this.traits == null) {
-            MeasurementDataManagerLocal mdm = LookupUtil.getMeasurementDataManager();
-            List<MeasurementDataTrait> traits = mdm.findCurrentTraitsForResource(getSubject(), getManagedResource()
-                .getId(), null);
-            if (traits != null) {
-                this.traits = traits;
-            } else {
-                this.traits = new ArrayList<MeasurementDataTrait>();
-            }
-        }
-        return this.traits;
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java
deleted file mode 100644
index bf1a584..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.gui.webdav;
-
-import java.util.List;
-
-import com.bradmcevoy.http.Resource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.util.collection.ArrayUtils;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * The main entry point when a WebDAV request comes in. This will examine
- * the URL being requested and convert that URL into a series of WebDAV
- * resources for the user to see.
- * 
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public class WebDAVResourceFactory implements com.bradmcevoy.http.ResourceFactory {
-
-    private static final Log LOG = LogFactory.getLog(WebDAVResourceFactory.class);
-
-    public Resource getResource(String host, String url) {
-        Resource foundResource = null;
-
-        // URL == /webdav/resource/<parent-resource-name>/<child-resource-name>/...
-        // paths[] = [, webdav, resource, <parent-resource-name>, <child-resource-name>, ...]
-        String[] paths = url.split("/");
-
-        if (paths.length >= 3) {
-            String webdavResourceType = paths[2];
-            if ("resource".equals(webdavResourceType)) {
-                foundResource = getResourceResource(getSubarray(paths, 3));
-            }
-            // TODO: some ideas for addition resource types
-            // else if "group".equals(webdavResourceType)
-            // else if "user".equals(webdavResourceType)
-            // else if "role".equals(webdavResourceType)
-            // else if "plugin".equals(webdavResourceType)
-            // else if "systemconfig".equals(webdavResourceType)
-            // else if "agentupdate/download".equals(webdavResourceType)
-            // else if "agentupdate/version".equals(webdavResourceType)
-        }
-
-        if (foundResource == null) {
-            LOG.warn("Couldn't find resource associated with webdav url [" + url + "]");
-        }
-
-        return foundResource;
-    }
-
-    public String getSupportedLevels() {
-        return "1";
-    }
-
-    private String[] getSubarray(String[] full, int index) {
-        return ArrayUtils.copyOfRange(full, index, full.length);
-    }
-
-    public Subject getOverlord() {
-        return LookupUtil.getSubjectManager().getOverlord();
-    }
-
-    private Resource getResourceResource(String[] paths) {
-        if (paths.length == 0 || paths[0] == null || paths[0].length() == 0) {
-            return new RootFolder();
-        } else {
-            Resource resourceFolder = new RootFolder();
-            for (int i = 0; i < paths.length; i++) {
-                boolean found = false;
-                if (resourceFolder instanceof AuthenticatedCollectionResource) {
-                    List<? extends Resource> children;
-                    children = ((AuthenticatedCollectionResource) resourceFolder).getChildren(getOverlord());
-                    for (Resource child : children) {
-                        String childName = child.getName();
-                        if (childName.equals(paths[i])) {
-                            resourceFolder = child;
-                            found = true;
-                        }
-                    }
-                }
-                if (!found) {
-                    return null;
-                }
-            }
-            return resourceFolder;
-        }
-    }
-}
diff --git a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml b/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml
deleted file mode 100644
index 0e4fa0f..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-
-<jboss-web>
-    <context-root>webdav</context-root>
-</jboss-web>
diff --git a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 2a445aa..0000000
--- a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-         version="2.5">
-
-   <display-name>RHQ WebDav</display-name>
-
- 
-    <!-- WebDAV support -->
-    <servlet>
-        <servlet-name>WebDAV</servlet-name>
-        <servlet-class>com.bradmcevoy.http.MiltonServlet</servlet-class>
-                <init-param>
-            <param-name>resource.factory.class</param-name>
-            <param-value>org.rhq.gui.webdav.WebDAVResourceFactory</param-value>
-        </init-param>
-    </servlet>
-
-    <servlet-mapping>
-        <servlet-name>WebDAV</servlet-name>
-        <url-pattern>/</url-pattern>
-    </servlet-mapping>
-
-</web-app>
-


commit 17d69343f3f42fef99bd0f02e9c012ac38d3f9f9
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Aug 2 11:18:52 2012 -0400

    fix eclipse classpath to use the new installer module

diff --git a/.classpath b/.classpath
index e541e4f..44bf71a 100644
--- a/.classpath
+++ b/.classpath
@@ -49,8 +49,8 @@
 	<classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/test/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/installer-war/src/main/java"/>
-	<classpathentry kind="src" path="modules/enterprise/gui/gwt-installer-war/src/main/java"/>
-	<classpathentry kind="src" path="modules/enterprise/gui/gwt-installer-war/target/generated-sources/gwt"/>
+	<classpathentry kind="src" path="modules/enterprise/gui/installer/src/main/java"/>
+	<classpathentry kind="src" path="modules/enterprise/gui/installer/target/generated-sources/gwt"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/base-perspective-jar/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/content_http-war/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/server/client-api/src/main/java"/>


commit 31d2146023eefa3d028d60fd7e2dc383c85fd4b6
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Aug 1 19:50:07 2012 -0400

    rename the installer module and the war itself so it doesn't have the annoying -war.war file ending

diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
deleted file mode 100644
index 3b73c6c..0000000
--- a/modules/enterprise/gui/gwt-installer-war/pom.xml
+++ /dev/null
@@ -1,407 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.rhq</groupId>
-        <artifactId>rhq-parent</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-        <relativePath>../../../../pom.xml</relativePath>
-    </parent>
-
-    <groupId>org.rhq</groupId>
-    <artifactId>rhq-gwt-installer-war</artifactId>
-    <packaging>war</packaging>
-
-    <name>RHQ Enterprise GWT Installer GUI</name>
-    <description>The RHQ Enterprise GWT Installer GUI webapp</description>
-
-    <properties>
-        <!-- dependency versions -->
-        <gwt.version>2.4.0</gwt.version>
-        <smartgwt.version>3.0</smartgwt.version>
-        <jboss.as.version>7.1.1.Final</jboss.as.version> <!-- our AS7 container -->
-        <jboss.msc.version>1.0.2.GA</jboss.msc.version> <!-- this ships with our AS7 container -->
-        <jboss.dmr.version>1.1.1.Final</jboss.dmr.version> <!-- this ships with our AS7 container -->
-
-        <installerGuiParams />
-        <installerGuiRunTarget>'http://localhost:7080/rhq-gwt-installer/index.html${installerGuiParams}'</installerGuiRunTarget>
-
-        <!-- If this is too much memory to allocate to your gwt:debug process then
-            override this property in in your settings.xml -->
-        <gwt-plugin.extraJvmArgs>-Xms512M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M</gwt-plugin.extraJvmArgs>
-        <gwt-plugin.localWorkers>4</gwt-plugin.localWorkers>
-
-        <gwt.userAgent>ie8,ie9,gecko1_8,safari,opera</gwt.userAgent>
-        <gwt.draftCompile>false</gwt.draftCompile>
-        <gwt.soyc>false</gwt.soyc>
-        <gwt.style>PRETTY</gwt.style>
-        <!-- <gwt.locale>en,de,ja,pt,zh,ru,cs</gwt.locale> -->
-        <gwt.locale>en</gwt.locale>
-        <gwt.fallback.locale>en</gwt.fallback.locale>
-
-        <enable-tags>true</enable-tags>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <!-- JBoss distributes a complete set of Java EE 6 APIs. We use this here 
-                so that we always get the correct versions of artifacts.
-				TODO: We should probably move this up to the root pom. -->
-            <dependency>
-                <groupId>org.jboss.spec</groupId>
-                <artifactId>jboss-javaee-6.0</artifactId>
-                <version>3.0.0.Final</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.rhq</groupId>
-            <artifactId>rhq-core-dbutils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.gwt</groupId>
-            <artifactId>gwt-servlet</artifactId>
-            <version>${gwt.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.gwt</groupId>
-            <artifactId>gwt-user</artifactId>
-            <version>${gwt.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- This is so we can compile custom GWT Generators to be called during
-            gwt compilation. Is is not needed at runtime and so is not included in the
-            WAR. -->
-        <dependency>
-            <groupId>com.google.gwt</groupId>
-            <artifactId>gwt-dev</artifactId>
-            <version>${gwt.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.smartgwt</groupId>
-            <artifactId>smartgwt</artifactId>
-            <version>${smartgwt.version}</version>
-        </dependency>
-
-        <!-- Import the Servlet API -->
-        <dependency>
-            <groupId>org.jboss.spec.javax.servlet</groupId>
-            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <!-- we need these so we can have our own service to provide a co-located management client -->
-        <dependency>
-            <groupId>org.jboss.msc</groupId>
-            <artifactId>jboss-msc</artifactId>
-            <version>${jboss.msc.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss</groupId>
-            <artifactId>jboss-dmr</artifactId>
-            <version>${jboss.dmr.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss.as</groupId>
-            <artifactId>jboss-as-naming</artifactId>
-            <version>${jboss.as.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss.as</groupId>
-            <artifactId>jboss-as-server</artifactId>
-            <version>${jboss.as.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss.as</groupId>
-            <artifactId>jboss-as-controller</artifactId>
-            <version>${jboss.as.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-        <dependency>
-            <groupId>org.jboss.as</groupId>
-            <artifactId>jboss-as-controller-client</artifactId>
-            <version>${jboss.as.version}</version>
-            <scope>provided</scope> <!-- provided by AS7 -->
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <finalName>rhq-gwt-installer</finalName>
-
-        <resources>
-            <resource>
-                <targetPath>${project.build.directory}/generated-sources/gwt</targetPath>
-                <directory>src/main/resources</directory>
-                <filtering>true</filtering>
-                <includes>
-                    <include>**/*.gwt.xml</include>
-                    <include>**/*.properties</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.java</include>
-                </includes>
-            </resource>
-        </resources>
-
-        <plugins>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>gwt-maven-plugin</artifactId>
-                <version>2.4.0</version>
-                <configuration>
-                    <noServer>true</noServer>
-                    <inplace>false</inplace>
-                    <logLevel>INFO</logLevel>
-                    <runTarget>${installerGuiRunTarget}</runTarget>
-                    <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs>
-                    <localWorkers>${gwt-plugin.localWorkers}</localWorkers>
-                    <draftCompile>${gwt.draftCompile}</draftCompile>
-                    <soyc>${gwt.soyc}</soyc>
-                    <buildOutputDirectory>target/gwtclasses</buildOutputDirectory>
-                    <hostedWebapp>target/hostedWar</hostedWebapp>
-                    <debugSuspend>false</debugSuspend>
-                    <servicePattern>**/gwt/*GWTService.java</servicePattern>
-                    <i18nMessagesBundle>org.rhq.enterprise.gui.installer.client.Messages</i18nMessagesBundle>
-                    <i18nConstantsWithLookupBundle>org.rhq.enterprise.gui.installer.client.ServerPropertiesMessages</i18nConstantsWithLookupBundle>
-                    <style>${gwt.style}</style>
-                    <strict>true</strict>
-                    <!-- compiles gwt artifacts like symbolMap outside of war so it doesnt
-                        get packaged -->
-                    <deploy>${project.build.directory}/gwt-deploy</deploy>
-                </configuration>
-
-                <executions>
-                    <execution>
-                        <id>gwt-goals</id>
-                        <goals>
-                            <goal>compile</goal>
-                            <goal>generateAsync</goal>
-                            <goal>i18n</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <!-- This id is what does the trick, don't change it. For this to work
-                            maven 2.2.0 and later is needed. -->
-                        <id>default-cli</id>
-                        <goals>
-                            <goal>debug</goal>
-                        </goals>
-                        <configuration>
-                            <module>org.rhq.enterprise.gui.installer.Installer</module>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-war-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                        </manifest>
-                        <manifestEntries>
-                            <Build-Number>${buildNumber}</Build-Number>
-                            <Dependencies>org.jboss.msc,org.jboss.as.controller-client,org.jboss.as.controller,org.jboss.as.server</Dependencies>
-                        </manifestEntries>
-                    </archive>
-                    <webResources>
-                        <resource>
-                            <filtering>false</filtering>
-                            <directory>${basedir}/src/main/webapp</directory>
-                        </resource>
-                    </webResources>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>add-gwt-source</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                        </goals>
-                        <configuration>
-                            <sources>
-                                <source>${basedir}/target/generated-sources/gwt</source>
-                            </sources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-    </build>
-
-    <profiles>
-        <profile>
-            <id>dev</id>
-
-            <properties>
-                <rhq.rootDir>../../../..</rhq.rootDir>
-                <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-                <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
-                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
-            </properties>
-
-            <build>
-                <plugins>
-
-                    <plugin>
-                        <artifactId>maven-antrun-plugin</artifactId>
-                        <executions>
-
-                            <execution>
-                                <id>deploy-classes</id>
-                                <phase>compile</phase>
-                                <configuration>
-                                    <target>
-                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                                        <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to ${deployment.dir}${file.separator}...</echo>
-                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
-                                            <fileset dir="${basedir}/src/main/webapp" />
-                                        </copy>
-                                    </target>
-                                </configuration>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                            </execution>
-
-                            <execution>
-                                <id>deploy</id>
-                                <phase>package</phase>
-                                <configuration>
-                                    <target>
-                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                                        <echo>*** Copying updated files from target${file.separator}${project.build.finalName}${file.separator} to ${deployment.dir}${file.separator}...</echo>
-                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
-                                            <fileset dir="${basedir}/target/${project.build.finalName}" />
-                                        </copy>
-                                    </target>
-                                </configuration>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                            </execution>
-
-                            <execution>
-                                <id>undeploy</id>
-                                <phase>clean</phase>
-                                <configuration>
-                                    <target>
-                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
-                                        <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
-                                        <delete dir="${deployment.dir}" />
-                                    </target>
-                                </configuration>
-                                <goals>
-                                    <goal>run</goal>
-                                </goals>
-                            </execution>
-
-                        </executions>
-                    </plugin>
-
-                </plugins>
-            </build>
-        </profile>
-
-        <!-- Change the installerGuiRunTarget to not have single quotes. The quotes
-            work for linux but not win -->
-        <profile>
-            <id>windows</id>
-            <activation>
-                <os>
-                    <family>Windows</family>
-                </os>
-            </activation>
-            <properties>
-                <installerGuiRunTarget>http://localhost:7080//rhq-gwt-installer/index.html${installerGuiParams}</installerGuiRunTarget>
-            </properties>
-        </profile>
-
-        <profile>
-            <id>msg</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <includes>
-                                <include>org/rhq/enterprise/gui/installer/client/*Messages.java</include>
-                            </includes>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
-            <id>disable-tags</id>
-            <activation>
-                <property>
-                    <name>brew</name>
-                </property>
-            </activation>
-            <properties>
-                <enable.tags>false</enable.tags>
-            </properties>
-        </profile>
-
-    </profiles>
-
-
-    <repositories>
-        <repository>
-            <id>smartgwt</id>
-            <name>SmartGWT Releases</name>
-            <url>http://www.smartclient.com/maven2/</url>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-
-        <repository>
-            <id>codehaus</id>
-            <name>Codehaus Releases</name>
-            <url>http://repository.codehaus.org/</url>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-
-    </repositories>
-
-</project>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
deleted file mode 100644
index 1a54d36..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.common.jbossas.client.controller;
-
-import java.util.Arrays;
-
-import org.jboss.dmr.ModelNode;
-
-/**
- * Identifies a managed resource.
- *
- * @author John Mazzitelli
- */
-public class Address implements Cloneable {
-    private ModelNode addressNode;
-
-    public static Address root() {
-        return new Address();
-    }
-
-    public Address() {
-        addressNode = new ModelNode();
-    }
-
-    public Address(String... addressParts) {
-        this();
-        add(addressParts);
-    }
-
-    public ModelNode getAddressNode() {
-        return addressNode;
-    }
-
-    public Address add(String... addressParts) {
-        if (addressParts != null) {
-            if ((addressParts.length % 2) != 0) {
-                throw new IllegalArgumentException("address is incomplete: " + Arrays.toString(addressParts));
-            }
-
-            if (addressParts.length > 0) {
-                for (int i = 0; i < addressParts.length; i += 2) {
-                    addressNode.add(addressParts[i], addressParts[i + 1]);
-                }
-            }
-        }
-
-        return this;
-    }
-
-    public Address add(String type, String name) {
-        addressNode.add(type, name);
-        return this;
-    }
-
-    @Override
-    public Address clone() throws CloneNotSupportedException {
-        Address clone = new Address();
-        clone.addressNode = addressNode.clone();
-        return clone;
-    }
-
-    @Override
-    public String toString() {
-        return addressNode.asString();
-    }
-}
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
deleted file mode 100644
index fb3135c..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.common.jbossas.client.controller;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-
-/**
- * Provides convienence methods associated with datasource management.
- * 
- * @author John Mazzitelli
- */
-public class DatasourceJBossASClient extends JBossASClient {
-
-    public DatasourceJBossASClient(ModelControllerClient client) {
-        super(client);
-    }
-
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
deleted file mode 100644
index 6dde289..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.common.jbossas.client.controller;
-
-import org.jboss.dmr.ModelNode;
-
-/**
- * Indicates a failed client request.
- *
- * @author John Mazzitelli
- */
-public class FailureException extends RuntimeException {
-    private static final long serialVersionUID = 1L;
-
-    private static final String GENERIC_ERROR = "Failed request";
-
-    public FailureException(ModelNode failureNode) {
-        super(buildErrorMessage(GENERIC_ERROR, failureNode));
-    }
-
-    public FailureException(ModelNode failureNode, String errMsg) {
-        super(buildErrorMessage(errMsg, failureNode));
-    }
-
-    public FailureException(ModelNode failureNode, Throwable cause) {
-        super(buildErrorMessage(GENERIC_ERROR, failureNode), cause);
-    }
-
-    public FailureException(ModelNode failureNode, String errMsg, Throwable cause) {
-        super(buildErrorMessage(errMsg, failureNode), cause);
-    }
-
-    public FailureException(String errMsg, Throwable cause) {
-        super((errMsg != null) ? errMsg : GENERIC_ERROR, cause);
-    }
-
-    public FailureException(String errMsg) {
-        super((errMsg != null) ? errMsg : GENERIC_ERROR);
-    }
-
-    public FailureException(Throwable cause) {
-        super(GENERIC_ERROR, cause);
-    }
-
-    public FailureException() {
-        super(GENERIC_ERROR);
-    }
-
-    private static final String buildErrorMessage(String errMsg, ModelNode failureNode) {
-        if (errMsg == null) {
-            errMsg = GENERIC_ERROR;
-        }
-
-        String description = JBossASClient.getFailureDescription(failureNode);
-        if (description != null) {
-            errMsg += ": " + description;
-        }
-
-        return errMsg;
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
deleted file mode 100644
index c8d040c..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.common.jbossas.client.controller;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.controller.client.OperationMessageHandler;
-import org.jboss.dmr.ModelNode;
-
-/**
- * A client that can be used to talk to a JBossAS server via the DMR/ModelControllerClient API.
- *
- * @author John Mazzitelli
- */
-public class JBossASClient {
-
-    // protected to allow subclasses to have a logger, too, without explicitly declaring one themselves
-    protected final Log log = LogFactory.getLog(this.getClass());
-
-    public static final String BATCH = "composite";
-    public static final String BATCH_STEPS = "steps";
-    public static final String OPERATION = "operation";
-    public static final String ADDRESS = "address";
-    public static final String RESULT = "result";
-    public static final String OUTCOME = "outcome";
-    public static final String OUTCOME_SUCCESS = "success";
-    public static final String SUBSYSTEM = "subsystem";
-    public static final String FAILURE_DESCRIPTION = "failure-description";
-    public static final String NAME = "name";
-    public static final String VALUE = "value";
-    public static final String READ_ATTRIBUTE = "read-attribute";
-    public static final String READ_RESOURCE = "read-resource";
-    public static final String WRITE_ATTRIBUTE = "write-attribute";
-    public static final String ADD = "add";
-
-    private ModelControllerClient client;
-
-    public JBossASClient(ModelControllerClient client) {
-        this.client = client;
-    }
-
-    /////////////////////////////////////////////////////////////////
-    // Some static methods useful for convienence
-
-    /**
-     * Convienence method that allows you to create request that reads a single attribute
-     * value to a resource.
-     * 
-     * @param attributeName the name of the attribute whose value is to be read
-     * @param address identifies the resource
-     * @return the request
-     */
-    public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
-        return createReadAttributeRequest(false, attributeName, address);
-    }
-
-    /**
-     * Convienence method that allows you to create request that reads a single attribute
-     * value to a resource.
-     *
-     * @param runtime if <code>true</code>, the attribute is a runtime attribute
-     * @param attributeName the name of the attribute whose value is to be read
-     * @param address identifies the resource
-     * @return the request
-     */
-    public static ModelNode createReadAttributeRequest(boolean runtime, String attributeName, Address address) {
-        ModelNode op = createRequest(READ_ATTRIBUTE, address);
-        op.get("include-runtime").set(runtime);
-        op.get(NAME).set(attributeName);
-        return op;
-    }
-
-    /**
-     * Convienence method that allows you to create request that writes a single attribute's
-     * string value to a resource.
-     * 
-     * @param attributeName the name of the attribute whose value is to be written
-     * @param attributeValue the attribute value that is to be written
-     * @param address identifies the resource
-     * @return the request
-     */
-    public static ModelNode createWriteAttributeRequest(String attributeName, String attributeValue, Address address) {
-        ModelNode op = createRequest(WRITE_ATTRIBUTE, address);
-        op.get(NAME).set(attributeName);
-        op.get(VALUE).set(attributeValue);
-        return op;
-    }
-
-    /**
-     * Convienence method that builds a partial operation request node.
-     * 
-     * @param operation the operation to be requested
-     * @param address identifies the target resource
-     * @return the partial operation request node - caller should fill this in further to complete the node
-     */
-    public static ModelNode createRequest(String operation, Address address) {
-        final ModelNode request = new ModelNode();
-        request.get(OPERATION).set(operation);
-        request.get(ADDRESS).set(address.getAddressNode());
-        return request;
-    }
-
-    /**
-     * Creates a batch of operations that can be atomically invoked.
-     * 
-     * @param steps the different operation steps of the batch
-     * 
-     * @return the batch operation node
-     */
-    public static ModelNode createBatchRequest(ModelNode... steps) {
-        final ModelNode composite = new ModelNode();
-        composite.get(OPERATION).set(BATCH);
-        composite.get(ADDRESS).setEmptyList();
-        final ModelNode stepsNode = composite.get(BATCH_STEPS);
-        for (ModelNode step : steps) {
-            stepsNode.add(step);
-        }
-        return composite;
-    }
-
-    /**
-     * If the given node has a result list, that list will be returned
-     * with the values as Strings. Otherwise, an empty list is returned.
-     * 
-     * @param operationResult the node to examine
-     * @return the result list as Strings if there is a list, empty otherwise
-     */
-    public static List<String> getResultListAsStrings(ModelNode operationResult) {
-        if (!operationResult.hasDefined(RESULT)) {
-            return Collections.emptyList();
-        }
-
-        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
-        if (nodeList.isEmpty()) {
-            return Collections.emptyList();
-        }
-
-        List<String> list = new ArrayList<String>(nodeList.size());
-        for (ModelNode node : nodeList) {
-            list.add(node.asString());
-        }
-
-        return list;
-    }
-
-    /**
-     * If the given node has results, those results are returned in a ModelNode.
-     * Otherwise, an empty node is returned.
-     * 
-     * @param operationResult the node to examine
-     * @return the results as a ModelNode
-     */
-    public static ModelNode getResults(ModelNode operationResult) {
-        if (!operationResult.hasDefined(RESULT)) {
-            return new ModelNode();
-        }
-
-        return operationResult.get(RESULT);
-    }
-
-    /**
-     * Examines the given node's result list and if the item is found, returns true.
-     * 
-     * @param operationResult the node to examine
-     * @param item the item to look for in the node's result list
-     * @return true if the node has a result list and it contains the item; false otherwise
-     */
-    public static boolean listContains(ModelNode operationResult, String item) {
-        if (!operationResult.hasDefined(RESULT)) {
-            return false;
-        }
-
-        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
-        if (nodeList.isEmpty()) {
-            return false;
-        }
-
-        for (ModelNode node : nodeList) {
-            if (node.asString().equals(item)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Returns <code>true</code> if the operation was a success; <code>false</code> otherwise.
-     * 
-     * @param operationResult the operation result to test
-     * @return the success or failure flag of the result
-     */
-    public static boolean isSuccess(ModelNode operationResult) {
-        if (operationResult != null) {
-            return operationResult.hasDefined(OUTCOME)
-                && operationResult.get(OUTCOME).asString().equals(OUTCOME_SUCCESS);
-        }
-        return false;
-    }
-
-    /**
-     * If the operation result was a failure, this returns the failure description if there is one.
-     * A generic failure message will be returned if the operation was a failure but has no failure
-     * description. A <code>null</code> is returned if the operation was a success.
-     * 
-     * @param operationResult the operation whose failure description is to be returned
-     * @return the failure description of <code>null</code> if the operation was a success
-     */
-    public static String getFailureDescription(ModelNode operationResult) {
-        if (isSuccess(operationResult)) {
-            return null;
-        }
-        if (operationResult != null) {
-            ModelNode descr = operationResult.get(FAILURE_DESCRIPTION);
-            if (descr != null) {
-                return descr.asString();
-            }
-        }
-        return "Unknown failure";
-    }
-
-    /////////////////////////////////////////////////////////////////
-    // Non-static methods that need the client
-
-    public ModelControllerClient getModelControllerClient() {
-        return client;
-    }
-
-    /**
-     * Convienence method that executes the request.
-     * 
-     * @param request
-     * @return results
-     * @throws Exception
-     */
-    public ModelNode execute(ModelNode request) throws Exception {
-        try {
-            return getModelControllerClient().execute(request, OperationMessageHandler.logging);
-        } catch (Exception e) {
-            log.error("Failed to execute request", e);
-            throw e;
-        }
-    }
-
-    /**
-     * Convienence method that allows you to obtain a single attribute's string value from
-     * a resource.
-     * 
-     * @param attributeName the attribute whose value is to be returned
-     * @param address identifies the resource
-     * @return the attribute value
-     * 
-     * @throws Exception if failed to obtain the attribute value
-     */
-    public String getStringAttribute(String attributeName, Address address) throws Exception {
-        return getStringAttribute(false, attributeName, address);
-    }
-
-    /**
-     * Convienence method that allows you to obtain a single attribute's string value from
-     * a resource.
-     *
-     * @param runtime if <code>true</code>, the attribute to be retrieved is a runtime attribute
-     * @param attributeName the attribute whose value is to be returned
-     * @param address identifies the resource
-     * @return the attribute value
-     * 
-     * @throws Exception if failed to obtain the attribute value
-     */
-    public String getStringAttribute(boolean runtime, String attributeName, Address address) throws Exception {
-        ModelNode op = createReadAttributeRequest(runtime, attributeName, address);
-        ModelNode results = execute(op);
-        if (isSuccess(results)) {
-            ModelNode version = getResults(results);
-            String attributeValue = version.asString();
-            return attributeValue;
-        } else {
-            throw new FailureException(results, "Failed to get attribute [" + attributeName + "] from [" + address
-                + "]");
-        }
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
deleted file mode 100644
index a73ba79..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.common.jbossas.client.controller;
-
-import java.util.List;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.dmr.ModelNode;
-
-/**
- * Provides convienence methods associated with security domain management.
- * 
- * @author John Mazzitelli
- */
-public class SecurityDomainJBossASClient extends JBossASClient {
-
-    public static final String SUBSYSTEM_SECURITY = "security";
-    public static final String SECURITY_DOMAIN = "security-domain";
-    public static final String CACHE_TYPE = "cache-type";
-    public static final String AUTHENTICATION = "authentication";
-    public static final String LOGIN_MODULES = "login-modules";
-    public static final String CLASSIC = "classic";
-    public static final String CODE = "code";
-    public static final String FLAG = "flag";
-    public static final String MODULE_OPTIONS = "module-options";
-    public static final String USERNAME = "username";
-    public static final String PASSWORD = "password";
-
-    public SecurityDomainJBossASClient(ModelControllerClient client) {
-        super(client);
-    }
-
-    /**
-     * Checks to see if there is already a security domain with the given name.
-     *
-     * @param securityDomainName the name to check
-     * @return true if there is a security domain with the given name already in existence
-     */
-    public boolean isSecurityDomain(String securityDomainName) throws Exception {
-        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY);
-        ModelNode queryNode = createRequest(READ_RESOURCE, addr);
-        ModelNode results = execute(queryNode);
-        if (isSuccess(results)) {
-            ModelNode domains = getResults(results).get(SECURITY_DOMAIN);
-            List<ModelNode> list = domains.asList();
-            for (ModelNode domain : list) {
-                if (domain.has(securityDomainName)) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            throw new FailureException(results, "Failed to get security domains");
-        }
-    }
-
-    /**
-     * Convienence method that builds a request which can create a new security-domain
-     * using the SecureIdentity authentication method. This is used when you want
-     * to obfuscate a database password in the configuration. 
-     *
-     * @param securityDomainName the name of the new security domain
-     * @param username the username associated with the security domain
-     * @param password the value of the password to store in the configuration (e.g. the obfuscated password itself)
-     * 
-     * @throws Exception if failed to create security domain
-     */
-    public void createNewSecureIdentitySecurityDomainRequest(String securityDomainName, String username, String password)
-        throws Exception {
-
-        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, SECURITY_DOMAIN, securityDomainName);
-        ModelNode addTopNode = createRequest(ADD, addr);
-        addTopNode.get(CACHE_TYPE).set("default");
-
-        ModelNode addAuthNode = createRequest(ADD, addr.clone().add(AUTHENTICATION, CLASSIC));
-        ModelNode loginModulesNode = addAuthNode.get(LOGIN_MODULES);
-        ModelNode loginModule = new ModelNode();
-        loginModule.get(CODE).set("SecureIdentity");
-        loginModule.get(FLAG).set("required");
-        ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
-        moduleOptions.setEmptyList();
-        moduleOptions.add(USERNAME, username);
-        moduleOptions.add(PASSWORD, password);
-        loginModulesNode.add(loginModule);
-
-        ModelNode batch = createBatchRequest(addTopNode, addAuthNode);
-        ModelNode results = execute(batch);
-        if (!isSuccess(results)) {
-            throw new FailureException(results, "Failed to create security domain [" + securityDomainName + "]");
-        }
-
-        return;
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
deleted file mode 100644
index 0fc0215..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.types.Alignment;
-import com.smartgwt.client.types.Side;
-import com.smartgwt.client.types.VerticalAlignment;
-import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.Button;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.IButton;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.fields.ButtonItem;
-import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.FormItemIcon;
-import com.smartgwt.client.widgets.form.fields.PasswordItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.SpacerItem;
-import com.smartgwt.client.widgets.form.fields.SpinnerItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
-import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
-import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-import com.smartgwt.client.widgets.form.fields.events.IconClickEvent;
-import com.smartgwt.client.widgets.form.fields.events.IconClickHandler;
-import com.smartgwt.client.widgets.grid.ListGrid;
-import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.events.EditCompleteEvent;
-import com.smartgwt.client.widgets.grid.events.EditCompleteHandler;
-import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.Tab;
-import com.smartgwt.client.widgets.tab.TabSet;
-import com.smartgwt.client.widgets.toolbar.ToolStrip;
-
-import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
-import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
-import org.rhq.enterprise.gui.installer.client.shared.ServerProperties;
-
-/**
- * The GWT {@link EntryPoint entry point} to the RHQ Installer GUI.
- *
- * @author John Mazzitelli
- */
-public class Installer implements EntryPoint {
-
-    // This must come first to ensure proper I18N class loading for dev mode
-    public static final Messages MSG = GWT.create(Messages.class);
-    public static final ServerPropertiesMessages PROPS_MSG = GWT.create(ServerPropertiesMessages.class);
-
-    private static final String NEW_SERVER_TO_REGISTER = "*new*";
-
-    private final InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
-    private final ServerPropertyRecordList serverProperties = new ServerPropertyRecordList();
-    private final HashMap<String, String> originalProperties = new HashMap<String, String>();
-    private final LinkedHashMap<String, String> registeredServerNames = new LinkedHashMap<String, String>();
-
-    private ListGrid advancedPropertyItemGrid;
-    private Button mainInstallButton;
-    private TextItem dbConnectionUrl;
-    private TextItem dbUsername;
-    private PasswordItem dbPassword;
-    private SelectItem dbExistingSchemaOption;
-    private ButtonItem testConnectionButton;
-    private SelectItem dbType;
-    private TextItem serverSettingServerName;
-    private TextItem serverSettingPublicAddress;
-    private SpinnerItem serverSettingWebHttpPort;
-    private SpinnerItem serverSettingWebSecureHttpPort;
-    private SelectItem registeredServersSelection;
-    private TextItem serverSettingEmailSMTPHostname;
-    private TextItem serverSettingEmailFromAddress;
-
-    public void onModuleLoad() {
-        Canvas header = createHeader();
-        mainInstallButton = createMainInstallButton();
-        Canvas tabSet = createTabSet();
-
-        VLayout layout = new VLayout();
-        layout.setWidth100();
-        layout.setHeight100();
-        layout.setLayoutMargin(10);
-        layout.setMembersMargin(5);
-        layout.setDefaultLayoutAlign(Alignment.CENTER);
-        layout.addMember(header);
-        layout.addMember(mainInstallButton);
-        layout.addMember(tabSet);
-        layout.draw();
-
-        // Remove loading image in case we don't completely cover it
-        Element loadingPanel = DOM.getElementById("Loading-Panel");
-        loadingPanel.removeFromParent();
-
-        // get the server properties from the server
-        loadServerProperties();
-
-    }
-
-    private void updateServerProperty(String name, Object value) {
-        serverProperties.putServerProperty(name, value == null ? "" : value.toString());
-        refreshAdvancedView();
-    }
-
-    private void loadServerProperties() {
-        // load the initial server properties
-        installerService.getServerProperties(new AsyncCallback<HashMap<String, String>>() {
-            public void onSuccess(HashMap<String, String> result) {
-                if (result.size() == 0) {
-                    SC.say("Initial server properties are missing.");
-                }
-                serverProperties.replaceServerProperties(result);
-
-                // remember these original properties in case the user wants to reset them back
-                originalProperties.clear();
-                originalProperties.putAll(result);
-
-                // refresh the simple view with the new data
-                refreshSimpleView();
-
-                // refresh the advanced view with the new data
-                refreshAdvancedView();
-            }
-
-            public void onFailure(Throwable caught) {
-                SC.say("Cannot load properties: " + caught);
-            }
-        });
-    }
-
-    private void refreshSimpleView() {
-        Map<String, String> props = serverProperties.getMap();
-
-        // DB SETTINGS
-        dbType.setValue(props.get(ServerProperties.PROP_DATABASE_TYPE));
-        dbConnectionUrl.setValue(props.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
-        dbUsername.setValue(props.get(ServerProperties.PROP_DATABASE_USERNAME));
-        // do not prefill the database password - force the user to know it and type it in for security purposes
-
-        // SERVER SETTINGS
-        serverSettingServerName.setValue(props.get(ServerProperties.PROP_HIGH_AVAILABILITY_NAME));
-        serverSettingWebHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTP_PORT));
-        serverSettingWebSecureHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTPS_PORT));
-        serverSettingEmailSMTPHostname.setValue(props.get(ServerProperties.PROP_EMAIL_SMTP_HOST));
-        serverSettingEmailFromAddress.setValue(props.get(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
-
-        forceAnotherTestConnection();
-    }
-
-    private void refreshAdvancedView() {
-        advancedPropertyItemGrid.markForRedraw();
-    }
-
-    private Canvas createHeader() {
-        ToolStrip strip = new ToolStrip();
-        strip.setWidth100();
-        strip.setAlign(Alignment.CENTER);
-
-        Label title = new Label();
-        title.setWidth100();
-        title.setHeight100();
-        title.setWrap(false);
-        title.setValign(VerticalAlignment.CENTER);
-        title.setAlign(Alignment.CENTER);
-        title.setContents("<span style=\"font-size:16pt;font-weight:bold;\">" + MSG.welcome_title() + "</span>");
-        strip.addMember(title);
-        return strip;
-    }
-
-    private Button createMainInstallButton() {
-        Button installButton = new Button(MSG.button_startInstallation());
-        installButton.setWrap(false);
-        installButton.setAutoFit(true);
-        installButton.setDisabled(true); // we can't allow the user to install yet
-        installButton.addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                SC.say("TODO: this should start the install");
-            }
-        });
-
-        return installButton;
-    }
-
-    private TabSet createTabSet() {
-        final TabSet topTabSet = new TabSet();
-        topTabSet.setTabBarPosition(Side.TOP);
-        topTabSet.setTabBarAlign(Side.LEFT);
-        topTabSet.setWidth("90%");
-
-        final Tab welcomeTab = new Tab(MSG.tab_welcome());
-        Label welcomeLabel = new Label(MSG.tab_welcome_content());
-        welcomeTab.setPane(welcomeLabel);
-
-        final Tab simpleViewTab = new Tab(MSG.tab_simpleView());
-        Canvas simpleForm = createSimpleForm();
-        simpleViewTab.setPane(simpleForm);
-
-        final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
-        Canvas advancedView = createAdvancedView();
-        advancedViewTab.setPane(advancedView);
-
-        topTabSet.addTab(welcomeTab);
-        topTabSet.addTab(simpleViewTab);
-        topTabSet.addTab(advancedViewTab);
-
-        return topTabSet;
-    }
-
-    private Canvas createAdvancedView() {
-        VLayout layout = new VLayout();
-
-        ToolStrip strip = new ToolStrip();
-        strip.setWidth100();
-
-        IButton saveButton = new IButton(MSG.button_save());
-        saveButton.addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                installerService.saveServerProperties(serverProperties.getMap(), new AsyncCallback<Void>() {
-                    public void onSuccess(Void result) {
-                        originalProperties.clear();
-                        originalProperties.putAll(serverProperties.getMap());
-                        SC.say("Properties saved to server");
-                    }
-
-                    public void onFailure(Throwable caught) {
-                        SC.say("Failed to save properties to server");
-                    }
-                });
-            }
-        });
-        IButton resetButton = new IButton(MSG.button_reset());
-        resetButton.addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                serverProperties.replaceServerProperties(originalProperties);
-                refreshAdvancedView();
-            }
-        });
-        strip.addMember(saveButton);
-        strip.addMember(resetButton);
-        layout.addMember(strip);
-
-        advancedPropertyItemGrid = new ListGrid();
-        advancedPropertyItemGrid.setWidth100();
-        advancedPropertyItemGrid.setHeight100();
-        advancedPropertyItemGrid.setData(serverProperties);
-
-        ListGridField nameField = new ListGridField(ServerPropertyRecordList.PROPERTY_NAME, MSG.property_name_label());
-        nameField.setCanEdit(false);
-
-        ListGridField valueField = new ListGridField(ServerPropertyRecordList.PROPERTY_VALUE,
-            MSG.property_value_label());
-        valueField.setCanEdit(true);
-
-        advancedPropertyItemGrid.setFields(nameField, valueField);
-        advancedPropertyItemGrid.setSortField(ServerPropertyRecordList.PROPERTY_NAME);
-
-        advancedPropertyItemGrid.addEditCompleteHandler(new EditCompleteHandler() {
-            public void onEditComplete(EditCompleteEvent event) {
-                String newValue = (String) event.getNewValues().values().iterator().next().toString();
-                String changedProperty = event.getOldRecord().getAttribute(ServerPropertyRecordList.PROPERTY_NAME);
-                serverProperties.getMap().put(changedProperty, newValue); // we need this to be reflected in the internal map
-                refreshSimpleView();
-            }
-        });
-
-        layout.addMember(advancedPropertyItemGrid);
-
-        return layout;
-    }
-
-    private Canvas createSimpleForm() {
-
-        final int fieldWidth = 300;
-
-        ////////////////////////////////////////////////////////
-        // The Database form
-
-        final DynamicForm databaseForm = new DynamicForm();
-        databaseForm.setAutoWidth();
-        databaseForm.setPadding(5);
-        databaseForm.setCellPadding(5);
-        databaseForm.setWrapItemTitles(false);
-        databaseForm.setIsGroup(true);
-        databaseForm.setGroupTitle(MSG.tab_simpleView_database());
-
-        dbConnectionUrl = new TextItem(ServerProperties.PROP_DATABASE_CONNECTION_URL,
-            PROPS_MSG.rhq_server_database_connection_url());
-        dbConnectionUrl.setWidth(fieldWidth);
-        dbConnectionUrl.setValue("jdbc:postgresql://127.0.0.1:5432/rhq");
-        dbConnectionUrl.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, String.valueOf(event.getValue()));
-                forceAnotherTestConnection();
-            }
-        });
-
-        dbUsername = new TextItem(ServerProperties.PROP_DATABASE_USERNAME,
-            PROPS_MSG.rhq_server_database_user_name());
-        dbUsername.setWidth(fieldWidth);
-        dbUsername.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_DATABASE_USERNAME, String.valueOf(event.getValue()));
-                forceAnotherTestConnection();
-            }
-        });
-
-        dbPassword = new PasswordItem(ServerProperties.PROP_DATABASE_PASSWORD,
-            PROPS_MSG.rhq_server_database_password());
-        dbPassword.setWidth(fieldWidth);
-        dbPassword.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_DATABASE_PASSWORD, String.valueOf(event.getValue()));
-                forceAnotherTestConnection();
-            }
-        });
-
-        dbExistingSchemaOption = new SelectItem("existingSchemaOption", MSG.schema_update_question());
-        final LinkedHashMap<String, String> schemaOpt = new LinkedHashMap<String, String>();
-        schemaOpt.put("keep", MSG.schema_update_keep());
-        schemaOpt.put("overwrite", MSG.schema_update_overwrite());
-        schemaOpt.put("skip", MSG.schema_update_skip());
-        dbExistingSchemaOption.setValueMap(schemaOpt);
-        dbExistingSchemaOption.setDefaultToFirstOption(true);
-        dbExistingSchemaOption.setVisible(false);
-        dbExistingSchemaOption.setWidth(fieldWidth);
-        dbExistingSchemaOption.setWrapTitle(true);
-        dbExistingSchemaOption.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                if (registeredServersSelection != null) {
-                    String selected = event.getValue().toString();
-                    if ("overwrite".equals(selected)) {
-                        registeredServersSelection.setValue((String) null);
-                        registeredServersSelection.disable();
-                    } else {
-                        registeredServersSelection.enable();
-                    }
-                }
-            }
-        });
-
-        testConnectionButton = new ButtonItem("testConnectionButton", MSG.button_testConnection());
-        testConnectionButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
-            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
-                final Conn conn = new Conn();
-                installerService.testConnection(conn.url(), conn.username(), conn.password(),
-                    new AsyncCallback<String>() {
-                        public void onSuccess(String result) {
-                            if (result != null) {
-                                forceAnotherTestConnection();
-                                testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
-                                SC.say("Could not connect to the database: " + result);
-                            } else {
-                                connectedToDatabase();
-                            }
-                        }
-
-                        public void onFailure(Throwable caught) {
-                            forceAnotherTestConnection();
-                            testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
-                            SC.say("Failed to test connection: " + caught.toString());
-                        }
-                    });
-
-            }
-        });
-
-        dbType = new SelectItem(ServerProperties.PROP_DATABASE_TYPE,
-            PROPS_MSG.rhq_server_database_type_mapping());
-        final LinkedHashMap<String, String> dbs = new LinkedHashMap<String, String>();
-        dbs.put("PostgreSQL", "PostgreSQL");
-        dbs.put("Oracle", "Oracle");
-        dbType.setValueMap(dbs);
-        dbType.setDefaultToFirstOption(true);
-        dbType.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                forceAnotherTestConnection();
-
-                String newDBType = (String) event.getValue();
-                String newURL = "";
-                String dialect = "";
-                String quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.StdJDBCDelegate";
-                String quartzSelectWithLockSQL = "SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE";
-                String quartzLockHandlerClass = "org.quartz.impl.jdbcjobstore.StdRowLockSemaphore";
-
-                if ("PostgreSQL".equalsIgnoreCase(newDBType)) {
-                    newURL = "jdbc:postgresql://127.0.0.1:5432/rhq";
-                    dialect = "org.hibernate.dialect.PostgreSQLDialect";
-                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate";
-                } else if ("Oracle".equalsIgnoreCase(newDBType)) {
-                    newURL = "jdbc:oracle:thin:@127.0.0.1:1521:rhq";
-                    dialect = "org.hibernate.dialect.Oracle10gDialect";
-                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.oracle.OracleDelegate";
-                }
-                dbConnectionUrl.setValue(newURL);
-
-                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, newURL);
-                updateServerProperty(ServerProperties.PROP_DATABASE_HIBERNATE_DIALECT, dialect);
-                updateServerProperty(ServerProperties.PROP_QUARTZ_DRIVER_DELEGATE_CLASS, quartzDriverDelegateClass);
-                updateServerProperty(ServerProperties.PROP_QUARTZ_SELECT_WITH_LOCK_SQL, quartzSelectWithLockSQL);
-                updateServerProperty(ServerProperties.PROP_QUARTZ_LOCK_HANDLER_CLASS, quartzLockHandlerClass);
-                updateServerProperty(ServerProperties.PROP_DATABASE_TYPE, newDBType); // this refreshes the advanced view, too
-            }
-        });
-
-        // use this to move the button over to the second column - it looks better this way
-        SpacerItem buttonSpacer = new SpacerItem();
-        buttonSpacer.setEndRow(false);
-        testConnectionButton.setStartRow(false);
-
-        databaseForm.setFields(dbType, dbConnectionUrl, dbUsername, dbPassword, buttonSpacer, testConnectionButton,
-            dbExistingSchemaOption);
-
-        ////////////////////////////////////////////////////////
-        // The Server Settings form
-
-        final DynamicForm serverSettingsForm = new DynamicForm();
-        serverSettingsForm.setPadding(5);
-        serverSettingsForm.setCellPadding(5);
-        serverSettingsForm.setAutoWidth();
-        serverSettingsForm.setIsGroup(true);
-        serverSettingsForm.setWrapItemTitles(false);
-        serverSettingsForm.setGroupTitle(MSG.tab_simpleView_serverSettings());
-
-        serverSettingServerName = new TextItem(ServerProperties.PROP_HIGH_AVAILABILITY_NAME,
-            PROPS_MSG.rhq_server_high_availability_name());
-        serverSettingServerName.setWidth(fieldWidth);
-        serverSettingServerName.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, String.valueOf(event.getValue()));
-                if (registeredServersSelection != null) {
-                    registeredServersSelection.setValue((String) null); // flip it back to *new* since the server name changed
-                }
-            }
-        });
-
-        serverSettingPublicAddress = new TextItem("serverPublicAddress",
-            MSG.tab_simpleView_serverSettings_publicAddress());
-        serverSettingPublicAddress.setWidth(fieldWidth);
-
-        serverSettingWebHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTP_PORT,
-            PROPS_MSG.rhq_server_startup_web_http_port());
-        serverSettingWebHttpPort.setWidth(fieldWidth);
-        serverSettingWebHttpPort.setMin(1);
-        serverSettingWebHttpPort.setMax(65535);
-        serverSettingWebHttpPort.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT, String.valueOf(event.getValue()));
-            }
-        });
-
-        serverSettingWebSecureHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTPS_PORT,
-            PROPS_MSG.rhq_server_startup_web_https_port());
-        serverSettingWebSecureHttpPort.setWidth(fieldWidth);
-        serverSettingWebSecureHttpPort.setMin(1);
-        serverSettingWebSecureHttpPort.setMax(65535);
-        serverSettingWebSecureHttpPort.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT, String.valueOf(event.getValue()));
-            }
-        });
-
-        registeredServersSelection = new SelectItem("registeredServersSelectItem",
-            MSG.tab_simpleView_serverSettings_registeredServers());
-        registeredServersSelection.setWidth(fieldWidth);
-        addContextualHelp(registeredServersSelection, MSG.help_registeredServers());
-        registeredServerNames.put(NEW_SERVER_TO_REGISTER,
-            MSG.tab_simpleView_serverSettings_registeredServers_newServer());
-        registeredServersSelection.setValueMap(registeredServerNames);
-        registeredServersSelection.setDefaultToFirstOption(true);
-        registeredServersSelection.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                final String selectedServerName = String.valueOf(event.getValue());
-                final boolean newServer = NEW_SERVER_TO_REGISTER.equals(selectedServerName);
-                if (newServer) {
-                    serverSettingServerName.setValue("");
-                    serverSettingPublicAddress.setValue("");
-                    updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, "");
-                } else {
-                    final Conn conn = new Conn();
-                    installerService.getServerDetails(conn.url(), conn.username(), conn.password(), selectedServerName,
-                        new AsyncCallback<ServerDetails>() {
-                            public void onSuccess(ServerDetails details) {
-                                serverSettingServerName.setValue(details.getName());
-                                serverSettingPublicAddress.setValue(details.getEndpointAddress());
-                                serverSettingWebHttpPort.setValue(details.getEndpointPortString());
-                                serverSettingWebSecureHttpPort.setValue(details.getEndpointSecurePortString());
-                                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, details.getName());
-                                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT,
-                                    details.getEndpointPortString());
-                                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT,
-                                    details.getEndpointSecurePortString());
-                            }
-
-                            public void onFailure(Throwable caught) {
-                                SC.say("Failed to get details on selected server [" + selectedServerName + "]");
-                            }
-                        });
-                }
-            }
-        });
-
-        serverSettingEmailSMTPHostname = new TextItem(ServerProperties.PROP_EMAIL_SMTP_HOST,
-            PROPS_MSG.rhq_server_email_smtp_host());
-        serverSettingEmailSMTPHostname.setWidth(fieldWidth);
-        serverSettingEmailSMTPHostname.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_EMAIL_SMTP_HOST, String.valueOf(event.getValue()));
-            }
-        });
-
-        serverSettingEmailFromAddress = new TextItem(ServerProperties.PROP_EMAIL_FROM_ADDRESS,
-            PROPS_MSG.rhq_server_email_from_address());
-        serverSettingEmailFromAddress.setWidth(fieldWidth);
-        serverSettingEmailFromAddress.addChangedHandler(new ChangedHandler() {
-            public void onChanged(ChangedEvent event) {
-                updateServerProperty(ServerProperties.PROP_EMAIL_FROM_ADDRESS, String.valueOf(event.getValue()));
-            }
-        });
-
-        serverSettingsForm.setItems(registeredServersSelection, serverSettingServerName, serverSettingPublicAddress,
-            serverSettingWebHttpPort, serverSettingWebSecureHttpPort, serverSettingEmailSMTPHostname,
-            serverSettingEmailFromAddress);
-
-        ////////////////////////////////////////////////////////
-        // The layout holding the forms in the simple view tab
-
-        VLayout simpleForm = new VLayout();
-        simpleForm.setLayoutMargin(5);
-        simpleForm.setMembersMargin(5);
-        simpleForm.setWidth100();
-        simpleForm.setHeight100();
-        simpleForm.setDefaultLayoutAlign(Alignment.CENTER);
-        simpleForm.addMember(databaseForm);
-        simpleForm.addMember(serverSettingsForm);
-
-        return simpleForm;
-    }
-
-    private void connectedToDatabase() {
-        final Conn conn = new Conn();
-        testConnectionButton.setIcon("[SKIN]/actions/ok.png");
-        installerService.isDatabaseSchemaExist(conn.url(), conn.username(), conn.password(),
-            new AsyncCallback<Boolean>() {
-                public void onSuccess(Boolean schemaExists) {
-                    if (schemaExists) {
-                        dbExistingSchemaOption.show();
-                        registeredServersSelection.enable();
-
-                        installerService.getServerNames(conn.url(), conn.username(), conn.password(),
-                            new AsyncCallback<ArrayList<String>>() {
-                                public void onSuccess(ArrayList<String> servers) {
-                                    registeredServerNames.clear();
-                                    registeredServerNames.put(NEW_SERVER_TO_REGISTER,
-                                        MSG.tab_simpleView_serverSettings_registeredServers_newServer());
-                                    for (String server : servers) {
-                                        registeredServerNames.put(server, server);
-                                    }
-                                    registeredServersSelection.setValueMap(registeredServerNames);
-                                }
-
-                                public void onFailure(Throwable caught) {
-                                    SC.say("Cannot get the registered server names");
-                                }
-                            });
-                    } else {
-                        dbExistingSchemaOption.hide();
-                        registeredServersSelection.setValue((String) null);
-                        registeredServersSelection.disable();
-                    }
-                    mainInstallButton.enable();
-                }
-
-                public void onFailure(Throwable caught) {
-                    SC.say("Cannot determine the status of the database schema: " + caught);
-                }
-            });
-    }
-
-    private void addContextualHelp(final FormItem item, final String helpText) {
-        final FormItemIcon helpIcon = new FormItemIcon();
-        helpIcon.setSrc("[SKIN]/actions/help.png");
-        helpIcon.setNeverDisable(true);
-        item.setIcons(helpIcon);
-
-        item.addIconClickHandler(new IconClickHandler() {
-            public void onIconClick(IconClickEvent event) {
-                if (event.getIcon().equals(helpIcon)) {
-                    SC.say(helpText);
-                }
-            }
-        });
-    }
-
-    /**
-     * Call this when the user changed something (like connection URL or password) that renders
-     * the old connection test invalid. This will ensure the user is forced to re-test the connection.
-     */
-    private void forceAnotherTestConnection() {
-        mainInstallButton.disable();
-        testConnectionButton.setIcon(null);
-        dbExistingSchemaOption.hide();
-
-        if (registeredServerNames.size() > 1) {
-            registeredServerNames.clear();
-            registeredServerNames.put(NEW_SERVER_TO_REGISTER, MSG.tab_simpleView_serverSettings_registeredServers_newServer());
-        }
-        registeredServersSelection.setValue((String) null);
-        registeredServersSelection.setValueMap(registeredServerNames);
-    }
-
-    // for convienence, so we can get the conn url, user, pass in one object
-    private class Conn {
-        public String url() {
-            return Installer.this.dbConnectionUrl.getValueAsString();
-        }
-
-        public String username() {
-            return Installer.this.dbUsername.getValueAsString();
-        }
-
-        public String password() {
-            return Installer.this.dbPassword.getValueAsString();
-        }
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
deleted file mode 100644
index 654e3cf..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.rhq.enterprise.gui.installer.client;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.RecordList;
-
-/**
- * This provides a RecordList that is really a map underneath (each record is nothing more
- * than a name/value pair; that is, each record has two attributes: name and value).
- *
- * We use this because this RecordList will be the list backing the Advanced View grid.
- * So changing this list will be automatically reflected in that grid.
- *
- * @author John Mazzitelli
- */
-public class ServerPropertyRecordList extends RecordList {
-
-    public static final String PROPERTY_NAME = "n";
-    public static final String PROPERTY_VALUE = "v";
-
-    // this map is kept in sync with the record list
-    private HashMap<String, String> map = new HashMap<String, String>();
-
-    public HashMap<String, String> getMap() {
-        return map;
-    }
-
-    public String getServerProperty(String name) {
-        String value = map.get(name);
-        return (value == null) ? "" : value;
-    }
-
-    public void putServerProperty(String name, String value) {
-        // fill in the internal map
-        map.put(name, value);
-
-        // now update the record list
-        Record found = find(PROPERTY_NAME, name);
-        if (found == null) {
-            Record record = new Record();
-            record.setAttribute(PROPERTY_NAME, name);
-            record.setAttribute(PROPERTY_VALUE, value);
-            add(record);
-        } else {
-            found.setAttribute(PROPERTY_VALUE, value);
-        }
-    }
-
-    public void replaceServerProperties(Map<String, String> newMap) {
-        // first update the internal map
-        map.clear();
-        map.putAll(newMap);
-
-        // now update the record list
-        setLength(0);
-        for (Map.Entry<String, String> entry : newMap.entrySet()) {
-            putServerProperty(entry.getKey(), entry.getValue());
-        }
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
deleted file mode 100644
index c37d923..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.client.gwt;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
-
-/**
- * @author John Mazzitelli
- */
-public interface InstallerGWTService extends RemoteService {
-
-    /**
-     * Returns a list of all registered servers in the database.
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return list of all existing servers registered in the database.
-     * @throws Exception
-     */
-    ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception;
-
-    /**
-     * Returns details on a specific server that is registered in the database.
-     * 
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @param serverName the name of the server whose details are to be retrieved
-     * @return the details of the server or null if the server does not exist
-     * @throws Exception
-     */
-    ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
-        throws Exception;
-
-    /**
-     * Tests to see if there is already a schema installed.
-     * 
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return <code>true</code> if there appears to be a schema installed in the database already.
-     * @throws Exception
-     */
-    boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception;
-
-    /**
-     * Tests that the database can be connected to with the given URL and credentials.
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return <code>null</code> if the connection succeeded; this will be an error message if failed
-     * @throws Exception
-     */
-    String testConnection(String connectionUrl, String username, String password) throws Exception;
-
-    /**
-     * Returns the rhq-server.properties values in a map.
-     * @return server properties
-     * @throws Exception
-     */
-    HashMap<String, String> getServerProperties() throws Exception;
-
-    /**
-     * Saves the rhq-server.properties with the given values.
-     * @param serverProperties
-     * @throws Exception
-     */
-    void saveServerProperties(HashMap<String, String> serverProperties) throws Exception;
-
-    /**
-     * Returns the version string for the app server itself (e.g. "7.1.2.Final").
-     * @return version string of app server
-     * @throws Exception
-     */
-    String getAppServerVersion() throws Exception;
-
-    /**
-     * Returns the general type of operating system the server is running on (e.g. "Linux").
-     * @return os type name
-     * @throws Exception
-     */
-    String getOperatingSystem() throws Exception;
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
deleted file mode 100644
index b54e380..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.client.shared;
-
-import java.io.Serializable;
-
-public class ServerDetails implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    public static final String DEFAULT_AFFINITY_GROUP = "";
-    public static final int DEFAULT_ENDPOINT_PORT = 7080;
-    public static final int DEFAULT_ENDPOINT_SECURE_PORT = 7443;
-
-    private String name;
-    private String endpointAddress;
-    private int endpointPort;
-    private int endpointSecurePort;
-    private String affinityGroup;
-
-    protected ServerDetails() {
-        // for GWT
-    }
-
-    public ServerDetails(String name, String endpointAddress, int port, int securePort, String affinityGroup) {
-        this.name = name;
-        this.endpointAddress = endpointAddress;
-        this.endpointPort = port;
-        this.endpointSecurePort = securePort;
-        this.affinityGroup = affinityGroup;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        if ((null != name) && (!"".equals(name.trim()))) {
-            this.name = name;
-        }
-    }
-
-    public String getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    public void setEndpointAddress(String endpointAddress) {
-        if ((null != endpointAddress) && (!"".equals(endpointAddress.trim()))) {
-            this.endpointAddress = endpointAddress;
-        }
-    }
-
-    public int getEndpointPort() {
-        return endpointPort;
-    }
-
-    public void setEndpointPort(int endpointPort) {
-        this.endpointPort = endpointPort;
-    }
-
-    public String getEndpointPortString() {
-        return (String.valueOf(endpointPort));
-    }
-
-    public void setEndpointPortString(String endpointPort) {
-        this.endpointPort = Integer.valueOf(endpointPort).intValue();
-    }
-
-    public int getEndpointSecurePort() {
-        return endpointSecurePort;
-    }
-
-    public void setEndpointSecurePort(int endpointSecurePort) {
-        this.endpointSecurePort = endpointSecurePort;
-    }
-
-    public String getEndpointSecurePortString() {
-        return (String.valueOf(endpointSecurePort));
-    }
-
-    public void setEndpointSecurePortString(String endpointSecurePort) {
-        this.endpointSecurePort = Integer.valueOf(endpointSecurePort).intValue();
-    }
-
-    public String getAffinityGroup() {
-        return affinityGroup;
-    }
-
-    public void setAffinityGroup(String affinityGroup) {
-        if ((null != affinityGroup) && (!"".equals(affinityGroup.trim()))) {
-            this.affinityGroup = affinityGroup;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "[name=" + name + " address=" + endpointAddress + " port=" + endpointPort + " secureport="
-            + endpointSecurePort + " affinitygroup=" + affinityGroup + "]";
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
deleted file mode 100644
index d92d4ce..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.client.shared;
-
-/**
- * Settings found in the rhq-server.properties file that controls the startup configuration of the server.
- *
- * @author John Mazzitelli
- */
-public class ServerProperties {
-    public static final String PREFIX_PROP_DATABASE = "rhq.server.database.";
-    public static final String PROP_DATABASE_TYPE = PREFIX_PROP_DATABASE + "type-mapping";
-    public static final String PROP_DATABASE_CONNECTION_URL = PREFIX_PROP_DATABASE + "connection-url";
-    public static final String PROP_DATABASE_USERNAME = PREFIX_PROP_DATABASE + "user-name";
-    public static final String PROP_DATABASE_PASSWORD = PREFIX_PROP_DATABASE + "password";
-    public static final String PROP_DATABASE_SERVER_NAME = PREFIX_PROP_DATABASE + "server-name";
-    public static final String PROP_DATABASE_PORT = PREFIX_PROP_DATABASE + "port";
-    public static final String PROP_DATABASE_DB_NAME = PREFIX_PROP_DATABASE + "db-name";
-    public static final String PROP_DATABASE_HIBERNATE_DIALECT = "hibernate.dialect";
-    public static final String PROP_QUARTZ_DRIVER_DELEGATE_CLASS = "rhq.server.quartz.driverDelegateClass";
-    public static final String PROP_QUARTZ_SELECT_WITH_LOCK_SQL = "rhq.server.quartz.selectWithLockSQL";
-    public static final String PROP_QUARTZ_LOCK_HANDLER_CLASS = "rhq.server.quartz.lockHandlerClass";
-
-    public static final String PREFIX_PROP_WEB = "rhq.server.startup.web.";
-    public static final String PROP_WEB_HTTP_PORT = PREFIX_PROP_WEB + "http.port";
-    public static final String PROP_WEB_HTTPS_PORT = PREFIX_PROP_WEB + "https.port";
-
-    public static final String PREFIX_PROP_EMBEDDED_AGENT = "rhq.server.embedded-agent.";
-    public static final String PROP_EMBEDDED_AGENT_ENABLED = PREFIX_PROP_EMBEDDED_AGENT + "enabled";
-
-    public static final String PREFIX_PROP_EMAIL = "rhq.server.email.";
-    public static final String PROP_EMAIL_SMTP_HOST = PREFIX_PROP_EMAIL + "smtp-host";
-    public static final String PROP_EMAIL_FROM_ADDRESS = PREFIX_PROP_EMAIL + "from-address";
-
-    public static final String PROP_HIGH_AVAILABILITY_NAME = "rhq.server.high-availability.name";
-    public static final String PROP_MM_AT_START = "rhq.server.maintenance-mode-at-startup";
-}
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
deleted file mode 100644
index add78a6..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.server.service;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-
-import org.jboss.as.controller.ModelController;
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.server.Services;
-import org.jboss.msc.service.Service;
-import org.jboss.msc.service.ServiceActivator;
-import org.jboss.msc.service.ServiceActivatorContext;
-import org.jboss.msc.service.ServiceName;
-import org.jboss.msc.service.ServiceRegistryException;
-import org.jboss.msc.service.StartContext;
-import org.jboss.msc.service.StartException;
-import org.jboss.msc.service.StopContext;
-import org.jboss.msc.value.InjectedValue;
-
-/**
- * This will provide our co-located management service.
- * This is useful because it helps us avoid performing any management
- * over a remote connector. Since we know we are running co-located
- * in the same app server container that we want to manage, this 
- * service will provide us with a management client that does not go
- * over a remote connector to talk to our app server container.
- *
- * @author John Mazzitelli
- */
-public class ManagementService implements ServiceActivator {
-
-    private static volatile ModelController controller;
-    private static volatile ExecutorService executor;
-
-    public static ModelControllerClient getClient() {
-        return controller.createClient(executor);
-    }
-
-    @Override
-    public void activate(ServiceActivatorContext context) throws ServiceRegistryException {
-        final GetModelControllerService service = new GetModelControllerService();
-        context
-            .getServiceTarget()
-            .addService(ServiceName.of("rhq", "installer", "management", "client", "getter"), service)
-            .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.modelControllerValue)
-            .install();
-    }
-
-    private class GetModelControllerService implements Service<Void> {
-        private InjectedValue<ModelController> modelControllerValue = new InjectedValue<ModelController>();
-
-        @Override
-        public Void getValue() throws IllegalStateException, IllegalArgumentException {
-            return null;
-        }
-
-        @Override
-        public void start(StartContext context) throws StartException {
-            ManagementService.executor = Executors.newFixedThreadPool(5, new ThreadFactory() {
-                @Override
-                public Thread newThread(Runnable r) {
-                    Thread t = new Thread(r);
-                    t.setDaemon(true);
-                    t.setName("ManagementServiceModelControllerClientThread");
-                    return t;
-                }
-            });
-            ManagementService.controller = modelControllerValue.getValue();
-        }
-
-        @Override
-        public void stop(StopContext context) {
-            try {
-                ManagementService.executor.shutdownNow();
-            } finally {
-                ManagementService.executor = null;
-                ManagementService.controller = null;
-            }
-        }
-
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
deleted file mode 100644
index 6247168..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.server.servlet;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.servlet.annotation.WebServlet;
-
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-
-import org.rhq.common.jbossas.client.controller.Address;
-import org.rhq.common.jbossas.client.controller.JBossASClient;
-import org.rhq.common.jbossas.client.controller.SecurityDomainJBossASClient;
-import org.rhq.core.util.PropertiesFileUpdate;
-import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
-import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
-import org.rhq.enterprise.gui.installer.server.service.ManagementService;
-
-/**
- * @author John Mazzitelli
- */
- at WebServlet(value = "/org.rhq.enterprise.gui.installer.Installer/InstallerGWTService")
-public class InstallerGWTServiceImpl extends RemoteServiceServlet implements InstallerGWTService {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
-
-    @Override
-    public ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception {
-        try {
-            return ServerInstallUtil.getServerNames(connectionUrl, username, password);
-        } catch (Exception e) {
-            log("Could not get the list of registered server names", e);
-            return null;
-        }
-    }
-
-    @Override
-    public ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
-        throws Exception {
-        try {
-            return ServerInstallUtil.getServerDetails(connectionUrl, username, password, serverName);
-        } catch (Exception e) {
-            log("Could not get server details for [" + serverName + "]", e);
-            return null;
-        }
-    }
-
-    @Override
-    public boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception {
-        try {
-            return ServerInstallUtil.isDatabaseSchemaExist(connectionUrl, username, password);
-        } catch (Exception e) {
-            log("Could not determine database existence", e);
-            return false;
-        }
-    }
-
-    @Override
-    public String testConnection(String connectionUrl, String username, String password) throws Exception {
-        String results = ServerInstallUtil.testConnection(connectionUrl, username, password);
-        return results;
-    }
-
-    @Override
-    public HashMap<String, String> getServerProperties() throws Exception {
-        File serverPropertiesFile = getServerPropertiesFile();
-        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
-        Properties props = propsFile.loadExistingProperties();
-
-        // GWT can't handle Properties - convert to HashMap
-        HashMap<String, String> map = new HashMap<String, String>(props.size());
-        for (Object property : props.keySet()) {
-            map.put(property.toString(), props.getProperty(property.toString()));
-        }
-        return map;
-    }
-
-    @Override
-    public void saveServerProperties(HashMap<String, String> serverProperties) throws Exception {
-        File serverPropertiesFile = getServerPropertiesFile();
-        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
-
-        // GWT can't handle Properties - convert from HashMap
-        Properties props = new Properties();
-        for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
-            props.setProperty(entry.getKey(), entry.getValue());
-        }
-
-        propsFile.update(props);
-
-        return;
-    }
-
-    @Override
-    public String getAppServerVersion() throws Exception {
-        JBossASClient client = new JBossASClient(getClient());
-        String version = client.getStringAttribute("release-version", Address.root());
-        return version;
-    }
-
-    @Override
-    public String getOperatingSystem() throws Exception {
-        JBossASClient client = new JBossASClient(getClient());
-        String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
-        String osName = client.getStringAttribute("name", Address.root().add(address));
-        return osName;
-    }
-
-    private String getAppServerHomeDir() throws Exception {
-        JBossASClient client = new JBossASClient(getClient());
-        String[] address = { "core-service", "server-environment" };
-        String dir = client.getStringAttribute(true, "home-dir", Address.root().add(address));
-        return dir;
-    }
-
-    private File getServerPropertiesFile() throws Exception {
-        File appServerHomeDir = new File(getAppServerHomeDir());
-        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
-        return serverPropertiesFile;
-    }
-
-    private ModelControllerClient getClient() {
-        ModelControllerClient client = ManagementService.getClient();
-        return client;
-    }
-
-    private void createDatasourceSecurityDomain(String username, String password) throws Exception {
-        final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
-        final String securityDomain = RHQ_SECURITY_DOMAIN;
-        if (!client.isSecurityDomain(securityDomain)) {
-            client.createNewSecureIdentitySecurityDomainRequest(securityDomain, username, password);
-            log("Security domain [" + securityDomain + "] created");
-        } else {
-            log("Security domain [" + securityDomain + "] already exists, skipping the creation request");
-        }
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
deleted file mode 100644
index 4577789..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.server.servlet;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.db.DatabaseType;
-import org.rhq.core.db.DatabaseTypeFactory;
-import org.rhq.core.db.DbUtil;
-import org.rhq.core.util.exception.ThrowableUtil;
-import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
-
-/**
- * Provides utility methods necessary to complete the server installation.
- *
- * @author John Mazzitelli
- */
-public class ServerInstallUtil {
-    private static final Log LOG = LogFactory.getLog(ServerInstallUtil.class);
-
-    public enum ExistingSchemaOption {
-        OVERWRITE, KEEP, SKIP
-    };
-
-    public static boolean isKeepExistingSchema(ExistingSchemaOption existingSchemaOption) {
-        return ExistingSchemaOption.KEEP.name().equals(existingSchemaOption)
-            || ExistingSchemaOption.SKIP.name().equals(existingSchemaOption);
-    }
-
-    /**
-     * Returns <code>true</code> if the database already has the database schema created for it. It will not be known
-     * what version of schema or if its the latest, all this method tells you is that some RHQ database schema exists.
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return <code>true</code> if the database can be connected to
-     *
-     * @throws Exception if failed to communicate with the database
-     */
-    public static boolean isDatabaseSchemaExist(String connectionUrl, String username, String password)
-        throws Exception {
-
-        Connection conn = getDatabaseConnection(connectionUrl, username, password);
-        DatabaseType db = DatabaseTypeFactory.getDatabaseType(conn);
-
-        try {
-            return db.checkTableExists(conn, "RHQ_PRINCIPAL");
-        } catch (IllegalStateException e) {
-            return false;
-        } finally {
-            db.closeConnection(conn);
-        }
-    }
-
-    /**
-     * Get the list of existing servers from an existing schema.
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return List of server names registered in the database. Empty list if the table does not exist or there are no entries in the table.
-     *
-     * @throws Exception if failed to communicate with the database
-     */
-    public static ArrayList<String> getServerNames(String connectionUrl, String username, String password)
-        throws Exception {
-        DatabaseType db = null;
-        Connection conn = null;
-        Statement stm = null;
-        ResultSet rs = null;
-        ArrayList<String> result = new ArrayList<String>();
-
-        try {
-            conn = getDatabaseConnection(connectionUrl, username, password);
-            db = DatabaseTypeFactory.getDatabaseType(conn);
-
-            if (db.checkTableExists(conn, "rhq_server")) {
-
-                stm = conn.createStatement();
-                rs = stm.executeQuery("SELECT name FROM rhq_server ORDER BY name asc");
-
-                while (rs.next()) {
-                    result.add(rs.getString(1));
-                }
-            }
-        } catch (IllegalStateException e) {
-            // table does not exist
-        } catch (SQLException e) {
-            LOG.info("Unable to fetch existing server info: " + e.getMessage());
-        } finally {
-            if (null != db) {
-                db.closeJDBCObjects(conn, stm, rs);
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Returns information on the server as found in the database (port numbers, affinity group, etc).
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @param serverName the server whose details are to be returned
-     * @return the information on the named server
-     */
-    public static ServerDetails getServerDetails(String connectionUrl, String username, String password,
-        String serverName) {
-
-        DatabaseType db = null;
-        Connection conn = null;
-        ServerDetails result = null;
-
-        try {
-            conn = getDatabaseConnection(connectionUrl, username, password);
-            db = DatabaseTypeFactory.getDatabaseType(conn);
-
-            result = getServerDetails(db, conn, serverName);
-
-        } catch (Exception e) {
-            LOG.info("Unable to get server detail: " + e.getMessage());
-        } finally {
-            if (null != db) {
-                db.closeConnection(conn);
-            }
-        }
-
-        return result;
-    }
-
-    private static ServerDetails getServerDetails(DatabaseType db, Connection conn, String serverName) {
-        PreparedStatement stm = null;
-        ResultSet rs = null;
-        ServerDetails result = null;
-
-        if (null == serverName) {
-            return result;
-        }
-
-        try {
-            stm = conn.prepareStatement("" //
-                + "SELECT s.address, s.port, s.secure_port, ag.name " //
-                + "  FROM rhq_server s LEFT JOIN rhq_affinity_group ag ON ag.id = s.affinity_group_id " //
-                + " WHERE s.name = ?");
-            stm.setString(1, serverName.trim());
-
-            rs = stm.executeQuery();
-
-            if (rs.next()) {
-                result = new ServerDetails(serverName, rs.getString(1), rs.getInt(2), rs.getInt(3), rs.getString(4));
-            }
-
-        } catch (SQLException e) {
-            LOG.info("Unable to get affinity group name for server: " + e.getMessage());
-        } finally {
-            if (null != db) {
-                db.closeResultSet(rs);
-                db.closeStatement(stm);
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Tests to make sure the server can be connected to with the given settings.
-     * If the test is successful, <code>null</code>. If the test fails, the returned string
-     * will be the error message to indicate the problem.
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     * @return error message if test failed; <code>null</code> if test succeeded
-     */
-    public static String testConnection(String connectionUrl, String username, String password) {
-
-        // its possible the JDBC URL was changed, clear the factory cache in case the DB version is different now
-        DatabaseTypeFactory.clearDatabaseTypeCache();
-
-        try {
-            ensureDatabaseIsSupported(connectionUrl, username, password);
-            return null;
-        } catch (Exception e) {
-            LOG.warn("Installer failed to test connection", e);
-            return ThrowableUtil.getAllMessages(e);
-        }
-    }
-
-    /**
-     * Call this when you need to confirm that the database is supported.
-     *
-     * @param connectionUrl
-     * @param username
-     * @param password
-     *
-     * @throws Exception if the database is not supported
-     */
-    public static void ensureDatabaseIsSupported(String connectionUrl, String username, String password)
-        throws Exception {
-        Connection conn = null;
-        DatabaseType db = null;
-
-        try {
-            conn = getDatabaseConnection(connectionUrl, username, password);
-            db = DatabaseTypeFactory.getDatabaseType(conn);
-
-            String version = db.getVersion();
-
-            if (DatabaseTypeFactory.isPostgres(db)) {
-                if (version.startsWith("7") || version.equals("8") || version.startsWith("8.0")
-                    || version.startsWith("8.1")) {
-                    throw new Exception("Unsupported PostgreSQL [" + db + "]");
-                }
-            } else if (DatabaseTypeFactory.isOracle(db)) {
-                if (version.startsWith("8") || version.startsWith("9")) {
-                    throw new Exception("Unsupported Oracle [" + db + "]");
-                }
-            } else {
-                throw new Exception("Unsupported DB [" + db + "]");
-            }
-
-            LOG.info("Database is supported: " + db);
-        } finally {
-            if (db != null) {
-                db.closeConnection(conn);
-            }
-        }
-
-        return;
-    }
-
-    /**
-     * Returns a database connection with the given set of properties providing the settings that allow for a successful
-     * database connection. If <code>props</code> is <code>null</code>, it will use the server properties from
-     * {@link #getServerProperties()}.
-     *
-     * @param connectionUrl 
-     * @param userName 
-     * @param password 
-     * @return the database connection
-     *
-     * @throws SQLException if cannot successfully connect to the database
-     */
-    public static Connection getDatabaseConnection(String connectionUrl, String userName, String password)
-        throws SQLException {
-        return DbUtil.getConnection(connectionUrl, userName, password);
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
deleted file mode 100644
index 164e94a..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN"
-    "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
-
-<module>
-
-    <inherits name='com.google.gwt.user.User'/>
-    <inherits name='com.google.gwt.i18n.I18N'/>
-    <inherits name="com.google.gwt.logging.Logging"/>
-
-    <inherits name='com.smartgwt.SmartGwt' />
-    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
-
-    <!-- ============================ gwt logging ============================= -->
-    <set-property name="gwt.logging.enabled" value="TRUE"/>
-    <!-- FINE ~= DEBUG in gwt-log -->
-    <set-property name="gwt.logging.logLevel" value="FINE"/>
-    <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
-    <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
-    <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
-    <set-property name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
-    <set-property name="gwt.logging.popupHandler" value="DISABLED" />
-    <set-property name="gwt.logging.systemHandler" value="ENABLED" />
-    <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
-
-    <set-property name="user.agent" value="${gwt.userAgent}"/>
-    <extend-property name="locale" values="${gwt.locale}" />
-
-    <set-configuration-property name="locale.usemeta" value="Y"/>
-    <set-configuration-property name="locale.useragent" value="Y"/>
-    <set-configuration-property name="locale.searchorder" value="queryparam,meta,useragent,cookie"/>
-    <set-property-fallback name="locale" value="${gwt.fallback.locale}"/>
-
-    <entry-point class='org.rhq.enterprise.gui.installer.client.Installer'/>
-
-</module>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
deleted file mode 100644
index 5915f40..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-button_reset = Reset
-button_save = Save
-button_startInstallation = Press To Start The Installation Now
-button_testConnection = Test Connection
-help_registeredServers = If you are performing an upgrade or a re-installation then you should select a server from this list of registered servers. If you want to install a new server into the system, select the *New Server* option. (Note that if you are going to overwrite your existing schema, you cannot select an existing registered server since they will be deleted when the overwrite is performed.)
-property_name_label = Property
-property_value_label = Value
-schema_update_keep = Keep (Maintain Existing Data)
-schema_update_overwrite = Overwrite (Lose Existing Data!)
-schema_update_question = A database schema already exists. What do you want to do?
-schema_update_skip = Skip (Leave Database As-Is)
-tab_advancedView = Advanced View
-tab_simpleView = Simple View
-tab_simpleView_database = Database Settings
-tab_simpleView_serverSettings = Server Settings
-tab_simpleView_serverSettings_publicAddress = Server Public Address
-tab_simpleView_serverSettings_registeredServers = Registered Server Names
-tab_simpleView_serverSettings_registeredServers_newServer = *New Server*
-tab_welcome = Welcome
-tab_welcome_content = <h1>Welcome to the new GWT Installer</h1>\nThis is the <b>new</b> installer.\nAny HTML can go in here.
-welcome_title = Installing the Server
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
deleted file mode 100644
index 6c53445..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-### RHQ Server Configuration Properties
-### These should match the actual property names in rhq-server.properties.
-
-# Database
-rhq.server.database.connection-url=Database Connection URL
-rhq.server.database.user-name=Database Username
-rhq.server.database.password=Database Password
-rhq.server.database.type-mapping=Database Type
-
-# High Availability (HA)
-rhq.server.high-availability.name=Server Name
-rhq.server.maintenance-mode-at-startup=Maintenance Mode At Startup
-
-# General Properties
-rhq.server.startup.web.http.port=HTTP Port
-rhq.server.startup.web.https.port=Secure HTTP Port
-
-# Embedded RHQ Agent
-rhq.server.embedded-agent.enabled=Embedded Agent Enabled
-
-# Email
-rhq.server.email.smtp-host=Email SMTP Host
-rhq.server.email.from-address=Email From Address
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
deleted file mode 100644
index c64cc21..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
+++ /dev/null
@@ -1 +0,0 @@
-org.rhq.enterprise.gui.installer.server.service.ManagementService
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index b970eb3..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
-
-    <welcome-file-list>
-        <welcome-file>index.html</welcome-file>
-    </welcome-file-list>
-
-</web-app>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
deleted file mode 100644
index cb9016e..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html>
-<head>
-    <!-- this forces us to emulate IE8 "quirks" mode regardless of IE browser version.  It:
-         1) Follows the SmartGWT recommendation of not declaring a DOCTYPE and instead using these meta elements.
-            http://forums.smartclient.com/showthread.php?t=15973
-         2) solves initial app load issues that we experienced on some XP and Vista/Windows7  flavors.
-    -->
-    <meta http-equiv="X-UA-Compatible" content="IE=8" />
-
-    <!-- support internationalized characters -->
-    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
-
-    <script>
-        var search = location.search;
-        // only do this if you have not specified locale as query param
-        if(search.indexOf("locale") == -1){
-            // IE uses browserLanguage
-            var lang = navigator.language!=null ? navigator.language : navigator.browserLanguage;
-            var lang = lang.replace("-", "_");
-            document.write("<meta name='gwt:property' content='locale="+lang +"'>");
-        }
-    </script>
-
-    <title>RHQ Installer</title>
-
-    <script type="text/javascript">
-        var isomorphicDir = "org.rhq.enterprise.gui.installer.Installer/sc/";
-    </script>
-
-</head>
-<body>
-
-    <script type="text/javascript" language="javascript"
-            src="org.rhq.enterprise.gui.installer.Installer/org.rhq.enterprise.gui.installer.Installer.nocache.js"></script>
-
-    <div id="Loading-Panel" style="width: 214px; height: 90px; margin-top: 300px; margin-left: 40%; margin-right: 40%;">
-        <div style="text-align: center; border: 3px solid lightgray;">
-            Loading Installer...
-        </div>
-    </div>
-
-    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
-
-</body>
-</html>
diff --git a/modules/enterprise/gui/installer/pom.xml b/modules/enterprise/gui/installer/pom.xml
new file mode 100644
index 0000000..2c0193c
--- /dev/null
+++ b/modules/enterprise/gui/installer/pom.xml
@@ -0,0 +1,407 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.rhq</groupId>
+        <artifactId>rhq-parent</artifactId>
+        <version>4.5.0-SNAPSHOT</version>
+        <relativePath>../../../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.rhq</groupId>
+    <artifactId>rhq-installer</artifactId>
+    <packaging>war</packaging>
+
+    <name>RHQ Enterprise GWT Installer GUI</name>
+    <description>The RHQ Enterprise GWT Installer GUI webapp</description>
+
+    <properties>
+        <!-- dependency versions -->
+        <gwt.version>2.4.0</gwt.version>
+        <smartgwt.version>3.0</smartgwt.version>
+        <jboss.as.version>7.1.1.Final</jboss.as.version> <!-- our AS7 container -->
+        <jboss.msc.version>1.0.2.GA</jboss.msc.version> <!-- this ships with our AS7 container -->
+        <jboss.dmr.version>1.1.1.Final</jboss.dmr.version> <!-- this ships with our AS7 container -->
+
+        <installerGuiParams />
+        <installerGuiRunTarget>'http://localhost:7080/rhq-installer/index.html${installerGuiParams}'</installerGuiRunTarget>
+
+        <!-- If this is too much memory to allocate to your gwt:debug process then
+            override this property in in your settings.xml -->
+        <gwt-plugin.extraJvmArgs>-Xms512M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M</gwt-plugin.extraJvmArgs>
+        <gwt-plugin.localWorkers>4</gwt-plugin.localWorkers>
+
+        <gwt.userAgent>ie8,ie9,gecko1_8,safari,opera</gwt.userAgent>
+        <gwt.draftCompile>false</gwt.draftCompile>
+        <gwt.soyc>false</gwt.soyc>
+        <gwt.style>PRETTY</gwt.style>
+        <!-- <gwt.locale>en,de,ja,pt,zh,ru,cs</gwt.locale> -->
+        <gwt.locale>en</gwt.locale>
+        <gwt.fallback.locale>en</gwt.fallback.locale>
+
+        <enable-tags>true</enable-tags>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- JBoss distributes a complete set of Java EE 6 APIs. We use this here 
+                so that we always get the correct versions of artifacts.
+				TODO: We should probably move this up to the root pom. -->
+            <dependency>
+                <groupId>org.jboss.spec</groupId>
+                <artifactId>jboss-javaee-6.0</artifactId>
+                <version>3.0.0.Final</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.rhq</groupId>
+            <artifactId>rhq-core-dbutils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-servlet</artifactId>
+            <version>${gwt.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-user</artifactId>
+            <version>${gwt.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- This is so we can compile custom GWT Generators to be called during
+            gwt compilation. Is is not needed at runtime and so is not included in the
+            WAR. -->
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-dev</artifactId>
+            <version>${gwt.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.smartgwt</groupId>
+            <artifactId>smartgwt</artifactId>
+            <version>${smartgwt.version}</version>
+        </dependency>
+
+        <!-- Import the Servlet API -->
+        <dependency>
+            <groupId>org.jboss.spec.javax.servlet</groupId>
+            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <!-- we need these so we can have our own service to provide a co-located management client -->
+        <dependency>
+            <groupId>org.jboss.msc</groupId>
+            <artifactId>jboss-msc</artifactId>
+            <version>${jboss.msc.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-dmr</artifactId>
+            <version>${jboss.dmr.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-naming</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-server</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller-client</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>rhq-installer</finalName>
+
+        <resources>
+            <resource>
+                <targetPath>${project.build.directory}/generated-sources/gwt</targetPath>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*.gwt.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.java</include>
+                </includes>
+            </resource>
+        </resources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>gwt-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <noServer>true</noServer>
+                    <inplace>false</inplace>
+                    <logLevel>INFO</logLevel>
+                    <runTarget>${installerGuiRunTarget}</runTarget>
+                    <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs>
+                    <localWorkers>${gwt-plugin.localWorkers}</localWorkers>
+                    <draftCompile>${gwt.draftCompile}</draftCompile>
+                    <soyc>${gwt.soyc}</soyc>
+                    <buildOutputDirectory>target/gwtclasses</buildOutputDirectory>
+                    <hostedWebapp>target/hostedWar</hostedWebapp>
+                    <debugSuspend>false</debugSuspend>
+                    <servicePattern>**/gwt/*GWTService.java</servicePattern>
+                    <i18nMessagesBundle>org.rhq.enterprise.gui.installer.client.Messages</i18nMessagesBundle>
+                    <i18nConstantsWithLookupBundle>org.rhq.enterprise.gui.installer.client.ServerPropertiesMessages</i18nConstantsWithLookupBundle>
+                    <style>${gwt.style}</style>
+                    <strict>true</strict>
+                    <!-- compiles gwt artifacts like symbolMap outside of war so it doesnt
+                        get packaged -->
+                    <deploy>${project.build.directory}/gwt-deploy</deploy>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <id>gwt-goals</id>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>generateAsync</goal>
+                            <goal>i18n</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <!-- This id is what does the trick, don't change it. For this to work
+                            maven 2.2.0 and later is needed. -->
+                        <id>default-cli</id>
+                        <goals>
+                            <goal>debug</goal>
+                        </goals>
+                        <configuration>
+                            <module>org.rhq.enterprise.gui.installer.Installer</module>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Build-Number>${buildNumber}</Build-Number>
+                            <Dependencies>org.jboss.msc,org.jboss.as.controller-client,org.jboss.as.controller,org.jboss.as.server</Dependencies>
+                        </manifestEntries>
+                    </archive>
+                    <webResources>
+                        <resource>
+                            <filtering>false</filtering>
+                            <directory>${basedir}/src/main/webapp</directory>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>add-gwt-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/gwt</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+    </build>
+
+    <profiles>
+        <profile>
+            <id>dev</id>
+
+            <properties>
+                <rhq.rootDir>../../../..</rhq.rootDir>
+                <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+                <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+            </properties>
+
+            <build>
+                <plugins>
+
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+
+                            <execution>
+                                <id>deploy-classes</id>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to ${deployment.dir}${file.separator}...</echo>
+                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
+                                            <fileset dir="${basedir}/src/main/webapp" />
+                                        </copy>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>deploy</id>
+                                <phase>package</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Copying updated files from target${file.separator}${project.build.finalName}${file.separator} to ${deployment.dir}${file.separator}...</echo>
+                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
+                                            <fileset dir="${basedir}/target/${project.build.finalName}" />
+                                        </copy>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>undeploy</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
+                                        <delete dir="${deployment.dir}" />
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+
+        <!-- Change the installerGuiRunTarget to not have single quotes. The quotes
+            work for linux but not win -->
+        <profile>
+            <id>windows</id>
+            <activation>
+                <os>
+                    <family>Windows</family>
+                </os>
+            </activation>
+            <properties>
+                <installerGuiRunTarget>http://localhost:7080//rhq-installer/index.html${installerGuiParams}</installerGuiRunTarget>
+            </properties>
+        </profile>
+
+        <profile>
+            <id>msg</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <includes>
+                                <include>org/rhq/enterprise/gui/installer/client/*Messages.java</include>
+                            </includes>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>disable-tags</id>
+            <activation>
+                <property>
+                    <name>brew</name>
+                </property>
+            </activation>
+            <properties>
+                <enable.tags>false</enable.tags>
+            </properties>
+        </profile>
+
+    </profiles>
+
+
+    <repositories>
+        <repository>
+            <id>smartgwt</id>
+            <name>SmartGWT Releases</name>
+            <url>http://www.smartclient.com/maven2/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+
+        <repository>
+            <id>codehaus</id>
+            <name>Codehaus Releases</name>
+            <url>http://repository.codehaus.org/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+
+    </repositories>
+
+</project>
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/Address.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
new file mode 100644
index 0000000..1a54d36
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
@@ -0,0 +1,82 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.Arrays;
+
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Identifies a managed resource.
+ *
+ * @author John Mazzitelli
+ */
+public class Address implements Cloneable {
+    private ModelNode addressNode;
+
+    public static Address root() {
+        return new Address();
+    }
+
+    public Address() {
+        addressNode = new ModelNode();
+    }
+
+    public Address(String... addressParts) {
+        this();
+        add(addressParts);
+    }
+
+    public ModelNode getAddressNode() {
+        return addressNode;
+    }
+
+    public Address add(String... addressParts) {
+        if (addressParts != null) {
+            if ((addressParts.length % 2) != 0) {
+                throw new IllegalArgumentException("address is incomplete: " + Arrays.toString(addressParts));
+            }
+
+            if (addressParts.length > 0) {
+                for (int i = 0; i < addressParts.length; i += 2) {
+                    addressNode.add(addressParts[i], addressParts[i + 1]);
+                }
+            }
+        }
+
+        return this;
+    }
+
+    public Address add(String type, String name) {
+        addressNode.add(type, name);
+        return this;
+    }
+
+    @Override
+    public Address clone() throws CloneNotSupportedException {
+        Address clone = new Address();
+        clone.addressNode = addressNode.clone();
+        return clone;
+    }
+
+    @Override
+    public String toString() {
+        return addressNode.asString();
+    }
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
new file mode 100644
index 0000000..fb3135c
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
@@ -0,0 +1,34 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+
+/**
+ * Provides convienence methods associated with datasource management.
+ * 
+ * @author John Mazzitelli
+ */
+public class DatasourceJBossASClient extends JBossASClient {
+
+    public DatasourceJBossASClient(ModelControllerClient client) {
+        super(client);
+    }
+
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
new file mode 100644
index 0000000..6dde289
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
@@ -0,0 +1,77 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Indicates a failed client request.
+ *
+ * @author John Mazzitelli
+ */
+public class FailureException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    private static final String GENERIC_ERROR = "Failed request";
+
+    public FailureException(ModelNode failureNode) {
+        super(buildErrorMessage(GENERIC_ERROR, failureNode));
+    }
+
+    public FailureException(ModelNode failureNode, String errMsg) {
+        super(buildErrorMessage(errMsg, failureNode));
+    }
+
+    public FailureException(ModelNode failureNode, Throwable cause) {
+        super(buildErrorMessage(GENERIC_ERROR, failureNode), cause);
+    }
+
+    public FailureException(ModelNode failureNode, String errMsg, Throwable cause) {
+        super(buildErrorMessage(errMsg, failureNode), cause);
+    }
+
+    public FailureException(String errMsg, Throwable cause) {
+        super((errMsg != null) ? errMsg : GENERIC_ERROR, cause);
+    }
+
+    public FailureException(String errMsg) {
+        super((errMsg != null) ? errMsg : GENERIC_ERROR);
+    }
+
+    public FailureException(Throwable cause) {
+        super(GENERIC_ERROR, cause);
+    }
+
+    public FailureException() {
+        super(GENERIC_ERROR);
+    }
+
+    private static final String buildErrorMessage(String errMsg, ModelNode failureNode) {
+        if (errMsg == null) {
+            errMsg = GENERIC_ERROR;
+        }
+
+        String description = JBossASClient.getFailureDescription(failureNode);
+        if (description != null) {
+            errMsg += ": " + description;
+        }
+
+        return errMsg;
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
new file mode 100644
index 0000000..c8d040c
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
@@ -0,0 +1,304 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.OperationMessageHandler;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * A client that can be used to talk to a JBossAS server via the DMR/ModelControllerClient API.
+ *
+ * @author John Mazzitelli
+ */
+public class JBossASClient {
+
+    // protected to allow subclasses to have a logger, too, without explicitly declaring one themselves
+    protected final Log log = LogFactory.getLog(this.getClass());
+
+    public static final String BATCH = "composite";
+    public static final String BATCH_STEPS = "steps";
+    public static final String OPERATION = "operation";
+    public static final String ADDRESS = "address";
+    public static final String RESULT = "result";
+    public static final String OUTCOME = "outcome";
+    public static final String OUTCOME_SUCCESS = "success";
+    public static final String SUBSYSTEM = "subsystem";
+    public static final String FAILURE_DESCRIPTION = "failure-description";
+    public static final String NAME = "name";
+    public static final String VALUE = "value";
+    public static final String READ_ATTRIBUTE = "read-attribute";
+    public static final String READ_RESOURCE = "read-resource";
+    public static final String WRITE_ATTRIBUTE = "write-attribute";
+    public static final String ADD = "add";
+
+    private ModelControllerClient client;
+
+    public JBossASClient(ModelControllerClient client) {
+        this.client = client;
+    }
+
+    /////////////////////////////////////////////////////////////////
+    // Some static methods useful for convienence
+
+    /**
+     * Convienence method that allows you to create request that reads a single attribute
+     * value to a resource.
+     * 
+     * @param attributeName the name of the attribute whose value is to be read
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
+        return createReadAttributeRequest(false, attributeName, address);
+    }
+
+    /**
+     * Convienence method that allows you to create request that reads a single attribute
+     * value to a resource.
+     *
+     * @param runtime if <code>true</code>, the attribute is a runtime attribute
+     * @param attributeName the name of the attribute whose value is to be read
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createReadAttributeRequest(boolean runtime, String attributeName, Address address) {
+        ModelNode op = createRequest(READ_ATTRIBUTE, address);
+        op.get("include-runtime").set(runtime);
+        op.get(NAME).set(attributeName);
+        return op;
+    }
+
+    /**
+     * Convienence method that allows you to create request that writes a single attribute's
+     * string value to a resource.
+     * 
+     * @param attributeName the name of the attribute whose value is to be written
+     * @param attributeValue the attribute value that is to be written
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createWriteAttributeRequest(String attributeName, String attributeValue, Address address) {
+        ModelNode op = createRequest(WRITE_ATTRIBUTE, address);
+        op.get(NAME).set(attributeName);
+        op.get(VALUE).set(attributeValue);
+        return op;
+    }
+
+    /**
+     * Convienence method that builds a partial operation request node.
+     * 
+     * @param operation the operation to be requested
+     * @param address identifies the target resource
+     * @return the partial operation request node - caller should fill this in further to complete the node
+     */
+    public static ModelNode createRequest(String operation, Address address) {
+        final ModelNode request = new ModelNode();
+        request.get(OPERATION).set(operation);
+        request.get(ADDRESS).set(address.getAddressNode());
+        return request;
+    }
+
+    /**
+     * Creates a batch of operations that can be atomically invoked.
+     * 
+     * @param steps the different operation steps of the batch
+     * 
+     * @return the batch operation node
+     */
+    public static ModelNode createBatchRequest(ModelNode... steps) {
+        final ModelNode composite = new ModelNode();
+        composite.get(OPERATION).set(BATCH);
+        composite.get(ADDRESS).setEmptyList();
+        final ModelNode stepsNode = composite.get(BATCH_STEPS);
+        for (ModelNode step : steps) {
+            stepsNode.add(step);
+        }
+        return composite;
+    }
+
+    /**
+     * If the given node has a result list, that list will be returned
+     * with the values as Strings. Otherwise, an empty list is returned.
+     * 
+     * @param operationResult the node to examine
+     * @return the result list as Strings if there is a list, empty otherwise
+     */
+    public static List<String> getResultListAsStrings(ModelNode operationResult) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return Collections.emptyList();
+        }
+
+        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
+        if (nodeList.isEmpty()) {
+            return Collections.emptyList();
+        }
+
+        List<String> list = new ArrayList<String>(nodeList.size());
+        for (ModelNode node : nodeList) {
+            list.add(node.asString());
+        }
+
+        return list;
+    }
+
+    /**
+     * If the given node has results, those results are returned in a ModelNode.
+     * Otherwise, an empty node is returned.
+     * 
+     * @param operationResult the node to examine
+     * @return the results as a ModelNode
+     */
+    public static ModelNode getResults(ModelNode operationResult) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return new ModelNode();
+        }
+
+        return operationResult.get(RESULT);
+    }
+
+    /**
+     * Examines the given node's result list and if the item is found, returns true.
+     * 
+     * @param operationResult the node to examine
+     * @param item the item to look for in the node's result list
+     * @return true if the node has a result list and it contains the item; false otherwise
+     */
+    public static boolean listContains(ModelNode operationResult, String item) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return false;
+        }
+
+        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
+        if (nodeList.isEmpty()) {
+            return false;
+        }
+
+        for (ModelNode node : nodeList) {
+            if (node.asString().equals(item)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Returns <code>true</code> if the operation was a success; <code>false</code> otherwise.
+     * 
+     * @param operationResult the operation result to test
+     * @return the success or failure flag of the result
+     */
+    public static boolean isSuccess(ModelNode operationResult) {
+        if (operationResult != null) {
+            return operationResult.hasDefined(OUTCOME)
+                && operationResult.get(OUTCOME).asString().equals(OUTCOME_SUCCESS);
+        }
+        return false;
+    }
+
+    /**
+     * If the operation result was a failure, this returns the failure description if there is one.
+     * A generic failure message will be returned if the operation was a failure but has no failure
+     * description. A <code>null</code> is returned if the operation was a success.
+     * 
+     * @param operationResult the operation whose failure description is to be returned
+     * @return the failure description of <code>null</code> if the operation was a success
+     */
+    public static String getFailureDescription(ModelNode operationResult) {
+        if (isSuccess(operationResult)) {
+            return null;
+        }
+        if (operationResult != null) {
+            ModelNode descr = operationResult.get(FAILURE_DESCRIPTION);
+            if (descr != null) {
+                return descr.asString();
+            }
+        }
+        return "Unknown failure";
+    }
+
+    /////////////////////////////////////////////////////////////////
+    // Non-static methods that need the client
+
+    public ModelControllerClient getModelControllerClient() {
+        return client;
+    }
+
+    /**
+     * Convienence method that executes the request.
+     * 
+     * @param request
+     * @return results
+     * @throws Exception
+     */
+    public ModelNode execute(ModelNode request) throws Exception {
+        try {
+            return getModelControllerClient().execute(request, OperationMessageHandler.logging);
+        } catch (Exception e) {
+            log.error("Failed to execute request", e);
+            throw e;
+        }
+    }
+
+    /**
+     * Convienence method that allows you to obtain a single attribute's string value from
+     * a resource.
+     * 
+     * @param attributeName the attribute whose value is to be returned
+     * @param address identifies the resource
+     * @return the attribute value
+     * 
+     * @throws Exception if failed to obtain the attribute value
+     */
+    public String getStringAttribute(String attributeName, Address address) throws Exception {
+        return getStringAttribute(false, attributeName, address);
+    }
+
+    /**
+     * Convienence method that allows you to obtain a single attribute's string value from
+     * a resource.
+     *
+     * @param runtime if <code>true</code>, the attribute to be retrieved is a runtime attribute
+     * @param attributeName the attribute whose value is to be returned
+     * @param address identifies the resource
+     * @return the attribute value
+     * 
+     * @throws Exception if failed to obtain the attribute value
+     */
+    public String getStringAttribute(boolean runtime, String attributeName, Address address) throws Exception {
+        ModelNode op = createReadAttributeRequest(runtime, attributeName, address);
+        ModelNode results = execute(op);
+        if (isSuccess(results)) {
+            ModelNode version = getResults(results);
+            String attributeValue = version.asString();
+            return attributeValue;
+        } else {
+            throw new FailureException(results, "Failed to get attribute [" + attributeName + "] from [" + address
+                + "]");
+        }
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
new file mode 100644
index 0000000..a73ba79
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
@@ -0,0 +1,110 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.List;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Provides convienence methods associated with security domain management.
+ * 
+ * @author John Mazzitelli
+ */
+public class SecurityDomainJBossASClient extends JBossASClient {
+
+    public static final String SUBSYSTEM_SECURITY = "security";
+    public static final String SECURITY_DOMAIN = "security-domain";
+    public static final String CACHE_TYPE = "cache-type";
+    public static final String AUTHENTICATION = "authentication";
+    public static final String LOGIN_MODULES = "login-modules";
+    public static final String CLASSIC = "classic";
+    public static final String CODE = "code";
+    public static final String FLAG = "flag";
+    public static final String MODULE_OPTIONS = "module-options";
+    public static final String USERNAME = "username";
+    public static final String PASSWORD = "password";
+
+    public SecurityDomainJBossASClient(ModelControllerClient client) {
+        super(client);
+    }
+
+    /**
+     * Checks to see if there is already a security domain with the given name.
+     *
+     * @param securityDomainName the name to check
+     * @return true if there is a security domain with the given name already in existence
+     */
+    public boolean isSecurityDomain(String securityDomainName) throws Exception {
+        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY);
+        ModelNode queryNode = createRequest(READ_RESOURCE, addr);
+        ModelNode results = execute(queryNode);
+        if (isSuccess(results)) {
+            ModelNode domains = getResults(results).get(SECURITY_DOMAIN);
+            List<ModelNode> list = domains.asList();
+            for (ModelNode domain : list) {
+                if (domain.has(securityDomainName)) {
+                    return true;
+                }
+            }
+            return false;
+        } else {
+            throw new FailureException(results, "Failed to get security domains");
+        }
+    }
+
+    /**
+     * Convienence method that builds a request which can create a new security-domain
+     * using the SecureIdentity authentication method. This is used when you want
+     * to obfuscate a database password in the configuration. 
+     *
+     * @param securityDomainName the name of the new security domain
+     * @param username the username associated with the security domain
+     * @param password the value of the password to store in the configuration (e.g. the obfuscated password itself)
+     * 
+     * @throws Exception if failed to create security domain
+     */
+    public void createNewSecureIdentitySecurityDomainRequest(String securityDomainName, String username, String password)
+        throws Exception {
+
+        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, SECURITY_DOMAIN, securityDomainName);
+        ModelNode addTopNode = createRequest(ADD, addr);
+        addTopNode.get(CACHE_TYPE).set("default");
+
+        ModelNode addAuthNode = createRequest(ADD, addr.clone().add(AUTHENTICATION, CLASSIC));
+        ModelNode loginModulesNode = addAuthNode.get(LOGIN_MODULES);
+        ModelNode loginModule = new ModelNode();
+        loginModule.get(CODE).set("SecureIdentity");
+        loginModule.get(FLAG).set("required");
+        ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
+        moduleOptions.setEmptyList();
+        moduleOptions.add(USERNAME, username);
+        moduleOptions.add(PASSWORD, password);
+        loginModulesNode.add(loginModule);
+
+        ModelNode batch = createBatchRequest(addTopNode, addAuthNode);
+        ModelNode results = execute(batch);
+        if (!isSuccess(results)) {
+            throw new FailureException(results, "Failed to create security domain [" + securityDomainName + "]");
+        }
+
+        return;
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
new file mode 100644
index 0000000..0fc0215
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -0,0 +1,651 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.Side;
+import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Button;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
+import com.smartgwt.client.widgets.form.fields.PasswordItem;
+import com.smartgwt.client.widgets.form.fields.SelectItem;
+import com.smartgwt.client.widgets.form.fields.SpacerItem;
+import com.smartgwt.client.widgets.form.fields.SpinnerItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
+import com.smartgwt.client.widgets.form.fields.events.IconClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.IconClickHandler;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.events.EditCompleteEvent;
+import com.smartgwt.client.widgets.grid.events.EditCompleteHandler;
+import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
+import com.smartgwt.client.widgets.tab.TabSet;
+import com.smartgwt.client.widgets.toolbar.ToolStrip;
+
+import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
+import org.rhq.enterprise.gui.installer.client.shared.ServerProperties;
+
+/**
+ * The GWT {@link EntryPoint entry point} to the RHQ Installer GUI.
+ *
+ * @author John Mazzitelli
+ */
+public class Installer implements EntryPoint {
+
+    // This must come first to ensure proper I18N class loading for dev mode
+    public static final Messages MSG = GWT.create(Messages.class);
+    public static final ServerPropertiesMessages PROPS_MSG = GWT.create(ServerPropertiesMessages.class);
+
+    private static final String NEW_SERVER_TO_REGISTER = "*new*";
+
+    private final InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
+    private final ServerPropertyRecordList serverProperties = new ServerPropertyRecordList();
+    private final HashMap<String, String> originalProperties = new HashMap<String, String>();
+    private final LinkedHashMap<String, String> registeredServerNames = new LinkedHashMap<String, String>();
+
+    private ListGrid advancedPropertyItemGrid;
+    private Button mainInstallButton;
+    private TextItem dbConnectionUrl;
+    private TextItem dbUsername;
+    private PasswordItem dbPassword;
+    private SelectItem dbExistingSchemaOption;
+    private ButtonItem testConnectionButton;
+    private SelectItem dbType;
+    private TextItem serverSettingServerName;
+    private TextItem serverSettingPublicAddress;
+    private SpinnerItem serverSettingWebHttpPort;
+    private SpinnerItem serverSettingWebSecureHttpPort;
+    private SelectItem registeredServersSelection;
+    private TextItem serverSettingEmailSMTPHostname;
+    private TextItem serverSettingEmailFromAddress;
+
+    public void onModuleLoad() {
+        Canvas header = createHeader();
+        mainInstallButton = createMainInstallButton();
+        Canvas tabSet = createTabSet();
+
+        VLayout layout = new VLayout();
+        layout.setWidth100();
+        layout.setHeight100();
+        layout.setLayoutMargin(10);
+        layout.setMembersMargin(5);
+        layout.setDefaultLayoutAlign(Alignment.CENTER);
+        layout.addMember(header);
+        layout.addMember(mainInstallButton);
+        layout.addMember(tabSet);
+        layout.draw();
+
+        // Remove loading image in case we don't completely cover it
+        Element loadingPanel = DOM.getElementById("Loading-Panel");
+        loadingPanel.removeFromParent();
+
+        // get the server properties from the server
+        loadServerProperties();
+
+    }
+
+    private void updateServerProperty(String name, Object value) {
+        serverProperties.putServerProperty(name, value == null ? "" : value.toString());
+        refreshAdvancedView();
+    }
+
+    private void loadServerProperties() {
+        // load the initial server properties
+        installerService.getServerProperties(new AsyncCallback<HashMap<String, String>>() {
+            public void onSuccess(HashMap<String, String> result) {
+                if (result.size() == 0) {
+                    SC.say("Initial server properties are missing.");
+                }
+                serverProperties.replaceServerProperties(result);
+
+                // remember these original properties in case the user wants to reset them back
+                originalProperties.clear();
+                originalProperties.putAll(result);
+
+                // refresh the simple view with the new data
+                refreshSimpleView();
+
+                // refresh the advanced view with the new data
+                refreshAdvancedView();
+            }
+
+            public void onFailure(Throwable caught) {
+                SC.say("Cannot load properties: " + caught);
+            }
+        });
+    }
+
+    private void refreshSimpleView() {
+        Map<String, String> props = serverProperties.getMap();
+
+        // DB SETTINGS
+        dbType.setValue(props.get(ServerProperties.PROP_DATABASE_TYPE));
+        dbConnectionUrl.setValue(props.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
+        dbUsername.setValue(props.get(ServerProperties.PROP_DATABASE_USERNAME));
+        // do not prefill the database password - force the user to know it and type it in for security purposes
+
+        // SERVER SETTINGS
+        serverSettingServerName.setValue(props.get(ServerProperties.PROP_HIGH_AVAILABILITY_NAME));
+        serverSettingWebHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTP_PORT));
+        serverSettingWebSecureHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTPS_PORT));
+        serverSettingEmailSMTPHostname.setValue(props.get(ServerProperties.PROP_EMAIL_SMTP_HOST));
+        serverSettingEmailFromAddress.setValue(props.get(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
+
+        forceAnotherTestConnection();
+    }
+
+    private void refreshAdvancedView() {
+        advancedPropertyItemGrid.markForRedraw();
+    }
+
+    private Canvas createHeader() {
+        ToolStrip strip = new ToolStrip();
+        strip.setWidth100();
+        strip.setAlign(Alignment.CENTER);
+
+        Label title = new Label();
+        title.setWidth100();
+        title.setHeight100();
+        title.setWrap(false);
+        title.setValign(VerticalAlignment.CENTER);
+        title.setAlign(Alignment.CENTER);
+        title.setContents("<span style=\"font-size:16pt;font-weight:bold;\">" + MSG.welcome_title() + "</span>");
+        strip.addMember(title);
+        return strip;
+    }
+
+    private Button createMainInstallButton() {
+        Button installButton = new Button(MSG.button_startInstallation());
+        installButton.setWrap(false);
+        installButton.setAutoFit(true);
+        installButton.setDisabled(true); // we can't allow the user to install yet
+        installButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                SC.say("TODO: this should start the install");
+            }
+        });
+
+        return installButton;
+    }
+
+    private TabSet createTabSet() {
+        final TabSet topTabSet = new TabSet();
+        topTabSet.setTabBarPosition(Side.TOP);
+        topTabSet.setTabBarAlign(Side.LEFT);
+        topTabSet.setWidth("90%");
+
+        final Tab welcomeTab = new Tab(MSG.tab_welcome());
+        Label welcomeLabel = new Label(MSG.tab_welcome_content());
+        welcomeTab.setPane(welcomeLabel);
+
+        final Tab simpleViewTab = new Tab(MSG.tab_simpleView());
+        Canvas simpleForm = createSimpleForm();
+        simpleViewTab.setPane(simpleForm);
+
+        final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
+        Canvas advancedView = createAdvancedView();
+        advancedViewTab.setPane(advancedView);
+
+        topTabSet.addTab(welcomeTab);
+        topTabSet.addTab(simpleViewTab);
+        topTabSet.addTab(advancedViewTab);
+
+        return topTabSet;
+    }
+
+    private Canvas createAdvancedView() {
+        VLayout layout = new VLayout();
+
+        ToolStrip strip = new ToolStrip();
+        strip.setWidth100();
+
+        IButton saveButton = new IButton(MSG.button_save());
+        saveButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                installerService.saveServerProperties(serverProperties.getMap(), new AsyncCallback<Void>() {
+                    public void onSuccess(Void result) {
+                        originalProperties.clear();
+                        originalProperties.putAll(serverProperties.getMap());
+                        SC.say("Properties saved to server");
+                    }
+
+                    public void onFailure(Throwable caught) {
+                        SC.say("Failed to save properties to server");
+                    }
+                });
+            }
+        });
+        IButton resetButton = new IButton(MSG.button_reset());
+        resetButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                serverProperties.replaceServerProperties(originalProperties);
+                refreshAdvancedView();
+            }
+        });
+        strip.addMember(saveButton);
+        strip.addMember(resetButton);
+        layout.addMember(strip);
+
+        advancedPropertyItemGrid = new ListGrid();
+        advancedPropertyItemGrid.setWidth100();
+        advancedPropertyItemGrid.setHeight100();
+        advancedPropertyItemGrid.setData(serverProperties);
+
+        ListGridField nameField = new ListGridField(ServerPropertyRecordList.PROPERTY_NAME, MSG.property_name_label());
+        nameField.setCanEdit(false);
+
+        ListGridField valueField = new ListGridField(ServerPropertyRecordList.PROPERTY_VALUE,
+            MSG.property_value_label());
+        valueField.setCanEdit(true);
+
+        advancedPropertyItemGrid.setFields(nameField, valueField);
+        advancedPropertyItemGrid.setSortField(ServerPropertyRecordList.PROPERTY_NAME);
+
+        advancedPropertyItemGrid.addEditCompleteHandler(new EditCompleteHandler() {
+            public void onEditComplete(EditCompleteEvent event) {
+                String newValue = (String) event.getNewValues().values().iterator().next().toString();
+                String changedProperty = event.getOldRecord().getAttribute(ServerPropertyRecordList.PROPERTY_NAME);
+                serverProperties.getMap().put(changedProperty, newValue); // we need this to be reflected in the internal map
+                refreshSimpleView();
+            }
+        });
+
+        layout.addMember(advancedPropertyItemGrid);
+
+        return layout;
+    }
+
+    private Canvas createSimpleForm() {
+
+        final int fieldWidth = 300;
+
+        ////////////////////////////////////////////////////////
+        // The Database form
+
+        final DynamicForm databaseForm = new DynamicForm();
+        databaseForm.setAutoWidth();
+        databaseForm.setPadding(5);
+        databaseForm.setCellPadding(5);
+        databaseForm.setWrapItemTitles(false);
+        databaseForm.setIsGroup(true);
+        databaseForm.setGroupTitle(MSG.tab_simpleView_database());
+
+        dbConnectionUrl = new TextItem(ServerProperties.PROP_DATABASE_CONNECTION_URL,
+            PROPS_MSG.rhq_server_database_connection_url());
+        dbConnectionUrl.setWidth(fieldWidth);
+        dbConnectionUrl.setValue("jdbc:postgresql://127.0.0.1:5432/rhq");
+        dbConnectionUrl.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
+            }
+        });
+
+        dbUsername = new TextItem(ServerProperties.PROP_DATABASE_USERNAME,
+            PROPS_MSG.rhq_server_database_user_name());
+        dbUsername.setWidth(fieldWidth);
+        dbUsername.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_USERNAME, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
+            }
+        });
+
+        dbPassword = new PasswordItem(ServerProperties.PROP_DATABASE_PASSWORD,
+            PROPS_MSG.rhq_server_database_password());
+        dbPassword.setWidth(fieldWidth);
+        dbPassword.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_PASSWORD, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
+            }
+        });
+
+        dbExistingSchemaOption = new SelectItem("existingSchemaOption", MSG.schema_update_question());
+        final LinkedHashMap<String, String> schemaOpt = new LinkedHashMap<String, String>();
+        schemaOpt.put("keep", MSG.schema_update_keep());
+        schemaOpt.put("overwrite", MSG.schema_update_overwrite());
+        schemaOpt.put("skip", MSG.schema_update_skip());
+        dbExistingSchemaOption.setValueMap(schemaOpt);
+        dbExistingSchemaOption.setDefaultToFirstOption(true);
+        dbExistingSchemaOption.setVisible(false);
+        dbExistingSchemaOption.setWidth(fieldWidth);
+        dbExistingSchemaOption.setWrapTitle(true);
+        dbExistingSchemaOption.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                if (registeredServersSelection != null) {
+                    String selected = event.getValue().toString();
+                    if ("overwrite".equals(selected)) {
+                        registeredServersSelection.setValue((String) null);
+                        registeredServersSelection.disable();
+                    } else {
+                        registeredServersSelection.enable();
+                    }
+                }
+            }
+        });
+
+        testConnectionButton = new ButtonItem("testConnectionButton", MSG.button_testConnection());
+        testConnectionButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
+            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
+                final Conn conn = new Conn();
+                installerService.testConnection(conn.url(), conn.username(), conn.password(),
+                    new AsyncCallback<String>() {
+                        public void onSuccess(String result) {
+                            if (result != null) {
+                                forceAnotherTestConnection();
+                                testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                                SC.say("Could not connect to the database: " + result);
+                            } else {
+                                connectedToDatabase();
+                            }
+                        }
+
+                        public void onFailure(Throwable caught) {
+                            forceAnotherTestConnection();
+                            testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                            SC.say("Failed to test connection: " + caught.toString());
+                        }
+                    });
+
+            }
+        });
+
+        dbType = new SelectItem(ServerProperties.PROP_DATABASE_TYPE,
+            PROPS_MSG.rhq_server_database_type_mapping());
+        final LinkedHashMap<String, String> dbs = new LinkedHashMap<String, String>();
+        dbs.put("PostgreSQL", "PostgreSQL");
+        dbs.put("Oracle", "Oracle");
+        dbType.setValueMap(dbs);
+        dbType.setDefaultToFirstOption(true);
+        dbType.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                forceAnotherTestConnection();
+
+                String newDBType = (String) event.getValue();
+                String newURL = "";
+                String dialect = "";
+                String quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.StdJDBCDelegate";
+                String quartzSelectWithLockSQL = "SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE";
+                String quartzLockHandlerClass = "org.quartz.impl.jdbcjobstore.StdRowLockSemaphore";
+
+                if ("PostgreSQL".equalsIgnoreCase(newDBType)) {
+                    newURL = "jdbc:postgresql://127.0.0.1:5432/rhq";
+                    dialect = "org.hibernate.dialect.PostgreSQLDialect";
+                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate";
+                } else if ("Oracle".equalsIgnoreCase(newDBType)) {
+                    newURL = "jdbc:oracle:thin:@127.0.0.1:1521:rhq";
+                    dialect = "org.hibernate.dialect.Oracle10gDialect";
+                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.oracle.OracleDelegate";
+                }
+                dbConnectionUrl.setValue(newURL);
+
+                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, newURL);
+                updateServerProperty(ServerProperties.PROP_DATABASE_HIBERNATE_DIALECT, dialect);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_DRIVER_DELEGATE_CLASS, quartzDriverDelegateClass);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_SELECT_WITH_LOCK_SQL, quartzSelectWithLockSQL);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_LOCK_HANDLER_CLASS, quartzLockHandlerClass);
+                updateServerProperty(ServerProperties.PROP_DATABASE_TYPE, newDBType); // this refreshes the advanced view, too
+            }
+        });
+
+        // use this to move the button over to the second column - it looks better this way
+        SpacerItem buttonSpacer = new SpacerItem();
+        buttonSpacer.setEndRow(false);
+        testConnectionButton.setStartRow(false);
+
+        databaseForm.setFields(dbType, dbConnectionUrl, dbUsername, dbPassword, buttonSpacer, testConnectionButton,
+            dbExistingSchemaOption);
+
+        ////////////////////////////////////////////////////////
+        // The Server Settings form
+
+        final DynamicForm serverSettingsForm = new DynamicForm();
+        serverSettingsForm.setPadding(5);
+        serverSettingsForm.setCellPadding(5);
+        serverSettingsForm.setAutoWidth();
+        serverSettingsForm.setIsGroup(true);
+        serverSettingsForm.setWrapItemTitles(false);
+        serverSettingsForm.setGroupTitle(MSG.tab_simpleView_serverSettings());
+
+        serverSettingServerName = new TextItem(ServerProperties.PROP_HIGH_AVAILABILITY_NAME,
+            PROPS_MSG.rhq_server_high_availability_name());
+        serverSettingServerName.setWidth(fieldWidth);
+        serverSettingServerName.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, String.valueOf(event.getValue()));
+                if (registeredServersSelection != null) {
+                    registeredServersSelection.setValue((String) null); // flip it back to *new* since the server name changed
+                }
+            }
+        });
+
+        serverSettingPublicAddress = new TextItem("serverPublicAddress",
+            MSG.tab_simpleView_serverSettings_publicAddress());
+        serverSettingPublicAddress.setWidth(fieldWidth);
+
+        serverSettingWebHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTP_PORT,
+            PROPS_MSG.rhq_server_startup_web_http_port());
+        serverSettingWebHttpPort.setWidth(fieldWidth);
+        serverSettingWebHttpPort.setMin(1);
+        serverSettingWebHttpPort.setMax(65535);
+        serverSettingWebHttpPort.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingWebSecureHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTPS_PORT,
+            PROPS_MSG.rhq_server_startup_web_https_port());
+        serverSettingWebSecureHttpPort.setWidth(fieldWidth);
+        serverSettingWebSecureHttpPort.setMin(1);
+        serverSettingWebSecureHttpPort.setMax(65535);
+        serverSettingWebSecureHttpPort.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT, String.valueOf(event.getValue()));
+            }
+        });
+
+        registeredServersSelection = new SelectItem("registeredServersSelectItem",
+            MSG.tab_simpleView_serverSettings_registeredServers());
+        registeredServersSelection.setWidth(fieldWidth);
+        addContextualHelp(registeredServersSelection, MSG.help_registeredServers());
+        registeredServerNames.put(NEW_SERVER_TO_REGISTER,
+            MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+        registeredServersSelection.setValueMap(registeredServerNames);
+        registeredServersSelection.setDefaultToFirstOption(true);
+        registeredServersSelection.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                final String selectedServerName = String.valueOf(event.getValue());
+                final boolean newServer = NEW_SERVER_TO_REGISTER.equals(selectedServerName);
+                if (newServer) {
+                    serverSettingServerName.setValue("");
+                    serverSettingPublicAddress.setValue("");
+                    updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, "");
+                } else {
+                    final Conn conn = new Conn();
+                    installerService.getServerDetails(conn.url(), conn.username(), conn.password(), selectedServerName,
+                        new AsyncCallback<ServerDetails>() {
+                            public void onSuccess(ServerDetails details) {
+                                serverSettingServerName.setValue(details.getName());
+                                serverSettingPublicAddress.setValue(details.getEndpointAddress());
+                                serverSettingWebHttpPort.setValue(details.getEndpointPortString());
+                                serverSettingWebSecureHttpPort.setValue(details.getEndpointSecurePortString());
+                                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, details.getName());
+                                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT,
+                                    details.getEndpointPortString());
+                                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT,
+                                    details.getEndpointSecurePortString());
+                            }
+
+                            public void onFailure(Throwable caught) {
+                                SC.say("Failed to get details on selected server [" + selectedServerName + "]");
+                            }
+                        });
+                }
+            }
+        });
+
+        serverSettingEmailSMTPHostname = new TextItem(ServerProperties.PROP_EMAIL_SMTP_HOST,
+            PROPS_MSG.rhq_server_email_smtp_host());
+        serverSettingEmailSMTPHostname.setWidth(fieldWidth);
+        serverSettingEmailSMTPHostname.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_EMAIL_SMTP_HOST, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingEmailFromAddress = new TextItem(ServerProperties.PROP_EMAIL_FROM_ADDRESS,
+            PROPS_MSG.rhq_server_email_from_address());
+        serverSettingEmailFromAddress.setWidth(fieldWidth);
+        serverSettingEmailFromAddress.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_EMAIL_FROM_ADDRESS, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingsForm.setItems(registeredServersSelection, serverSettingServerName, serverSettingPublicAddress,
+            serverSettingWebHttpPort, serverSettingWebSecureHttpPort, serverSettingEmailSMTPHostname,
+            serverSettingEmailFromAddress);
+
+        ////////////////////////////////////////////////////////
+        // The layout holding the forms in the simple view tab
+
+        VLayout simpleForm = new VLayout();
+        simpleForm.setLayoutMargin(5);
+        simpleForm.setMembersMargin(5);
+        simpleForm.setWidth100();
+        simpleForm.setHeight100();
+        simpleForm.setDefaultLayoutAlign(Alignment.CENTER);
+        simpleForm.addMember(databaseForm);
+        simpleForm.addMember(serverSettingsForm);
+
+        return simpleForm;
+    }
+
+    private void connectedToDatabase() {
+        final Conn conn = new Conn();
+        testConnectionButton.setIcon("[SKIN]/actions/ok.png");
+        installerService.isDatabaseSchemaExist(conn.url(), conn.username(), conn.password(),
+            new AsyncCallback<Boolean>() {
+                public void onSuccess(Boolean schemaExists) {
+                    if (schemaExists) {
+                        dbExistingSchemaOption.show();
+                        registeredServersSelection.enable();
+
+                        installerService.getServerNames(conn.url(), conn.username(), conn.password(),
+                            new AsyncCallback<ArrayList<String>>() {
+                                public void onSuccess(ArrayList<String> servers) {
+                                    registeredServerNames.clear();
+                                    registeredServerNames.put(NEW_SERVER_TO_REGISTER,
+                                        MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+                                    for (String server : servers) {
+                                        registeredServerNames.put(server, server);
+                                    }
+                                    registeredServersSelection.setValueMap(registeredServerNames);
+                                }
+
+                                public void onFailure(Throwable caught) {
+                                    SC.say("Cannot get the registered server names");
+                                }
+                            });
+                    } else {
+                        dbExistingSchemaOption.hide();
+                        registeredServersSelection.setValue((String) null);
+                        registeredServersSelection.disable();
+                    }
+                    mainInstallButton.enable();
+                }
+
+                public void onFailure(Throwable caught) {
+                    SC.say("Cannot determine the status of the database schema: " + caught);
+                }
+            });
+    }
+
+    private void addContextualHelp(final FormItem item, final String helpText) {
+        final FormItemIcon helpIcon = new FormItemIcon();
+        helpIcon.setSrc("[SKIN]/actions/help.png");
+        helpIcon.setNeverDisable(true);
+        item.setIcons(helpIcon);
+
+        item.addIconClickHandler(new IconClickHandler() {
+            public void onIconClick(IconClickEvent event) {
+                if (event.getIcon().equals(helpIcon)) {
+                    SC.say(helpText);
+                }
+            }
+        });
+    }
+
+    /**
+     * Call this when the user changed something (like connection URL or password) that renders
+     * the old connection test invalid. This will ensure the user is forced to re-test the connection.
+     */
+    private void forceAnotherTestConnection() {
+        mainInstallButton.disable();
+        testConnectionButton.setIcon(null);
+        dbExistingSchemaOption.hide();
+
+        if (registeredServerNames.size() > 1) {
+            registeredServerNames.clear();
+            registeredServerNames.put(NEW_SERVER_TO_REGISTER, MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+        }
+        registeredServersSelection.setValue((String) null);
+        registeredServersSelection.setValueMap(registeredServerNames);
+    }
+
+    // for convienence, so we can get the conn url, user, pass in one object
+    private class Conn {
+        public String url() {
+            return Installer.this.dbConnectionUrl.getValueAsString();
+        }
+
+        public String username() {
+            return Installer.this.dbUsername.getValueAsString();
+        }
+
+        public String password() {
+            return Installer.this.dbPassword.getValueAsString();
+        }
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
new file mode 100644
index 0000000..654e3cf
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
@@ -0,0 +1,62 @@
+package org.rhq.enterprise.gui.installer.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.RecordList;
+
+/**
+ * This provides a RecordList that is really a map underneath (each record is nothing more
+ * than a name/value pair; that is, each record has two attributes: name and value).
+ *
+ * We use this because this RecordList will be the list backing the Advanced View grid.
+ * So changing this list will be automatically reflected in that grid.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerPropertyRecordList extends RecordList {
+
+    public static final String PROPERTY_NAME = "n";
+    public static final String PROPERTY_VALUE = "v";
+
+    // this map is kept in sync with the record list
+    private HashMap<String, String> map = new HashMap<String, String>();
+
+    public HashMap<String, String> getMap() {
+        return map;
+    }
+
+    public String getServerProperty(String name) {
+        String value = map.get(name);
+        return (value == null) ? "" : value;
+    }
+
+    public void putServerProperty(String name, String value) {
+        // fill in the internal map
+        map.put(name, value);
+
+        // now update the record list
+        Record found = find(PROPERTY_NAME, name);
+        if (found == null) {
+            Record record = new Record();
+            record.setAttribute(PROPERTY_NAME, name);
+            record.setAttribute(PROPERTY_VALUE, value);
+            add(record);
+        } else {
+            found.setAttribute(PROPERTY_VALUE, value);
+        }
+    }
+
+    public void replaceServerProperties(Map<String, String> newMap) {
+        // first update the internal map
+        map.clear();
+        map.putAll(newMap);
+
+        // now update the record list
+        setLength(0);
+        for (Map.Entry<String, String> entry : newMap.entrySet()) {
+            putServerProperty(entry.getKey(), entry.getValue());
+        }
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
new file mode 100644
index 0000000..c37d923
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -0,0 +1,105 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.gwt;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
+
+/**
+ * @author John Mazzitelli
+ */
+public interface InstallerGWTService extends RemoteService {
+
+    /**
+     * Returns a list of all registered servers in the database.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return list of all existing servers registered in the database.
+     * @throws Exception
+     */
+    ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Returns details on a specific server that is registered in the database.
+     * 
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @param serverName the name of the server whose details are to be retrieved
+     * @return the details of the server or null if the server does not exist
+     * @throws Exception
+     */
+    ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
+        throws Exception;
+
+    /**
+     * Tests to see if there is already a schema installed.
+     * 
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>true</code> if there appears to be a schema installed in the database already.
+     * @throws Exception
+     */
+    boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Tests that the database can be connected to with the given URL and credentials.
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>null</code> if the connection succeeded; this will be an error message if failed
+     * @throws Exception
+     */
+    String testConnection(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Returns the rhq-server.properties values in a map.
+     * @return server properties
+     * @throws Exception
+     */
+    HashMap<String, String> getServerProperties() throws Exception;
+
+    /**
+     * Saves the rhq-server.properties with the given values.
+     * @param serverProperties
+     * @throws Exception
+     */
+    void saveServerProperties(HashMap<String, String> serverProperties) throws Exception;
+
+    /**
+     * Returns the version string for the app server itself (e.g. "7.1.2.Final").
+     * @return version string of app server
+     * @throws Exception
+     */
+    String getAppServerVersion() throws Exception;
+
+    /**
+     * Returns the general type of operating system the server is running on (e.g. "Linux").
+     * @return os type name
+     * @throws Exception
+     */
+    String getOperatingSystem() throws Exception;
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
new file mode 100644
index 0000000..b54e380
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
@@ -0,0 +1,115 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.shared;
+
+import java.io.Serializable;
+
+public class ServerDetails implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    public static final String DEFAULT_AFFINITY_GROUP = "";
+    public static final int DEFAULT_ENDPOINT_PORT = 7080;
+    public static final int DEFAULT_ENDPOINT_SECURE_PORT = 7443;
+
+    private String name;
+    private String endpointAddress;
+    private int endpointPort;
+    private int endpointSecurePort;
+    private String affinityGroup;
+
+    protected ServerDetails() {
+        // for GWT
+    }
+
+    public ServerDetails(String name, String endpointAddress, int port, int securePort, String affinityGroup) {
+        this.name = name;
+        this.endpointAddress = endpointAddress;
+        this.endpointPort = port;
+        this.endpointSecurePort = securePort;
+        this.affinityGroup = affinityGroup;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        if ((null != name) && (!"".equals(name.trim()))) {
+            this.name = name;
+        }
+    }
+
+    public String getEndpointAddress() {
+        return endpointAddress;
+    }
+
+    public void setEndpointAddress(String endpointAddress) {
+        if ((null != endpointAddress) && (!"".equals(endpointAddress.trim()))) {
+            this.endpointAddress = endpointAddress;
+        }
+    }
+
+    public int getEndpointPort() {
+        return endpointPort;
+    }
+
+    public void setEndpointPort(int endpointPort) {
+        this.endpointPort = endpointPort;
+    }
+
+    public String getEndpointPortString() {
+        return (String.valueOf(endpointPort));
+    }
+
+    public void setEndpointPortString(String endpointPort) {
+        this.endpointPort = Integer.valueOf(endpointPort).intValue();
+    }
+
+    public int getEndpointSecurePort() {
+        return endpointSecurePort;
+    }
+
+    public void setEndpointSecurePort(int endpointSecurePort) {
+        this.endpointSecurePort = endpointSecurePort;
+    }
+
+    public String getEndpointSecurePortString() {
+        return (String.valueOf(endpointSecurePort));
+    }
+
+    public void setEndpointSecurePortString(String endpointSecurePort) {
+        this.endpointSecurePort = Integer.valueOf(endpointSecurePort).intValue();
+    }
+
+    public String getAffinityGroup() {
+        return affinityGroup;
+    }
+
+    public void setAffinityGroup(String affinityGroup) {
+        if ((null != affinityGroup) && (!"".equals(affinityGroup.trim()))) {
+            this.affinityGroup = affinityGroup;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "[name=" + name + " address=" + endpointAddress + " port=" + endpointPort + " secureport="
+            + endpointSecurePort + " affinitygroup=" + affinityGroup + "]";
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
new file mode 100644
index 0000000..d92d4ce
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
@@ -0,0 +1,53 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.shared;
+
+/**
+ * Settings found in the rhq-server.properties file that controls the startup configuration of the server.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerProperties {
+    public static final String PREFIX_PROP_DATABASE = "rhq.server.database.";
+    public static final String PROP_DATABASE_TYPE = PREFIX_PROP_DATABASE + "type-mapping";
+    public static final String PROP_DATABASE_CONNECTION_URL = PREFIX_PROP_DATABASE + "connection-url";
+    public static final String PROP_DATABASE_USERNAME = PREFIX_PROP_DATABASE + "user-name";
+    public static final String PROP_DATABASE_PASSWORD = PREFIX_PROP_DATABASE + "password";
+    public static final String PROP_DATABASE_SERVER_NAME = PREFIX_PROP_DATABASE + "server-name";
+    public static final String PROP_DATABASE_PORT = PREFIX_PROP_DATABASE + "port";
+    public static final String PROP_DATABASE_DB_NAME = PREFIX_PROP_DATABASE + "db-name";
+    public static final String PROP_DATABASE_HIBERNATE_DIALECT = "hibernate.dialect";
+    public static final String PROP_QUARTZ_DRIVER_DELEGATE_CLASS = "rhq.server.quartz.driverDelegateClass";
+    public static final String PROP_QUARTZ_SELECT_WITH_LOCK_SQL = "rhq.server.quartz.selectWithLockSQL";
+    public static final String PROP_QUARTZ_LOCK_HANDLER_CLASS = "rhq.server.quartz.lockHandlerClass";
+
+    public static final String PREFIX_PROP_WEB = "rhq.server.startup.web.";
+    public static final String PROP_WEB_HTTP_PORT = PREFIX_PROP_WEB + "http.port";
+    public static final String PROP_WEB_HTTPS_PORT = PREFIX_PROP_WEB + "https.port";
+
+    public static final String PREFIX_PROP_EMBEDDED_AGENT = "rhq.server.embedded-agent.";
+    public static final String PROP_EMBEDDED_AGENT_ENABLED = PREFIX_PROP_EMBEDDED_AGENT + "enabled";
+
+    public static final String PREFIX_PROP_EMAIL = "rhq.server.email.";
+    public static final String PROP_EMAIL_SMTP_HOST = PREFIX_PROP_EMAIL + "smtp-host";
+    public static final String PROP_EMAIL_FROM_ADDRESS = PREFIX_PROP_EMAIL + "from-address";
+
+    public static final String PROP_HIGH_AVAILABILITY_NAME = "rhq.server.high-availability.name";
+    public static final String PROP_MM_AT_START = "rhq.server.maintenance-mode-at-startup";
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
new file mode 100644
index 0000000..add78a6
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
@@ -0,0 +1,100 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.service;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+
+import org.jboss.as.controller.ModelController;
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.server.Services;
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.ServiceActivator;
+import org.jboss.msc.service.ServiceActivatorContext;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceRegistryException;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.InjectedValue;
+
+/**
+ * This will provide our co-located management service.
+ * This is useful because it helps us avoid performing any management
+ * over a remote connector. Since we know we are running co-located
+ * in the same app server container that we want to manage, this 
+ * service will provide us with a management client that does not go
+ * over a remote connector to talk to our app server container.
+ *
+ * @author John Mazzitelli
+ */
+public class ManagementService implements ServiceActivator {
+
+    private static volatile ModelController controller;
+    private static volatile ExecutorService executor;
+
+    public static ModelControllerClient getClient() {
+        return controller.createClient(executor);
+    }
+
+    @Override
+    public void activate(ServiceActivatorContext context) throws ServiceRegistryException {
+        final GetModelControllerService service = new GetModelControllerService();
+        context
+            .getServiceTarget()
+            .addService(ServiceName.of("rhq", "installer", "management", "client", "getter"), service)
+            .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.modelControllerValue)
+            .install();
+    }
+
+    private class GetModelControllerService implements Service<Void> {
+        private InjectedValue<ModelController> modelControllerValue = new InjectedValue<ModelController>();
+
+        @Override
+        public Void getValue() throws IllegalStateException, IllegalArgumentException {
+            return null;
+        }
+
+        @Override
+        public void start(StartContext context) throws StartException {
+            ManagementService.executor = Executors.newFixedThreadPool(5, new ThreadFactory() {
+                @Override
+                public Thread newThread(Runnable r) {
+                    Thread t = new Thread(r);
+                    t.setDaemon(true);
+                    t.setName("ManagementServiceModelControllerClientThread");
+                    return t;
+                }
+            });
+            ManagementService.controller = modelControllerValue.getValue();
+        }
+
+        @Override
+        public void stop(StopContext context) {
+            try {
+                ManagementService.executor.shutdownNow();
+            } finally {
+                ManagementService.executor = null;
+                ManagementService.controller = null;
+            }
+        }
+
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
new file mode 100644
index 0000000..6247168
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -0,0 +1,161 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.servlet;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.servlet.annotation.WebServlet;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+
+import org.rhq.common.jbossas.client.controller.Address;
+import org.rhq.common.jbossas.client.controller.JBossASClient;
+import org.rhq.common.jbossas.client.controller.SecurityDomainJBossASClient;
+import org.rhq.core.util.PropertiesFileUpdate;
+import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
+import org.rhq.enterprise.gui.installer.server.service.ManagementService;
+
+/**
+ * @author John Mazzitelli
+ */
+ at WebServlet(value = "/org.rhq.enterprise.gui.installer.Installer/InstallerGWTService")
+public class InstallerGWTServiceImpl extends RemoteServiceServlet implements InstallerGWTService {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
+
+    @Override
+    public ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception {
+        try {
+            return ServerInstallUtil.getServerNames(connectionUrl, username, password);
+        } catch (Exception e) {
+            log("Could not get the list of registered server names", e);
+            return null;
+        }
+    }
+
+    @Override
+    public ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
+        throws Exception {
+        try {
+            return ServerInstallUtil.getServerDetails(connectionUrl, username, password, serverName);
+        } catch (Exception e) {
+            log("Could not get server details for [" + serverName + "]", e);
+            return null;
+        }
+    }
+
+    @Override
+    public boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception {
+        try {
+            return ServerInstallUtil.isDatabaseSchemaExist(connectionUrl, username, password);
+        } catch (Exception e) {
+            log("Could not determine database existence", e);
+            return false;
+        }
+    }
+
+    @Override
+    public String testConnection(String connectionUrl, String username, String password) throws Exception {
+        String results = ServerInstallUtil.testConnection(connectionUrl, username, password);
+        return results;
+    }
+
+    @Override
+    public HashMap<String, String> getServerProperties() throws Exception {
+        File serverPropertiesFile = getServerPropertiesFile();
+        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
+        Properties props = propsFile.loadExistingProperties();
+
+        // GWT can't handle Properties - convert to HashMap
+        HashMap<String, String> map = new HashMap<String, String>(props.size());
+        for (Object property : props.keySet()) {
+            map.put(property.toString(), props.getProperty(property.toString()));
+        }
+        return map;
+    }
+
+    @Override
+    public void saveServerProperties(HashMap<String, String> serverProperties) throws Exception {
+        File serverPropertiesFile = getServerPropertiesFile();
+        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
+
+        // GWT can't handle Properties - convert from HashMap
+        Properties props = new Properties();
+        for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
+            props.setProperty(entry.getKey(), entry.getValue());
+        }
+
+        propsFile.update(props);
+
+        return;
+    }
+
+    @Override
+    public String getAppServerVersion() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String version = client.getStringAttribute("release-version", Address.root());
+        return version;
+    }
+
+    @Override
+    public String getOperatingSystem() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
+        String osName = client.getStringAttribute("name", Address.root().add(address));
+        return osName;
+    }
+
+    private String getAppServerHomeDir() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String[] address = { "core-service", "server-environment" };
+        String dir = client.getStringAttribute(true, "home-dir", Address.root().add(address));
+        return dir;
+    }
+
+    private File getServerPropertiesFile() throws Exception {
+        File appServerHomeDir = new File(getAppServerHomeDir());
+        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        return serverPropertiesFile;
+    }
+
+    private ModelControllerClient getClient() {
+        ModelControllerClient client = ManagementService.getClient();
+        return client;
+    }
+
+    private void createDatasourceSecurityDomain(String username, String password) throws Exception {
+        final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
+        final String securityDomain = RHQ_SECURITY_DOMAIN;
+        if (!client.isSecurityDomain(securityDomain)) {
+            client.createNewSecureIdentitySecurityDomainRequest(securityDomain, username, password);
+            log("Security domain [" + securityDomain + "] created");
+        } else {
+            log("Security domain [" + securityDomain + "] already exists, skipping the creation request");
+        }
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
new file mode 100644
index 0000000..4577789
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
@@ -0,0 +1,274 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.servlet;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.db.DatabaseType;
+import org.rhq.core.db.DatabaseTypeFactory;
+import org.rhq.core.db.DbUtil;
+import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
+
+/**
+ * Provides utility methods necessary to complete the server installation.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerInstallUtil {
+    private static final Log LOG = LogFactory.getLog(ServerInstallUtil.class);
+
+    public enum ExistingSchemaOption {
+        OVERWRITE, KEEP, SKIP
+    };
+
+    public static boolean isKeepExistingSchema(ExistingSchemaOption existingSchemaOption) {
+        return ExistingSchemaOption.KEEP.name().equals(existingSchemaOption)
+            || ExistingSchemaOption.SKIP.name().equals(existingSchemaOption);
+    }
+
+    /**
+     * Returns <code>true</code> if the database already has the database schema created for it. It will not be known
+     * what version of schema or if its the latest, all this method tells you is that some RHQ database schema exists.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>true</code> if the database can be connected to
+     *
+     * @throws Exception if failed to communicate with the database
+     */
+    public static boolean isDatabaseSchemaExist(String connectionUrl, String username, String password)
+        throws Exception {
+
+        Connection conn = getDatabaseConnection(connectionUrl, username, password);
+        DatabaseType db = DatabaseTypeFactory.getDatabaseType(conn);
+
+        try {
+            return db.checkTableExists(conn, "RHQ_PRINCIPAL");
+        } catch (IllegalStateException e) {
+            return false;
+        } finally {
+            db.closeConnection(conn);
+        }
+    }
+
+    /**
+     * Get the list of existing servers from an existing schema.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return List of server names registered in the database. Empty list if the table does not exist or there are no entries in the table.
+     *
+     * @throws Exception if failed to communicate with the database
+     */
+    public static ArrayList<String> getServerNames(String connectionUrl, String username, String password)
+        throws Exception {
+        DatabaseType db = null;
+        Connection conn = null;
+        Statement stm = null;
+        ResultSet rs = null;
+        ArrayList<String> result = new ArrayList<String>();
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            if (db.checkTableExists(conn, "rhq_server")) {
+
+                stm = conn.createStatement();
+                rs = stm.executeQuery("SELECT name FROM rhq_server ORDER BY name asc");
+
+                while (rs.next()) {
+                    result.add(rs.getString(1));
+                }
+            }
+        } catch (IllegalStateException e) {
+            // table does not exist
+        } catch (SQLException e) {
+            LOG.info("Unable to fetch existing server info: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeJDBCObjects(conn, stm, rs);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Returns information on the server as found in the database (port numbers, affinity group, etc).
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @param serverName the server whose details are to be returned
+     * @return the information on the named server
+     */
+    public static ServerDetails getServerDetails(String connectionUrl, String username, String password,
+        String serverName) {
+
+        DatabaseType db = null;
+        Connection conn = null;
+        ServerDetails result = null;
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            result = getServerDetails(db, conn, serverName);
+
+        } catch (Exception e) {
+            LOG.info("Unable to get server detail: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeConnection(conn);
+            }
+        }
+
+        return result;
+    }
+
+    private static ServerDetails getServerDetails(DatabaseType db, Connection conn, String serverName) {
+        PreparedStatement stm = null;
+        ResultSet rs = null;
+        ServerDetails result = null;
+
+        if (null == serverName) {
+            return result;
+        }
+
+        try {
+            stm = conn.prepareStatement("" //
+                + "SELECT s.address, s.port, s.secure_port, ag.name " //
+                + "  FROM rhq_server s LEFT JOIN rhq_affinity_group ag ON ag.id = s.affinity_group_id " //
+                + " WHERE s.name = ?");
+            stm.setString(1, serverName.trim());
+
+            rs = stm.executeQuery();
+
+            if (rs.next()) {
+                result = new ServerDetails(serverName, rs.getString(1), rs.getInt(2), rs.getInt(3), rs.getString(4));
+            }
+
+        } catch (SQLException e) {
+            LOG.info("Unable to get affinity group name for server: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeResultSet(rs);
+                db.closeStatement(stm);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Tests to make sure the server can be connected to with the given settings.
+     * If the test is successful, <code>null</code>. If the test fails, the returned string
+     * will be the error message to indicate the problem.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return error message if test failed; <code>null</code> if test succeeded
+     */
+    public static String testConnection(String connectionUrl, String username, String password) {
+
+        // its possible the JDBC URL was changed, clear the factory cache in case the DB version is different now
+        DatabaseTypeFactory.clearDatabaseTypeCache();
+
+        try {
+            ensureDatabaseIsSupported(connectionUrl, username, password);
+            return null;
+        } catch (Exception e) {
+            LOG.warn("Installer failed to test connection", e);
+            return ThrowableUtil.getAllMessages(e);
+        }
+    }
+
+    /**
+     * Call this when you need to confirm that the database is supported.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     *
+     * @throws Exception if the database is not supported
+     */
+    public static void ensureDatabaseIsSupported(String connectionUrl, String username, String password)
+        throws Exception {
+        Connection conn = null;
+        DatabaseType db = null;
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            String version = db.getVersion();
+
+            if (DatabaseTypeFactory.isPostgres(db)) {
+                if (version.startsWith("7") || version.equals("8") || version.startsWith("8.0")
+                    || version.startsWith("8.1")) {
+                    throw new Exception("Unsupported PostgreSQL [" + db + "]");
+                }
+            } else if (DatabaseTypeFactory.isOracle(db)) {
+                if (version.startsWith("8") || version.startsWith("9")) {
+                    throw new Exception("Unsupported Oracle [" + db + "]");
+                }
+            } else {
+                throw new Exception("Unsupported DB [" + db + "]");
+            }
+
+            LOG.info("Database is supported: " + db);
+        } finally {
+            if (db != null) {
+                db.closeConnection(conn);
+            }
+        }
+
+        return;
+    }
+
+    /**
+     * Returns a database connection with the given set of properties providing the settings that allow for a successful
+     * database connection. If <code>props</code> is <code>null</code>, it will use the server properties from
+     * {@link #getServerProperties()}.
+     *
+     * @param connectionUrl 
+     * @param userName 
+     * @param password 
+     * @return the database connection
+     *
+     * @throws SQLException if cannot successfully connect to the database
+     */
+    public static Connection getDatabaseConnection(String connectionUrl, String userName, String password)
+        throws SQLException {
+        return DbUtil.getConnection(connectionUrl, userName, password);
+    }
+}
diff --git a/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
new file mode 100644
index 0000000..164e94a
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
@@ -0,0 +1,35 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN"
+    "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
+
+<module>
+
+    <inherits name='com.google.gwt.user.User'/>
+    <inherits name='com.google.gwt.i18n.I18N'/>
+    <inherits name="com.google.gwt.logging.Logging"/>
+
+    <inherits name='com.smartgwt.SmartGwt' />
+    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
+
+    <!-- ============================ gwt logging ============================= -->
+    <set-property name="gwt.logging.enabled" value="TRUE"/>
+    <!-- FINE ~= DEBUG in gwt-log -->
+    <set-property name="gwt.logging.logLevel" value="FINE"/>
+    <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
+    <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
+    <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
+    <set-property name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
+    <set-property name="gwt.logging.popupHandler" value="DISABLED" />
+    <set-property name="gwt.logging.systemHandler" value="ENABLED" />
+    <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
+
+    <set-property name="user.agent" value="${gwt.userAgent}"/>
+    <extend-property name="locale" values="${gwt.locale}" />
+
+    <set-configuration-property name="locale.usemeta" value="Y"/>
+    <set-configuration-property name="locale.useragent" value="Y"/>
+    <set-configuration-property name="locale.searchorder" value="queryparam,meta,useragent,cookie"/>
+    <set-property-fallback name="locale" value="${gwt.fallback.locale}"/>
+
+    <entry-point class='org.rhq.enterprise.gui.installer.client.Installer'/>
+
+</module>
diff --git a/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
new file mode 100644
index 0000000..5915f40
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -0,0 +1,21 @@
+button_reset = Reset
+button_save = Save
+button_startInstallation = Press To Start The Installation Now
+button_testConnection = Test Connection
+help_registeredServers = If you are performing an upgrade or a re-installation then you should select a server from this list of registered servers. If you want to install a new server into the system, select the *New Server* option. (Note that if you are going to overwrite your existing schema, you cannot select an existing registered server since they will be deleted when the overwrite is performed.)
+property_name_label = Property
+property_value_label = Value
+schema_update_keep = Keep (Maintain Existing Data)
+schema_update_overwrite = Overwrite (Lose Existing Data!)
+schema_update_question = A database schema already exists. What do you want to do?
+schema_update_skip = Skip (Leave Database As-Is)
+tab_advancedView = Advanced View
+tab_simpleView = Simple View
+tab_simpleView_database = Database Settings
+tab_simpleView_serverSettings = Server Settings
+tab_simpleView_serverSettings_publicAddress = Server Public Address
+tab_simpleView_serverSettings_registeredServers = Registered Server Names
+tab_simpleView_serverSettings_registeredServers_newServer = *New Server*
+tab_welcome = Welcome
+tab_welcome_content = <h1>Welcome to the new GWT Installer</h1>\nThis is the <b>new</b> installer.\nAny HTML can go in here.
+welcome_title = Installing the Server
diff --git a/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
new file mode 100644
index 0000000..6c53445
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
@@ -0,0 +1,23 @@
+### RHQ Server Configuration Properties
+### These should match the actual property names in rhq-server.properties.
+
+# Database
+rhq.server.database.connection-url=Database Connection URL
+rhq.server.database.user-name=Database Username
+rhq.server.database.password=Database Password
+rhq.server.database.type-mapping=Database Type
+
+# High Availability (HA)
+rhq.server.high-availability.name=Server Name
+rhq.server.maintenance-mode-at-startup=Maintenance Mode At Startup
+
+# General Properties
+rhq.server.startup.web.http.port=HTTP Port
+rhq.server.startup.web.https.port=Secure HTTP Port
+
+# Embedded RHQ Agent
+rhq.server.embedded-agent.enabled=Embedded Agent Enabled
+
+# Email
+rhq.server.email.smtp-host=Email SMTP Host
+rhq.server.email.from-address=Email From Address
\ No newline at end of file
diff --git a/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator b/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
new file mode 100644
index 0000000..c64cc21
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
@@ -0,0 +1 @@
+org.rhq.enterprise.gui.installer.server.service.ManagementService
\ No newline at end of file
diff --git a/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..b970eb3
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>
diff --git a/modules/enterprise/gui/installer/src/main/webapp/index.html b/modules/enterprise/gui/installer/src/main/webapp/index.html
new file mode 100644
index 0000000..cb9016e
--- /dev/null
+++ b/modules/enterprise/gui/installer/src/main/webapp/index.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+    <!-- this forces us to emulate IE8 "quirks" mode regardless of IE browser version.  It:
+         1) Follows the SmartGWT recommendation of not declaring a DOCTYPE and instead using these meta elements.
+            http://forums.smartclient.com/showthread.php?t=15973
+         2) solves initial app load issues that we experienced on some XP and Vista/Windows7  flavors.
+    -->
+    <meta http-equiv="X-UA-Compatible" content="IE=8" />
+
+    <!-- support internationalized characters -->
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+
+    <script>
+        var search = location.search;
+        // only do this if you have not specified locale as query param
+        if(search.indexOf("locale") == -1){
+            // IE uses browserLanguage
+            var lang = navigator.language!=null ? navigator.language : navigator.browserLanguage;
+            var lang = lang.replace("-", "_");
+            document.write("<meta name='gwt:property' content='locale="+lang +"'>");
+        }
+    </script>
+
+    <title>RHQ Installer</title>
+
+    <script type="text/javascript">
+        var isomorphicDir = "org.rhq.enterprise.gui.installer.Installer/sc/";
+    </script>
+
+</head>
+<body>
+
+    <script type="text/javascript" language="javascript"
+            src="org.rhq.enterprise.gui.installer.Installer/org.rhq.enterprise.gui.installer.Installer.nocache.js"></script>
+
+    <div id="Loading-Panel" style="width: 214px; height: 90px; margin-top: 300px; margin-left: 40%; margin-right: 40%;">
+        <div style="text-align: center; border: 3px solid lightgray;">
+            Loading Installer...
+        </div>
+    </div>
+
+    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+</body>
+</html>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index ae67384..b9ca5f5 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -28,7 +28,7 @@
       </activation>
       <modules>
         <module>portal-war</module>
-        <module>installer-war</module>
+        <module>installer</module>
         <module>base-perspective-jar</module>
         <module>base-perspective-war</module>
         <!--<module>webdav-war</module>-->
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
index 5cb56a5..50566a2 100644
--- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -237,10 +237,10 @@
         <touch file="${jboss.deploy.dir}/${rhq.earName}.skipdeploy" />
 
         <echo>Deploying installer webapp ...</echo>
-        <mkdir dir="${jboss.deploy.dir}/rhq-gwt-installer-war.war" />
-        <unwar src="${settings.localRepository}/org/rhq/rhq-gwt-installer-war/${rhq.version}/rhq-gwt-installer-war-${rhq.version}.war"
-               dest="${jboss.deploy.dir}/rhq-gwt-installer-war.war" />
-        <touch file="${jboss.deploy.dir}/rhq-gwt-installer-war.war.dodeploy" />
+        <mkdir dir="${jboss.deploy.dir}/rhq-installer.war" />
+        <unwar src="${settings.localRepository}/org/rhq/rhq-installer/${rhq.version}/rhq-installer-${rhq.version}.war"
+               dest="${jboss.deploy.dir}/rhq-installer.war" />
+        <touch file="${jboss.deploy.dir}/rhq-installer.war.dodeploy" />
 
         <!-- TODO: deploy embedded agent sar -->
         <!--


commit 475638187f64a558f92fb088c681e6c4ba24b957
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Aug 1 19:15:38 2012 -0400

    get the rhq server on as7 running on windows using the java service wrapper - i tested this successfully on win xp, both in console mode and installed as a service

diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf
index 9fef419..bf75086 100644
--- a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf
@@ -42,23 +42,23 @@ wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
 
 # Java Classpath (include wrapper.jar). Add classpath elements starting at 1 (quotes not needed)
 wrapper.java.classpath.1=%RHQ_SERVER_HOME%/bin/wrapper/%RHQ_SERVER_OS_PLATFORM%/wrapper.jar
+wrapper.java.classpath.2=%RHQ_SERVER_HOME%/jbossas/jboss-modules.jar
 
 # Java Library Path (location of wrapper.dll/libwrapper.so and other JNI libs) (quotes not needed)
 wrapper.java.library.path.1=%RHQ_SERVER_HOME%/bin/wrapper/%RHQ_SERVER_OS_PLATFORM%
 
 # The RHQ Server starts the JBossAS container
-wrapper.app.parameter.1=-jar
-wrapper.app.parameter.2="%RHQ_SERVER_HOME%/jbossas/jboss-modules.jar"
+wrapper.app.parameter.1=org.jboss.modules.Main
 
 # Additional command line arguments to be passed to the RHQ Server/JBossAS container (quotes ARE needed)
-wrapper.app.parameter.3=-mp
-wrapper.app.parameter.4="%RHQ_SERVER_HOME%/jbossas/modules"
-wrapper.app.parameter.5=-jaxpmodule
-wrapper.app.parameter.6=javax.xml.jaxp-provider
-wrapper.app.parameter.7=org.jboss.as.standalone
-wrapper.app.parameter.8="-Djboss.home.dir=%RHQ_SERVER_HOME%/jbossas"
-wrapper.app.parameter.9=-P
-wrapper.app.parameter.10="%RHQ_SERVER_HOME%/bin/rhq-server.properties"
+wrapper.app.parameter.2=-mp
+wrapper.app.parameter.3="%RHQ_SERVER_HOME%/jbossas/modules"
+wrapper.app.parameter.4=-jaxpmodule
+wrapper.app.parameter.5=javax.xml.jaxp-provider
+wrapper.app.parameter.6=org.jboss.as.standalone
+wrapper.app.parameter.7="-Djboss.home.dir=%RHQ_SERVER_HOME%/jbossas"
+wrapper.app.parameter.8=-P
+wrapper.app.parameter.9="%RHQ_SERVER_HOME%/bin/rhq-server.properties"
 
 # Additional JVM parameters (quotes ARE needed)
 wrapper.java.additional.1="-D[Standalone]"
@@ -68,23 +68,25 @@ wrapper.java.additional.4=-Xms1024M
 wrapper.java.additional.5=-Xmx1024M
 wrapper.java.additional.6=-XX:PermSize=256M
 wrapper.java.additional.7=-XX:MaxPermSize=256M
-wrapper.java.additional.8=-XX:+TieredCompilation
-wrapper.java.additional.9=-XX:+UseCompressedOops
-wrapper.java.additional.10=-Djava.net.preferIPv4Stack=true
-wrapper.java.additional.11=-Dorg.jboss.resolver.warning=true
-wrapper.java.additional.12=-Dsun.rmi.dgc.client.gcInterval=3600000
-wrapper.java.additional.13=-Dsun.rmi.dgc.server.gcInterval=3600000
-wrapper.java.additional.14=-Djboss.modules.system.pkgs=org.jboss.byteman
-wrapper.java.additional.15=-Djava.awt.headless=true
-wrapper.java.additional.16=-Djboss.server.default.config=standalone.xml
-wrapper.java.additional.17="-Dorg.jboss.boot.log.file=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%/jbossas-boot.log"
-wrapper.java.additional.18="-Dlogging.configuration=file:%RHQ_SERVER_HOME%/jbossas/standalone/configuration/logging.properties"
-wrapper.java.additional.19=-Dsun.lang.ClassLoader.allowArraySyntax=true
-wrapper.java.additional.20=-Djava.security.manager
+wrapper.java.additional.8=-Djava.net.preferIPv4Stack=true
+wrapper.java.additional.9=-Dorg.jboss.resolver.warning=true
+wrapper.java.additional.10=-Dsun.rmi.dgc.client.gcInterval=3600000
+wrapper.java.additional.11=-Dsun.rmi.dgc.server.gcInterval=3600000
+wrapper.java.additional.12=-Djboss.modules.system.pkgs=org.jboss.byteman
+wrapper.java.additional.13=-Djava.awt.headless=true
+wrapper.java.additional.14=-Djboss.server.default.config=standalone.xml
+wrapper.java.additional.15="-Dorg.jboss.boot.log.file=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%/jbossas-boot.log"
+wrapper.java.additional.16="-Djboss.server.log.dir=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%"
+wrapper.java.additional.17="-Dlogging.configuration=file:%RHQ_SERVER_HOME%/jbossas/standalone/configuration/logging.properties"
+wrapper.java.additional.18=-Dsun.lang.ClassLoader.allowArraySyntax=true
+wrapper.java.additional.19=-Djava.security.manager
 # the double equals for the policy file specification IS INTENTIONAL
-wrapper.java.additional.21="-Djava.security.policy==%RHQ_SERVER_HOME%/bin/rhq-server.security-policy"
+wrapper.java.additional.20="-Djava.security.policy==%RHQ_SERVER_HOME%/bin/rhq-server.security-policy"
+# use these if your JVM supports it
+#wrapper.java.additional.21=-XX:+TieredCompilation
+#wrapper.java.additional.22=-XX:+UseCompressedOops
 # Don't need these now, but this is commented out in case we need to add an endorsed dir in the future
-#wrapper.java.additional.22="-Djava.endorsed.dirs=%RHQ_SERVER_HOME%/jbossas/lib/endorsed"
+#wrapper.java.additional.23="-Djava.endorsed.dirs=%RHQ_SERVER_HOME%/jbossas/lib/endorsed"
 
 # We want to make sure the Server starts in the JBossAS bin directory
 wrapper.working.dir=%RHQ_SERVER_HOME%/jbossas/bin
diff --git a/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc b/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc
index 7bd2e8a..86f0c71 100644
--- a/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc
+++ b/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc
@@ -3,12 +3,12 @@
 #
 
 # enable remote debugging
-wrapper.java.additional.22=-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
+wrapper.java.additional.21=-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
 
 # enable jprofiler
 #set.PATH=%PATH%;<jprofiler-install-dir>\bin\windows
-#wrapper.java.additional.23=-agentlib:jprofilerti=port=8849
-#wrapper.java.additional.24=-Xbootclasspath/a:<jprofiler-install-dir>\bin\agent.jar
+#wrapper.java.additional.22=-agentlib:jprofilerti=port=8849
+#wrapper.java.additional.23=-Xbootclasspath/a:<jprofiler-install-dir>\bin\agent.jar
 
 # disable JVM startup timeout
 wrapper.startup.timeout=0


commit f27fb1acd84261dbf24927378c2082969978971f
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Aug 1 17:39:17 2012 -0400

    more container build stuff

diff --git a/modules/enterprise/server/appserver/src/main/downloadable-resources/cli-alert-scripts/fix-bundle-deployment.js b/modules/enterprise/server/appserver/src/main/downloadable-resources/cli-alert-scripts/fix-bundle-deployment.js
new file mode 100644
index 0000000..5dba002
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/downloadable-resources/cli-alert-scripts/fix-bundle-deployment.js
@@ -0,0 +1,484 @@
+/**
+ * Using this script one can automatically reset a bundle deployment to a specified version.
+ * 
+ * This script consists of several utility methods originally included in standalone files
+ * in the samples of the CLI distribution, which have been included in this file so that it
+ * is usable on its own even in the server environment.
+ * 
+ * The configuration of the bundle and its version to reset to is located at the top of this file. 
+ * Please provide the values to the variables as instructed to make this script work in 
+ * a concrete situation.
+ */
+
+//----------------------------- script configuration
+
+/**
+ * Replace the "null" with the ID of the bundle destination you want to reset.
+ * 
+ * The ID of the destination can be determined from the URL. If you navigate to 
+ * some destination of a bundle, the destination ID is the number at the very
+ * end of the URL in the address bar of your browser. 
+ * 
+ * It can also be determined programmatically using the remote API of the RHQ 
+ * server but that is beyond the scope of this comment. 
+ */
+var destinationId = null; 
+
+/**
+ * Replace the "null" with the ID of the bundle version the deployment should be reset to.
+ * 
+ * As with the destinations, the ID of a bundle version can be determined in the GUI by
+ * examining the URL. If you navigate to some version of a bundle, the bundle version ID is
+ * the very last number in the URL in the address bar of the browser. 
+ */
+var bundleVersionId = null;
+
+/**
+ * A deployment of the bundle version may require configuration. 
+ * Normally, this can be provided as a simple javascript object (using the curly braces notation). 
+ * Each key in the object corresponds to a name of one "rhq:input-property" in the
+ * recipe of the bundle.
+ * 
+ * For example, if your deploy.xml recipe contains the following input properties:
+ * 
+ * <rhq:input-property type="string" name="my-string-property" />
+ * <rhq:input-property type="boolean" name="my-bool-property" />
+ * <rhq:input-property type="integer" name="my-int-property" />
+ * 
+ * You would provide values for those properties as:
+ * 
+ * var deploymentConfig = {
+ *     "my-string-property" : "value",
+ *     "my-bool-property" : false,
+ *     "my-int-property" : 42
+ * };
+ * 
+ * 
+ * Note that the bundle recipes support only a limited set of types of these properties.
+ * Please consult the provisioning subsystem documentation for a complete coverage of the bundle recipe
+ * capabilities.
+ */
+var deploymentConfig = null;
+
+/**
+ * The description of the deployment that will be performed.
+ */
+var description = "redeploy due to drift";
+
+// DO NOT TOUCH THIS UNLESS YOU FULLY UNDERSTAND WHAT YOU ARE DOING.
+// NOTE: It's essential that isCleanDeployment=true, otherwise files that have drifted will not be replaced with their
+//       original versions from the bundle.
+var isCleanDeployment = true;
+
+//-------------------- util.js 
+
+/**
+ * If obj is a JS array or a java.util.Collection, each element is passed to
+ * the callback function. If obj is a java.util.Map, each map entry is passed
+ * to the callback function as a key/value pair. If obj is none of the
+ * aforementioned types, it is treated as a generic object and each of its
+ * properties is passed to the callback function as a name/value pair.
+ */
+function foreach(obj, fn) {
+  if (obj instanceof Array) {
+    for (i in obj) {
+      fn(obj[i]);
+    }
+  }
+  else if (obj instanceof java.util.Collection) {
+    var iterator = obj.iterator();
+    while (iterator.hasNext()) {
+      fn(iterator.next());
+    }
+  }
+  else if (obj instanceof java.util.Map) {
+    var iterator = obj.entrySet().iterator()
+    while (iterator.hasNext()) {
+      var entry = iterator.next();
+      fn(entry.key, entry.value);
+    }
+  }
+  else {   // assume we have a generic object
+    for (i in obj) {
+      fn(i, obj[i]);
+    }
+  }
+}
+
+/**
+ * Iterates over obj similar to foreach. fn should be a predicate that evaluates
+ * to true or false. The first match that is found is returned.
+ */
+function find(obj, fn) {
+  if (obj instanceof Array) {
+    for (i in obj) {
+      if (fn(obj[i])) {
+        return obj[i]
+      }
+    }
+  }
+  else if (obj instanceof java.util.Collection) {
+    var iterator = obj.iterator();
+    while (iterator.hasNext()) {
+      var next = iterator.next();
+      if (fn(next)) {
+        return next;
+      }
+    }
+  }
+  else if (obj instanceof java.util.Map) {
+    var iterator = obj.entrySet().iterator();
+    while (iterator.hasNext()) {
+      var entry = iterator.next();
+      if (fn(entry.key, entry.value)) {
+        return {key: entry.key, value: entry.value};
+      }
+    }
+  }
+  else {
+    for (i in obj) {
+      if (fn(i, obj[i])) {
+        return {key: i, value: obj[i]};
+      }
+    }
+  }
+  return null;
+}
+
+/**
+ * Iterates over obj similar to foreach. fn should be a predicate that evaluates
+ * to true or false. All of the matches are returned in a java.util.List.
+ */
+function findAll(obj, fn) {
+  var matches = java.util.ArrayList();
+  if ((obj instanceof Array) || (obj instanceof java.util.Collection)) {
+    foreach(obj, function(element) {
+      if (fn(element)) {
+        matches.add(element);
+      }
+    });
+  }
+  else {
+    foreach(obj, function(key, value) {
+      if (fn(theKey, theValue)) {
+        matches.add({key: theKey, value: theValue});
+      }
+    });
+  }
+  return matches;
+}
+
+/**
+ * A convenience function to convert javascript hashes into RHQ's configuration
+ * objects.
+ * <p>
+ * The conversion of individual keys in the hash follows these rules:
+ * <ol>
+ * <li> if a value of a key is a javascript array, it is interpreted as PropertyList
+ * <li> if a value is a hash, it is interpreted as a PropertyMap
+ * <li> otherwise it is interpreted as a PropertySimple
+ * <li> a null or undefined value is ignored
+ * </ol>
+ * <p>
+ * Note that the conversion isn't perfect, because the hash does not contain enough
+ * information to restore the names of the list members.
+ * <p>
+ * Example: <br/>
+ * <pre><code>
+ * {
+ *   simple : "value",
+ *   list : [ "value1", "value2"],
+ *   listOfMaps : [ { k1 : "value", k2 : "value" }, { k1 : "value2", k2 : "value2" } ]
+ * }
+ * </code></pre>
+ * gets converted to a configuration object:
+ * Configuration:
+ * <ul>
+ * <li> PropertySimple(name = "simple", value = "value")
+ * <li> PropertyList(name = "list")
+ *      <ol>
+ *      <li>PropertySimple(name = "list", value = "value1")
+ *      <li>PropertySimple(name = "list", value = "value2")
+ *      </ol>
+ * <li> PropertyList(name = "listOfMaps")
+ *      <ol>
+ *      <li> PropertyMap(name = "listOfMaps")
+ *           <ul>
+ *           <li>PropertySimple(name = "k1", value = "value")
+ *           <li>PropertySimple(name = "k2", value = "value")
+ *           </ul>
+ *      <li> PropertyMap(name = "listOfMaps")
+ *           <ul>
+ *           <li>PropertySimple(name = "k1", value = "value2")
+ *           <li>PropertySimple(name = "k2", value = "value2")
+ *           </ul>
+ *      </ol>
+ * </ul>
+ * Notice that the members of the list have the same name as the list itself
+ * which generally is not the case.
+ */
+function asConfiguration(hash) {
+
+	config = new Configuration;
+
+	for(key in hash) {
+		value = hash[key];
+
+		if (value == null) {
+			continue;
+		}
+
+		(function(parent, key, value) {
+			function isArray(obj) {
+				return typeof(obj) == 'object' && (obj instanceof Array);
+			}
+
+			function isHash(obj) {
+				return typeof(obj) == 'object' && !(obj instanceof Array);
+			}
+
+			function isPrimitive(obj) {
+				return typeof(obj) != 'object';
+			}
+
+			//this is an anonymous function, so the only way it can call itself
+			//is by getting its reference via argument.callee. Let's just assign
+			//a shorter name for it.
+			var me = arguments.callee;
+
+			var prop = null;
+
+			if (isPrimitive(value)) {
+				prop = new PropertySimple(key, new java.lang.String(value));
+			} else if (isArray(value)) {
+				prop = new PropertyList(key);
+				for(var i = 0; i < value.length; ++i) {
+					var v = value[i];
+					if (v != null) {
+						me(prop, key, v);
+					}
+				}
+			} else if (isHash(value)) {
+				prop = new PropertyMap(key);
+				for(var i in value) {
+					var v = value[i];
+					if (value != null) {
+						me(prop, i, v);
+					}
+				}
+			}
+
+			if (parent instanceof PropertyList) {
+				parent.add(prop);
+			} else {
+				parent.put(prop);
+			}
+		})(config, key, value);
+	}
+
+	return config;
+}
+
+/**
+ * Opposite of <code>asConfiguration</code>. Converts an RHQ's configuration object
+ * into a javascript hash.
+ *
+ * @param configuration
+ */
+function asHash(configuration) {
+	ret = {}
+
+	iterator = configuration.getMap().values().iterator();
+	while(iterator.hasNext()) {
+		prop = iterator.next();
+
+		(function(parent, prop) {
+			function isArray(obj) {
+				return typeof(obj) == 'object' && (obj instanceof Array);
+			}
+
+			function isHash(obj) {
+				return typeof(obj) == 'object' && !(obj instanceof Array);
+			}
+
+			var me = arguments.callee;
+
+			var representation = null;
+
+			if (prop instanceof PropertySimple) {
+				representation = prop.stringValue;
+			} else if (prop instanceof PropertyList) {
+				representation = [];
+
+				for(var i = 0; i < prop.list.size(); ++i) {
+					var child = prop.list.get(i);
+					me(representation, child);
+				}
+			} else if (prop instanceof PropertyMap) {
+				representation = {};
+
+				var childIterator = prop.getMap().values().iterator();
+				while(childIterator.hasNext()) {
+					var child = childIterator.next();
+
+					me(representation, child);
+				}
+			}
+
+			if (isArray(parent)) {
+				parent.push(representation);
+			} else if (isHash(parent)) {
+				parent[prop.name] = representation;
+			}
+		})(ret, prop);
+	}
+	(function(parent) {
+
+	})(configuration);
+
+	return ret;
+}
+
+//------------------------------ bundles.js
+
+/**
+ * A simple function to create a new bundle version from a zip file containing
+ * the bundle.
+ * 
+ * @param pathToBundleZipFile the path to the bundle on the local file system
+ * 
+ * @return an instance of BundleVersion class describing what's been created on 
+ * the RHQ server.
+ */
+function createBundleVersion(pathToBundleZipFile) {
+	var bytes = getFileBytes(pathToBundleZipFile)
+	return BundleManager.createBundleVersionViaByteArray(bytes)
+}
+
+/**
+ * This is a helper function that one can use to find out what base directories
+ * given resource type defines.
+ * <p>
+ * These base directories then can be used when specifying bundle destinations.
+ * 
+ * @param resourceTypeId
+ * @returns a java.util.Set of ResourceTypeBundleConfiguration objects
+ */
+function getAllBaseDirectories(resourceTypeId) {
+	var crit = new ResourceTypeCriteria;
+	crit.addFilterId(resourceTypeId);
+	crit.fetchBundleConfiguration(true);
+	
+	var types = ResourceTypeManager.findResourceTypesByCriteria(crit);
+	
+	if (types.size() == 0) {
+		throw "Could not find a resource type with id " + resourceTypeId;
+	} else if (types.size() > 1) {
+		throw "More than one resource type found with id " + resourceTypeId + "! How did that happen!";
+	}
+	
+	var type = types.get(0);
+	
+	return type.getResourceTypeBundleConfiguration().getBundleDestinationBaseDirectories();
+}
+
+/**
+ * Creates a new destination for given bundle. Once a destination exists,
+ * actual bundle versions can be deployed to it.
+ * <p>
+ * Note that this only differs from the <code>BundleManager.createBundleDestination</code>
+ * method in the fact that one can provide bundle and resource group names instead of their
+ * ids.
+ * 
+ * @param destinationName the name of the destination to be created
+ * @param description the description for the destination
+ * @param bundleName the name of the bundle to create the destination for
+ * @param groupName name of a group of resources that the destination will handle
+ * @param baseDirName the name of the basedir definition that represents where inside the 
+ *                    deployment of the individual resources the bundle will get deployed
+ * @param deployDir the specific sub directory of the base dir where the bundles will get deployed
+ * 
+ * @return BundleDestination object
+ */
+function createBundleDestination(destinationName, description, bundleName, groupName, baseDirName, deployDir) {
+	var groupCrit = new ResourceGroupCriteria;
+	groupCrit.addFilterName(groupName);
+	var groups = ResourceGroupManager.findResourceGroupsByCriteria(groupCrit);
+	
+	if (groups.empty) {
+		throw "No group called '" + groupName + "' found.";
+	}
+	
+	var group = groups.get(0);
+	
+	var bundleCrit = new BundleCriteria;
+	bundleCrit.addFilterName(bundleName);
+	var bundles = BundleManager.findBundlesByCriteria(bundleCrit);
+	
+	if (bundles.empty) {
+		throw "No bundle called '" + bundleName + "' found.";
+	}
+	
+	var bundle = bundles.get(0);
+	
+	return BundleManager.createBundleDestination(bundle.id, destinationName, description, baseDirName, deployDir, group.id);
+}
+
+/**
+ * Tries to deploy given bundle version to provided destination using given configuration.
+ * <p>
+ * This method blocks while waiting for the deployment to complete or fail.
+ * 
+ * @param destination the bundle destination (or id thereof)
+ * @param bundleVersion the bundle version to deploy (or id thereof)
+ * @param deploymentConfiguration the deployment configuration. This can be an ordinary
+ * javascript object (hash) or an instance of RHQ's Configuration. If it is the former,
+ * it is converted to a Configuration instance using the <code>asConfiguration</code>
+ * function from <code>util.js</code>. Please consult the documentation of that method
+ * to understand the limitations of that approach.
+ * @param description the deployment description
+ * @param isCleanDeployment if true, perform a wipe of the deploy directory prior to the deployment; if false,
+ * perform as an upgrade to the existing deployment, if any
+ * 
+ * @return the BundleDeployment instance describing the deployment
+ */
+function deployBundle(destination, bundleVersion, deploymentConfiguration, description, isCleanDeployment) {
+	var destinationId = destination;
+	if (typeof(destination) == 'object') {
+		destinationId = destination.id;
+	}
+	
+	var bundleVersionId = bundleVersion;
+	if (typeof(bundleVersion) == 'object') {
+		bundleVersionId = bundleVersion.id;
+	}
+	
+	var deploymentConfig = deploymentConfiguration;
+	if (!(deploymentConfiguration instanceof Configuration)) {
+		deploymentConfig = asConfiguration(deploymentConfiguration);
+	}
+	
+	var deployment = BundleManager.createBundleDeployment(bundleVersionId, destinationId, description, deploymentConfig);
+	
+	deployment = BundleManager.scheduleBundleDeployment(deployment.id, isCleanDeployment);
+	
+	var crit = new BundleDeploymentCriteria;
+	crit.addFilterId(deployment.id);
+	
+	while (deployment.status == BundleDeploymentStatus.PENDING || deployment.status == BundleDeploymentStatus.IN_PROGRESS) {
+		java.lang.Thread.currentThread().sleep(1000);
+		var dps = BundleManager.findBundleDeploymentsByCriteria(crit);
+		if (dps.empty) {
+			throw "The deployment disappeared while we were waiting for it to complete.";
+		}
+		
+		deployment = dps.get(0);
+	}
+	
+	return deployment;
+}
+
+//------------------- script body
+
+deployBundle(destinationId, bundleVersionId, deploymentConfig, description, isCleanDeployment);
+
diff --git a/modules/enterprise/server/appserver/src/main/downloadable-resources/connectors/README.txt b/modules/enterprise/server/appserver/src/main/downloadable-resources/connectors/README.txt
new file mode 100644
index 0000000..c1dc783
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/downloadable-resources/connectors/README.txt
@@ -0,0 +1,22 @@
+This directory contains connectors that instrument various products to expose
+monitoring data. This monitoring data can then be accessed by the RHQ plugins
+corresponding to those products.
+
+HTTP Response Time Filter
+--------------------------
+This is a servlet filter that can measure response times for HTTP requests
+made to servlets and write the response times to a logfile. The filter is
+compatible with any servlet 2.4 or later container running on Java 1.4 or 
+later. However, since upport for parsing the response time logfiles is
+only provided by the jboss-as, jboss-as-5, jboss-as-7, and tomcat RHQ 
+plugins, it typically is only of value to deploy the filter to JBoss AS
+or Tomcat.
+
+Note, a commons-logging jar is supplied for use with Tomcat 6. It is not 
+required for earlier versions of Tomcat, since they already include that jar.
+
+For details on how to deploy the filter to various versions of JBoss AS and
+Tomcat, see:
+
+https://docs.jboss.org/author/display/RHQ/Managed+Product+Configuration
+
diff --git a/modules/enterprise/server/appserver/src/main/resources/alert-scripts/README.txt b/modules/enterprise/server/appserver/src/main/resources/alert-scripts/README.txt
new file mode 100644
index 0000000..7675cbf
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/alert-scripts/README.txt
@@ -0,0 +1,2 @@
+This directory contains scripts for the scriptlang alert sender.
+Currently JRuby and JavaScript are supported.
\ No newline at end of file
diff --git a/modules/enterprise/server/appserver/src/main/resources/alert-scripts/example.rb b/modules/enterprise/server/appserver/src/main/resources/alert-scripts/example.rb
new file mode 100644
index 0000000..3a01100
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/alert-scripts/example.rb
@@ -0,0 +1,16 @@
+
+require 'java'
+
+def sendAlert(alert, url, conditions)
+
+  puts alert.alertDefinition.name
+  puts url
+  puts conditions
+
+  result = org.rhq.enterprise.server.plugin.pc.alert.SenderResult.new
+  state = org.rhq.enterprise.server.plugin.pc.alert.ResultState::SUCCESS
+  result.setState(state)
+  result.setMessage("Sending via ruby succeeded")
+
+  return result
+end
\ No newline at end of file
diff --git a/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt b/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
new file mode 100644
index 0000000..ced6071
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
@@ -0,0 +1,135 @@
+RHQ-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, snmpModules, enterprises
+        FROM SNMPv2-SMI
+    coldStart
+        FROM SNMPv2-MIB
+    OBJECT-GROUP, NOTIFICATION-GROUP, MODULE-COMPLIANCE
+        FROM SNMPv2-CONF
+    DisplayString
+        FROM SNMPv2-TC;
+
+rhqMIB MODULE-IDENTITY
+    LAST-UPDATED    "201112200000Z"
+    ORGANIZATION    "RHQ-Project"
+    CONTACT-INFO    "http://www.jboss.org/rhq"
+    DESCRIPTION
+        "The MIB module for RHQ alerts.
+
+        This file is part of the RHQ management platform
+        Copyright (C) 2005-2012 Red Hat, Inc.
+        All rights reserved.
+    "
+
+    REVISION        "200807110000Z"
+    DESCRIPTION     "Initial version"
+    REVISION        "201010180000Z"
+    DESCRIPTION     "Better trap support"
+    REVISION        "201112200000Z"
+    DESCRIPTION     "Also emit resource lineage"
+    ::= { snmpModules 1 }
+
+jboss       OBJECT IDENTIFIER ::= {enterprises 18016 }
+
+rhq         OBJECT IDENTIFIER ::= {jboss 2 }
+
+alert       OBJECT IDENTIFIER ::= {rhq 1 }
+
+
+alertName OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The name of the alert definition for this alert"
+    ::= { alert 1 }
+
+alertResourceName   OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The name of the resource that triggered the alert"
+    ::= { alert 2 }
+
+
+alertPlatformName      OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The name of the platform hosting the resource"
+    ::= { alert 3 }
+
+
+alertCondition      OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..4096))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The conditions leading to the alert"
+    ::= { alert 4 }
+
+alertSeverity       OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "Severity of the alert."
+    ::= { alert 5 }
+
+alertUrl        OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..1024))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The url of the individual alert"
+    ::= { alert 6 }
+
+alertHierarchy        OBJECT-TYPE
+    SYNTAX      DisplayString (SIZE (0..1024))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "The hierarchy of the resource that triggered the alert"
+    ::= { alert 6 }
+
+-- conformance information
+
+snmpMIBConformance
+               OBJECT IDENTIFIER ::= { rhqMIB 2 }
+
+snmpMIBCompliances
+               OBJECT IDENTIFIER ::= { snmpMIBConformance 1 }
+snmpMIBGroups  OBJECT IDENTIFIER ::= { snmpMIBConformance 2 }
+
+-- compliance statements
+
+snmpBasicCompliance MODULE-COMPLIANCE
+    STATUS  current
+    DESCRIPTION "TODO"
+    MODULE
+        MANDATORY-GROUPS { alertGroup, trapGroup }
+
+    ::= { snmpMIBCompliances 2 }
+
+alertGroup OBJECT-GROUP
+    OBJECTS {   alertName,
+                alertResourceName,
+                alertPlatformName,
+                alertCondition,
+                alertSeverity,
+                alertUrl,
+                alertHierarchy }
+    STATUS  current
+    DESCRIPTION "A collection of objects providing information about an alert"
+    ::= { snmpMIBGroups 1 }
+
+trapGroup NOTIFICATION-GROUP
+    NOTIFICATIONS { coldStart }
+    STATUS  current
+    DESCRIPTION "A collection of notifications for alerts"
+    ::= { snmpMIBGroups 2 }
+
+END
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war.skipdeploy b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war.skipdeploy
new file mode 100644
index 0000000..e69de29
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/jboss-web.xml b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..493bdbf
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/jboss-web.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<jboss-web>
+   <context-root>/installer</context-root>
+</jboss-web>
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/web.xml b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/web.xml
new file mode 100644
index 0000000..c6bd385
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/WEB-INF/web.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
+
+   <display-name>Post Installer Notification</display-name>
+   <description>Post Installer Notification</description>
+
+   <mime-mapping> 
+      <extension>jsf</extension> 
+      <mime-type>text/html</mime-type> 
+   </mime-mapping>
+
+   <welcome-file-list>
+      <welcome-file>/index.html</welcome-file>
+   </welcome-file-list>
+
+</web-app>
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/index.html b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/index.html
new file mode 100644
index 0000000..5da4047
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>The Server Is Installed!</title>
+
+<meta http-equiv="Pragma"        content="no-cache" />
+<meta http-equiv="Expires"       content="-1" />
+<meta http-equiv="Cache-control" content="no-cache" />
+
+</head>
+<body>
+   <p>&nbsp;</p>
+   <h1 align="center">The Server Is Installed!</h1>
+   <p align="center"><a href="/coregui">Click here to get started!</a></p>
+</body>
+</html>
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/start.jsf b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/start.jsf
new file mode 100644
index 0000000..7463e8f
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/start.jsf
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>The Server Is Installed!</title>
+
+</head>
+<body>
+   <p>&nbsp;</p>
+   <h1 align="center">The Server Is Installed!</h1>
+   <p align="center"><a href="/coregui">Click here to get started!</a></p>
+</body>
+</html>
diff --git a/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/welcome.jsf b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/welcome.jsf
new file mode 100644
index 0000000..7463e8f
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/jbossas/standalone/deployments/rhq-postinstaller.war/welcome.jsf
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>The Server Is Installed!</title>
+
+</head>
+<body>
+   <p>&nbsp;</p>
+   <h1 align="center">The Server Is Installed!</h1>
+   <p align="center"><a href="/coregui">Click here to get started!</a></p>
+</body>
+</html>
diff --git a/modules/enterprise/server/appserver/src/main/resources/plugins/README.txt b/modules/enterprise/server/appserver/src/main/resources/plugins/README.txt
new file mode 100644
index 0000000..8189194
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/resources/plugins/README.txt
@@ -0,0 +1,7 @@
+You can copy agent plugins or server plugins to this directory.
+
+When the server is running, it will periodically scan this
+directory and hot-deploy the plugins it finds.
+
+The jar files will be removed from this directory after they have
+been detected.
\ No newline at end of file
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
index eded774..5cb56a5 100644
--- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -199,10 +199,27 @@
         <delete dir="${jboss.home}/standalone/tmp" />
         <delete dir="${jboss.home}/standalone/work" /> <!-- TODO: does AS7 still have this? -->
 
-        <echo>Delete unused configurations</echo>
-        <delete file="${jboss.home}/standalone/configuration/standalone-ha.xml" />
-        <delete file="${jboss.home}/standalone/configuration/standalone-full.xml" />
-        <delete file="${jboss.home}/standalone/configuration/standalone-full-ha.xml" />
+        <echo>Delete unused configurations and other files</echo>
+        <delete>
+            <fileset dir="${jboss.home}/standalone/configuration">
+                <include name="standalone-ha.xml" />
+                <include name="standalone-full.xml" />
+                <include name="standalone-full-ha.xml" />
+            </fileset>
+        </delete>
+        <delete>
+            <fileset dir="${jboss.home}/bin/">
+                <include name="add-user.*" />
+                <include name="appclient.*" />
+                <include name="domain.*" />
+                <include name="jconsole.*" />
+                <include name="run.*" />
+                <include name="vault.*" />
+                <include name="wsconsume.*" />
+                <include name="wsprovide.*" />
+            </fileset>
+        </delete>
+        <delete dir="${jboss.home}/bin/init.d" />
 
         <!-- TODO: we need to put Quartz in the ear and deploy a scheduler sar -->
         <!--
@@ -217,11 +234,13 @@
         <mkdir dir="${jboss.deploy.dir}/${rhq.earName}" />
         <unjar src="${settings.localRepository}/org/rhq/rhq-enterprise-server-ear/${rhq.version}/rhq-enterprise-server-ear-${rhq.version}.ear"
                dest="${jboss.deploy.dir}/${rhq.earName}" />
+        <touch file="${jboss.deploy.dir}/${rhq.earName}.skipdeploy" />
 
         <echo>Deploying installer webapp ...</echo>
-        <mkdir dir="${jboss.deploy.dir}/rhq-installer.war" />
-        <unwar src="${settings.localRepository}/org/rhq/rhq-installer/${rhq.version}/rhq-installer-${rhq.version}.war"
-               dest="${jboss.deploy.dir}/rhq-installer.war" />
+        <mkdir dir="${jboss.deploy.dir}/rhq-gwt-installer-war.war" />
+        <unwar src="${settings.localRepository}/org/rhq/rhq-gwt-installer-war/${rhq.version}/rhq-gwt-installer-war-${rhq.version}.war"
+               dest="${jboss.deploy.dir}/rhq-gwt-installer-war.war" />
+        <touch file="${jboss.deploy.dir}/rhq-gwt-installer-war.war.dodeploy" />
 
         <!-- TODO: deploy embedded agent sar -->
         <!--
@@ -556,6 +575,8 @@ rhq.autoinstall.public-endpoint-address=
 
     <target name="developer-release-message" if="predeploy">
         <echo>!!THIS IS A DEVELOPER CONTAINER BUILD - PRE-DEPLOYING RHQ SERVER!!</echo>
+        <!-- TODO I don't think we can skip the installer stage - but we can turn on auto-installation -->
+        <!-- So in here we should set rhq.autoinstall.enabled=true in rhq-server.properties --> 
     </target>
 
     <!-- TODO: when we ship with an embedded agent -->


commit acec459a3a8f077a6416061abd79ec34e58c0e09
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Aug 1 12:58:30 2012 -0400

    getting the startup scripts to work with AS7.

diff --git a/modules/enterprise/server/appserver/pom.xml b/modules/enterprise/server/appserver/pom.xml
index ee378b8..36a74a4 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -60,12 +60,6 @@
         </dependency>
 
         <dependency>
-            <groupId>jgroups</groupId>
-            <artifactId>jgroups-all</artifactId>
-            <version>2.2.9.1</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.opensymphony.quartz</groupId>
             <artifactId>quartz</artifactId>
             <!-- NOTE: version defined in root pom dependencyManagement section -->
@@ -159,8 +153,6 @@
 
                                     <!-- dev DB settings (used to init rhq-server.properties if dev profile is active or developer prop is set) -->
                                     <property name="rhq.dev.ds.connection-url"          value="${rhq.dev.ds.connection-url}" />
-                                    <property name="rhq.dev.ds.driver-class"            value="${rhq.dev.ds.driver-class}" />
-                                    <property name="rhq.dev.ds.xa-datasource-class"     value="${rhq.dev.ds.xa-datasource-class}" />
                                     <property name="rhq.dev.ds.user-name"               value="${rhq.dev.ds.user-name}" />
                                     <property name="rhq.dev.ds.password.encrypted"      value="${rhq.dev.ds.password.encrypted}" />
                                     <property name="rhq.dev.ds.type-mapping"            value="${rhq.dev.ds.type-mapping}" />
@@ -205,7 +197,7 @@
                                     <property name="developer"          value="${developer}" />
                                     <property name="rhq.earName"        value="${rhq.earName}" />
 
-                                    <!-- dev/test DB type (needed to init rhq-ds.xml) -->
+                                    <!-- dev/test DB type (TODO: do we still need this?) -->
                                     <property name="rhq.test.ds.type-mapping" value="${rhq.test.ds.type-mapping}" />
                                     <property name="rhq.dev.ds.type-mapping"  value="${rhq.dev.ds.type-mapping}" />
                                 </ant>
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.bat b/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.bat
new file mode 100644
index 0000000..a1f05b5
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.bat
@@ -0,0 +1,115 @@
+ at echo off
+
+rem ===========================================================================
+rem RHQ Server Windows Generate db password script
+rem
+rem This file is used to execute the generate a new encrypted db password.
+rem
+rem This script is customizable by setting the following environment variables:
+rem
+rem    RHQ_SERVER_DEBUG - If this is defined, the script will emit debug
+rem                       messages.
+rem                       If not set or set to "false", debug is turned off.
+rem
+rem    RHQ_SERVER_HOME - Defines where the Server's home install directory is.
+rem                      If not defined, it will be assumed to be the parent
+rem                      directory of the directory where this script lives.
+rem
+rem    RHQ_SERVER_JAVA_HOME - The location of the JRE that the Server will
+rem                           use. This will be ignored if
+rem                           RHQ_SERVER_JAVA_EXE_FILE_PATH is set.
+rem                           If this and RHQ_SERVER_JAVA_EXE_FILE_PATH are
+rem                           not set, the Server's embedded JRE will be used.
+rem
+rem    RHQ_SERVER_JAVA_EXE_FILE_PATH - Defines the full path to the Java
+rem                                    executable to use. If this is set,
+rem                                    RHQ_SERVER_JAVA_HOME is ignored.
+rem                                    If this is not set, then
+rem                                    %RHQ_SERVER_JAVA_HOME%\bin\java.exe
+rem                                    is used. If this and
+rem                                    RHQ_SERVER_JAVA_HOME are not set, the
+rem                                    Server's embedded JRE will be used.
+rem
+rem If the embedded JRE is to be used but is not available, the fallback
+rem JRE to be used will be determined by the JAVA_HOME environment variable.
+rem
+rem ===========================================================================
+
+setlocal
+
+rem if debug variable is set, it is assumed to be on, unless its value is false
+if "%RHQ_SERVER_DEBUG%" == "false" (
+   set RHQ_SERVER_DEBUG=
+)
+
+rem ----------------------------------------------------------------------
+rem Ensure password parameter is present
+rem ----------------------------------------------------------------------
+
+if /i "%1"=="" (
+   echo Usage: %0 { plainTextPassword }
+   goto :done
+)
+
+rem ----------------------------------------------------------------------
+rem Change directory so the current directory is the Server home.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_BIN_DIR_PATH=%~dp0
+
+if not defined RHQ_SERVER_HOME (
+   cd "%RHQ_SERVER_BIN_DIR_PATH%\.."
+) else (
+   cd "%RHQ_SERVER_HOME%" || (
+      echo Cannot go to the RHQ_SERVER_HOME directory: %RHQ_SERVER_HOME%
+      exit /B 1
+      )
+)
+
+set RHQ_SERVER_HOME=%CD%
+
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_HOME: %RHQ_SERVER_HOME%
+
+rem ----------------------------------------------------------------------
+rem Find the Java executable and verify we have a VM available.
+rem ----------------------------------------------------------------------
+
+if not defined RHQ_SERVER_JAVA_EXE_FILE_PATH (
+   if not defined RHQ_SERVER_JAVA_HOME call :prepare_embedded_jre
+)
+
+if not defined RHQ_SERVER_JAVA_EXE_FILE_PATH set RHQ_SERVER_JAVA_EXE_FILE_PATH=%RHQ_SERVER_JAVA_HOME%\bin\java.exe
+
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_JAVA_HOME: %RHQ_SERVER_JAVA_HOME%
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_JAVA_EXE_FILE_PATH: %RHQ_SERVER_JAVA_EXE_FILE_PATH%
+
+if not exist "%RHQ_SERVER_JAVA_EXE_FILE_PATH%" (
+   echo There is no JVM available.
+   echo Please set RHQ_SERVER_JAVA_HOME or RHQ_SERVER_JAVA_EXE_FILE_PATH appropriately.
+   exit /B 1
+)
+
+set _JB_DIR=%RHQ_SERVER_HOME%\jbossas
+"%RHQ_SERVER_JAVA_EXE_FILE_PATH%" -cp %_JB_DIR%\modules\org\picketbox\main\picketbox-4.0.7.Final.jar;%_JB_DIR%\modules\org\jboss\logging\main\jboss-logging-3.1.0.GA.jar org.picketbox.datasource.security.SecureIdentityLoginModule %1
+
+goto :done
+
+rem ----------------------------------------------------------------------
+rem CALL subroutine that prepares to use the embedded JRE
+rem ----------------------------------------------------------------------
+
+:prepare_embedded_jre
+set RHQ_SERVER_JAVA_HOME=%RHQ_SERVER_HOME%\jre
+if defined RHQ_SERVER_DEBUG echo Using the embedded JRE
+if not exist "%RHQ_SERVER_JAVA_HOME%" (
+   if defined RHQ_SERVER_DEBUG echo No embedded JRE found - will try to use JAVA_HOME: %JAVA_HOME%
+   set RHQ_SERVER_JAVA_HOME=%JAVA_HOME%
+)
+goto :eof
+
+rem ----------------------------------------------------------------------
+rem CALL subroutine that exits this script normally
+rem ----------------------------------------------------------------------
+
+:done
+endlocal
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.sh
new file mode 100755
index 0000000..0320c08
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/generate-db-password.sh
@@ -0,0 +1,159 @@
+#!/bin/sh
+
+# =============================================================================
+# RHQ Server UNIX Generate db password script
+#
+# This file is used to execute the generate a new encrypted db password.
+#
+# This script is customizable by setting the following environment variables:
+#
+#    RHQ_SERVER_HOME - Defines where the server's home install directory is.
+#                      If not defined, it will be assumed to be the parent
+#                      directory of the directory where this script lives.
+#
+#    RHQ_SERVER_JAVA_HOME - The location of the JRE that the server will
+#                           use. This will be ignored if
+#                           RHQ_SERVER_JAVA_EXE_FILE_PATH is set.
+#                           If this and RHQ_SERVER_JAVA_EXE_FILE_PATH are
+#                           not set, the Server's embedded JRE will be used.
+#
+#    RHQ_SERVER_JAVA_EXE_FILE_PATH - Defines the full path to the Java
+#                                    executable to use. If this is set,
+#                                    RHQ_SERVER_JAVA_HOME is ignored.
+#                                    If this is not set, then
+#                                    $RHQ_SERVER_JAVA_HOME/bin/java
+#                                    is used. If this and
+#                                    RHQ_SERVER_JAVA_HOME are not set, the
+#                                    Server's embedded JRE will be used.
+#
+# If the embedded JRE is to be used but is not available, the fallback
+# JRE to be used will be determined by the JAVA_HOME environment variable.
+#
+# =============================================================================
+
+# ----------------------------------------------------------------------
+# Environment variables you can set to customize the launch of the RHQ Server.
+# ----------------------------------------------------------------------
+
+# RHQ_SERVER_HOME=/path/to/server/home
+# RHQ_SERVER_DEBUG=true
+# JAVA_HOME=/path/to/java/installation
+# RHQ_SERVER_JAVA_EXE_FILE_PATH=/path/directly/to/java/executable
+# ----------------------------------------------------------------------
+# Make sure we unset any lingering JBossAS environment variables that
+# were set in the user's environment.  This might happen if the user
+# has an external JBossAS configured.
+# ----------------------------------------------------------------------
+
+unset JBOSS_HOME
+unset RUN_CONF
+unset JAVAC_JAR
+unset JBOSS_CLASSPATH
+
+# ----------------------------------------------------------------------
+# Dumps a message iff debug mode is enabled
+# ----------------------------------------------------------------------
+
+debug_msg ()
+{
+   # if debug variable is set, it is assumed to be on, unless its value is false
+   if [ "x$RHQ_SERVER_DEBUG" != "x" ]; then
+      if [ "$RHQ_SERVER_DEBUG" != "false" ]; then
+         echo $1
+      fi
+   fi
+}
+
+
+# ----------------------------------------------------------------------
+# Determine what specific platform we are running on.
+# Set some platform-specific variables.
+# ----------------------------------------------------------------------
+
+case "`uname`" in
+   CYGWIN*) _CYGWIN=true
+            ;;
+   Darwin*) _DARWIN=true
+            ;;
+   SunOS*) _SOLARIS=true
+            ;;
+   AIX*) _AIX=true
+            ;;
+esac
+
+# ----------------------------------------------------------------------
+# Determine the RHQ Server installation directory.
+# If RHQ_SERVER_HOME is not defined, we will assume we are running
+# directly from the server installation's bin directory.
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_HOME" ]; then
+   _DOLLARZERO=`readlink "$0" 2>/dev/null || echo "$0"`
+   RHQ_SERVER_HOME=`dirname "$_DOLLARZERO"`/..
+else
+   if [ ! -d "$RHQ_SERVER_HOME" ]; then
+      echo "ERROR! RHQ_SERVER_HOME is not pointing to a valid directory"
+      echo "RHQ_SERVER_HOME: $RHQ_SERVER_HOME"
+      exit 1
+   fi
+fi
+
+cd "$RHQ_SERVER_HOME"
+RHQ_SERVER_HOME=`pwd`
+
+debug_msg "RHQ_SERVER_HOME: $RHQ_SERVER_HOME"
+
+if [ ! -f "${RHQ_SERVER_HOME}/jbossas/jboss-modules.jar" ]; then
+   echo "ERROR! RHQ_SERVER_HOME is not pointing to a valid RHQ Server"
+   echo "Missing ${RHQ_SERVER_HOME}/jbossas/jboss-modules.jar"
+   exit 1
+fi
+
+# ----------------------------------------------------------------------
+# if we are on a Mac and JAVA_HOME is not set, then set it to /usr
+# as this is the default location.
+# ----------------------------------------------------------------------
+if [ -z "$JAVA_HOME" ]; then
+   if [ -n "$_DARWIN" ]; then
+     debug_msg "Running on Mac OS X, setting JAVA_HOME to /usr"
+     JAVA_HOME=/usr
+   fi
+fi
+
+
+# ----------------------------------------------------------------------
+# Find the Java executable and verify we have a VM available
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_JAVA_EXE_FILE_PATH" ]; then
+   if [ -z "$RHQ_SERVER_JAVA_HOME" ]; then
+      RHQ_SERVER_JAVA_HOME="${RHQ_SERVER_HOME}/jre"
+      debug_msg "Using the embedded JRE"
+      if [ ! -d "$RHQ_SERVER_JAVA_HOME" ]; then
+         debug_msg "No embedded JRE found - will try to use JAVA_HOME: $JAVA_HOME"
+         RHQ_SERVER_JAVA_HOME="$JAVA_HOME"
+      fi
+   fi
+   debug_msg "RHQ_SERVER_JAVA_HOME: $RHQ_SERVER_JAVA_HOME"
+   RHQ_SERVER_JAVA_EXE_FILE_PATH="${RHQ_SERVER_JAVA_HOME}/bin/java"
+fi
+debug_msg "RHQ_SERVER_JAVA_EXE_FILE_PATH: $RHQ_SERVER_JAVA_EXE_FILE_PATH"
+
+if [ ! -f "$RHQ_SERVER_JAVA_EXE_FILE_PATH" ]; then
+   echo "There is no JVM available."
+   echo "Please set RHQ_SERVER_JAVA_HOME or RHQ_SERVER_JAVA_EXE_FILE_PATH appropriately."
+   exit 1
+fi
+
+# run.sh will use JAVA as the full java command
+JAVA="$RHQ_SERVER_JAVA_EXE_FILE_PATH"
+export JAVA
+
+if [ $# -eq 0 ]
+then
+    echo "Usage generate-db-password <password>"
+    exit 1
+fi
+
+_JB_DIR=${RHQ_SERVER_HOME}/jbossas
+$JAVA -cp ${_JB_DIR}/modules/org/picketbox/main/picketbox-4.0.7.Final.jar:${_JB_DIR}/modules/org/jboss/logging/main/jboss-logging-3.1.0.GA.jar org.picketbox.datasource.security.SecureIdentityLoginModule $*
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server-console.bat b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server-console.bat
new file mode 100644
index 0000000..7f56679
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server-console.bat
@@ -0,0 +1,2 @@
+cd %~dp0
+rhq-server.bat console
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.bat b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.bat
new file mode 100644
index 0000000..f15298c
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.bat
@@ -0,0 +1,223 @@
+ at echo off
+
+rem ===========================================================================
+rem RHQ Server Windows Startup Script
+rem
+rem This file is used to install, start, stop and remove the RHQ Server Windows
+rem Service for the Windows platform.  It can also be used to start the
+rem RHQ Server in a console window. The RHQ Server is actually wrapped
+rem by the Java Service Wrapper (JSW) and it is the JSW that is the actual
+rem executable that is registered as the Windows Service.
+rem
+rem This script is customizable by setting the following environment variables:
+rem
+rem    RHQ_SERVER_DEBUG - If this is defined, the script will emit debug
+rem                       messages.
+rem                       If not set or set to "false", debug is turned off.
+rem
+rem    RHQ_SERVER_HOME - Defines where the Server's home install directory is.
+rem                      If not defined, it will be assumed to be the parent
+rem                      directory of the directory where this script lives.
+rem
+rem    RHQ_SERVER_JAVA_HOME - The location of the JRE that the Server will
+rem                           use. This will be ignored if
+rem                           RHQ_SERVER_JAVA_EXE_FILE_PATH is set.
+rem                           If this and RHQ_SERVER_JAVA_EXE_FILE_PATH are
+rem                           not set, the Server's embedded JRE will be used.
+rem
+rem    RHQ_SERVER_JAVA_EXE_FILE_PATH - Defines the full path to the Java
+rem                                    executable to use. If this is set,
+rem                                    RHQ_SERVER_JAVA_HOME is ignored.
+rem                                    If this is not set, then
+rem                                    %RHQ_SERVER_JAVA_HOME%\bin\java.exe
+rem                                    is used. If this and
+rem                                    RHQ_SERVER_JAVA_HOME are not set, the
+rem                                    Server's embedded JRE will be used.
+rem
+rem    RHQ_SERVER_INSTANCE_NAME - The name of the Windows Service; it must
+rem                               conform to the Windows Service naming
+rem                               conventions. By default, this is the
+rem                               name "rhqserver-%COMPUTERNAME%"
+rem
+rem    RHQ_SERVER_WRAPPER_LOG_DIR_PATH - The full path to the location where
+rem                                      the wrapper log file will go.
+rem
+rem    RHQ_SERVER_RUN_AS - if defined, then when the Windows Service is
+rem                        installed, the value is the domain\username of the
+rem                        user that the Windows Service will run as 
+rem                       
+rem    RHQ_SERVER_RUN_AS_ME - if defined, then when the Windows Service is
+rem                           installed, the domain\username of the
+rem                           user that the Windows Service will run as will
+rem                           be the current user (.\%USERNAME%).  This takes
+rem                           precedence over RHQ_SERVER_RUN_AS.
+rem                       
+rem Note that you cannot define custom Java VM parameters or command line
+rem arguments to pass to the RHQ Server standalone.sh.  If you wish to pass in 
+rem specific arguments, modify the rhq-server-wrapper.conf file.
+rem
+rem If the embedded JRE is to be used but is not available, the fallback
+rem JRE to be used will be determined by the JAVA_HOME environment variable.
+rem
+rem This script does not use the built-in JBossAS run.bat. 
+rem ===========================================================================
+
+setlocal
+
+rem if debug variable is set, it is assumed to be on, unless its value is false
+if "%RHQ_SERVER_DEBUG%" == "false" (
+   set RHQ_SERVER_DEBUG=
+)
+
+rem ----------------------------------------------------------------------
+rem Change directory so the current directory is the Server home.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_BIN_DIR_PATH=%~dp0
+
+if not defined RHQ_SERVER_HOME (
+   cd "%RHQ_SERVER_BIN_DIR_PATH%\.."
+) else (
+   cd "%RHQ_SERVER_HOME%" || (
+      echo Cannot go to the RHQ_SERVER_HOME directory: %RHQ_SERVER_HOME%
+      exit /B 1
+      )
+)
+
+set RHQ_SERVER_HOME=%CD%
+
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_HOME: %RHQ_SERVER_HOME%
+
+rem ----------------------------------------------------------------------
+rem Find the Java executable and verify we have a VM available.
+rem ----------------------------------------------------------------------
+
+if not defined RHQ_SERVER_JAVA_EXE_FILE_PATH (
+   if not defined RHQ_SERVER_JAVA_HOME call :prepare_embedded_jre
+)
+
+if not defined RHQ_SERVER_JAVA_EXE_FILE_PATH set RHQ_SERVER_JAVA_EXE_FILE_PATH=%RHQ_SERVER_JAVA_HOME%\bin\java.exe
+
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_JAVA_HOME: %RHQ_SERVER_JAVA_HOME%
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_JAVA_EXE_FILE_PATH: %RHQ_SERVER_JAVA_EXE_FILE_PATH%
+
+if not exist "%RHQ_SERVER_JAVA_EXE_FILE_PATH%" (
+   echo There is no JVM available.
+   echo Please set RHQ_SERVER_JAVA_HOME or RHQ_SERVER_JAVA_EXE_FILE_PATH appropriately.
+   exit /B 1
+)
+
+rem ----------------------------------------------------------------------
+rem Define the name used for the name of the Windows Service.
+rem If this is not defined, the name of the computer is used.
+rem ----------------------------------------------------------------------
+
+if "%RHQ_SERVER_INSTANCE_NAME%"=="" (
+   set RHQ_SERVER_INSTANCE_NAME=rhqserver-%COMPUTERNAME%
+)
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_INSTANCE_NAME: %RHQ_SERVER_INSTANCE_NAME%
+
+rem ----------------------------------------------------------------------
+rem Determine the wrapper directory.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_WRAPPER_DIR_PATH=%RHQ_SERVER_BIN_DIR_PATH%\wrapper
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_WRAPPER_DIR_PATH: %RHQ_SERVER_WRAPPER_DIR_PATH%
+
+rem ----------------------------------------------------------------------
+rem The Windows OS platform name is also the wrapper subdirectory name.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_OS_PLATFORM=windows-x86_32
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_OS_PLATFORM: %RHQ_SERVER_OS_PLATFORM%
+
+rem ----------------------------------------------------------------------
+rem Determine the wrapper executable that this script will run.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_WRAPPER_EXE_FILE_PATH=%RHQ_SERVER_WRAPPER_DIR_PATH%\%RHQ_SERVER_OS_PLATFORM%\wrapper.exe
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_WRAPPER_EXE_FILE_PATH: %RHQ_SERVER_WRAPPER_EXE_FILE_PATH%
+
+rem ----------------------------------------------------------------------
+rem Determine the Server wrapper configuration file.
+rem ----------------------------------------------------------------------
+
+set RHQ_SERVER_WRAPPER_CONF_FILE_PATH=%RHQ_SERVER_WRAPPER_DIR_PATH%\rhq-server-wrapper.conf
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_WRAPPER_CONF_FILE_PATH: %RHQ_SERVER_WRAPPER_CONF_FILE_PATH%
+
+rem ----------------------------------------------------------------------
+rem Create and configure the wrapper log directory.
+rem ----------------------------------------------------------------------
+
+if "%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%" == "" (
+   if not exist "%RHQ_SERVER_HOME%\logs" (
+      mkdir "%RHQ_SERVER_HOME%\logs"
+   )
+   set RHQ_SERVER_WRAPPER_LOG_DIR_PATH=%RHQ_SERVER_HOME%\logs
+)
+if defined RHQ_SERVER_DEBUG echo RHQ_SERVER_WRAPPER_LOG_DIR_PATH: %RHQ_SERVER_WRAPPER_LOG_DIR_PATH%
+
+rem ----------------------------------------------------------------------
+rem Determine what to do and do it.
+rem ----------------------------------------------------------------------
+
+rem Determine if there should be debug VM options passed into it.
+rem For some reason, this can't go inside another if statement.
+if defined RHQ_SERVER_DEBUG set _DEBUG_OPTS=wrapper.debug=true
+
+rem Determine what user the Windows Service will run as.
+if defined RHQ_SERVER_RUN_AS set _WRAPPER_NTSERVICE_ACCOUNT="wrapper.ntservice.account=%RHQ_SERVER_RUN_AS%"
+if defined RHQ_SERVER_RUN_AS_ME set _WRAPPER_NTSERVICE_ACCOUNT="wrapper.ntservice.account=.\%USERNAME%"
+
+if /i "%1"=="console" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -c "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%" "set.RHQ_SERVER_HOME=%RHQ_SERVER_HOME%" "set.RHQ_SERVER_INSTANCE_NAME=%RHQ_SERVER_INSTANCE_NAME%" "set.RHQ_SERVER_JAVA_EXE_FILE_PATH=%RHQ_SERVER_JAVA_EXE_FILE_PATH%" "set.RHQ_SERVER_OS_PLATFORM=%RHQ_SERVER_OS_PLATFORM%" "set.RHQ_SERVER_WRAPPER_LOG_DIR_PATH=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%" %_WRAPPER_NTSERVICE_ACCOUNT% %_DEBUG_OPTS%
+   goto done
+)
+
+if /i "%1"=="install" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -i "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%" "set.RHQ_SERVER_HOME=%RHQ_SERVER_HOME%" "set.RHQ_SERVER_INSTANCE_NAME=%RHQ_SERVER_INSTANCE_NAME%" "set.RHQ_SERVER_JAVA_EXE_FILE_PATH=%RHQ_SERVER_JAVA_EXE_FILE_PATH%" "set.RHQ_SERVER_OS_PLATFORM=%RHQ_SERVER_OS_PLATFORM%" "set.RHQ_SERVER_WRAPPER_LOG_DIR_PATH=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%" %_WRAPPER_NTSERVICE_ACCOUNT% %_DEBUG_OPTS%
+   goto done
+)
+
+if /i "%1"=="start" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -t "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%"
+   goto done
+)
+
+if /i "%1"=="stop" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -p "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%"
+   goto done
+)
+
+if /i "%1"=="remove" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -r "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%"
+   goto done
+)
+
+if /i "%1"=="status" (
+   "%RHQ_SERVER_WRAPPER_EXE_FILE_PATH%" -q "%RHQ_SERVER_WRAPPER_CONF_FILE_PATH%"
+   goto done
+)
+
+echo Usage: %0 { install ^| start ^| stop ^| remove ^| status ^| console }
+goto :done
+
+rem ----------------------------------------------------------------------
+rem CALL subroutine that prepares to use the embedded JRE
+rem ----------------------------------------------------------------------
+
+:prepare_embedded_jre
+set RHQ_SERVER_JAVA_HOME=%RHQ_SERVER_HOME%\jre
+if defined RHQ_SERVER_DEBUG echo Using the embedded JRE
+if not exist "%RHQ_SERVER_JAVA_HOME%" (
+   if defined RHQ_SERVER_DEBUG echo No embedded JRE found - will try to use JAVA_HOME: %JAVA_HOME%
+   set RHQ_SERVER_JAVA_HOME=%JAVA_HOME%
+)
+goto :eof
+
+rem ----------------------------------------------------------------------
+rem CALL subroutine that exits this script normally
+rem ----------------------------------------------------------------------
+
+:done
+endlocal
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.security-policy b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.security-policy
new file mode 100644
index 0000000..8860b47
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.security-policy
@@ -0,0 +1,10 @@
+// We need the SecurityManager installed to enable sandboxing of CLI scripts
+// but we don't define any other security measures on the RHQ server itself.
+//
+// Granting all permissions allows us to run the RHQ server as if no security
+// manager was in place (which is assumed by default by JBoss AS) but be able
+// to use it when we need it for our own purposes.
+
+grant {
+    permission java.security.AllPermission;
+};
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.sh b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.sh
new file mode 100644
index 0000000..f4fb511
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.sh
@@ -0,0 +1,483 @@
+#!/bin/sh
+
+# chkconfig: 2345 92 26
+# description: Starts and stops the RHQ Server
+#
+# processname: java
+
+# =============================================================================
+# RHQ Server UNIX Startup Script
+#
+# This file is used to execute the RHQ Server on a UNIX platform as part of
+# the platform's bootup sequence or as a foreground console process.
+# Run this script without any command line options for the syntax help.
+#
+# This script is customizable by setting the following environment variables:
+#
+# Note that if this script is to be used as an init.d script, you must set
+# RHQ_SERVER_HOME so this script knows where to find the Server installation.
+#
+#    RHQ_SERVER_DEBUG - If this is defined, the script will emit debug
+#                       messages. If this is not defined or set to "false"
+#                       debug messages are not emitted.
+#
+#    RHQ_SERVER_HOME - Defines where the server's home install directory is.
+#                      If not defined, it will be assumed to be the parent
+#                      directory of the directory where this script lives.
+#
+#    RHQ_SERVER_JAVA_HOME - The location of the JRE that the server will
+#                           use. This will be ignored if
+#                           RHQ_SERVER_JAVA_EXE_FILE_PATH is set.
+#                           If this and RHQ_SERVER_JAVA_EXE_FILE_PATH are
+#                           not set, the Server's embedded JRE will be used.
+#
+#    RHQ_SERVER_JAVA_EXE_FILE_PATH - Defines the full path to the Java
+#                                    executable to use. If this is set,
+#                                    RHQ_SERVER_JAVA_HOME is ignored.
+#                                    If this is not set, then
+#                                    $RHQ_SERVER_JAVA_HOME/bin/java
+#                                    is used. If this and
+#                                    RHQ_SERVER_JAVA_HOME are not set, the
+#                                    Server's embedded JRE will be used.
+#
+#    RHQ_SERVER_JAVA_OPTS - Java VM command line options to be
+#                           passed into the Server's VM. If this is not defined
+#                           this script will pass in a default set of options.
+#                           If this is set, it completely overrides the
+#                           Server's defaults. If you only want to add options
+#                           to the Server's defaults, then you will want to
+#                           use RHQ_SERVER_ADDITIONAL_JAVA_OPTS instead.
+#
+#    RHQ_SERVER_ADDITIONAL_JAVA_OPTS - additional Java VM command line options
+#                                      to be passed into the Server's VM. This
+#                                      is added to RHQ_SERVER_JAVA_OPTS; it
+#                                      is mainly used to augment the Server's
+#                                      default set of options. This can be
+#                                      left unset if it is not needed.
+#
+#    RHQ_SERVER_CMDLINE_OPTS - If this is defined, these are the command line
+#                              arguments that will be passed to the RHQ Server
+#                              JBossAS standalone.sh. If you only want to add
+#                              options to the Server's defaults, then you will
+#                              want to use RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS
+#                              instead.
+#
+#    RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS - additional command line arguments to
+#                                         be passed to the RHQ Server JBossAS 
+#                                         standalone.sh. This is added to 
+#                                         RHQ_SERVER_CMDLINE_OPTS; it is mainly
+#                                         used to augment the Server's default
+#                                         set of options. This can be left unset
+#                                         if it is not needed.
+#
+#    RHQ_SERVER_PIDFILE_DIR - a full path to a writable directory where this
+#                             script can write its pidfile to.
+#                             If not defined, this defaults to the Server's
+#                             bin directory.
+#
+# If the embedded JRE is to be used but is not available, the fallback
+# JRE to be used will be determined by the JAVA_HOME environment variable.
+#
+# This script calls standalone.sh when starting the underlying JBossAS server.
+# =============================================================================
+
+# ----------------------------------------------------------------------
+# Environment variables that can customize the launch of the RHQ Server.
+# ----------------------------------------------------------------------
+
+# RHQ_SERVER_HOME=/path/to/server/home
+# RHQ_SERVER_DEBUG=true
+# JAVA_HOME=/path/to/java/installation
+# RHQ_SERVER_JAVA_EXE_FILE_PATH=/path/directly/to/java/executable
+# RHQ_SERVER_JAVA_OPTS=VM options
+# RHQ_SERVER_ADDITIONAL_JAVA_OPTS=additional VM options
+# RHQ_SERVER_CMDLINE_OPTS=standalone.sh options
+# RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS=additional standalone.sh options
+
+# ----------------------------------------------------------------------
+# Environment variables to set in order to enable remote debugging.
+# ----------------------------------------------------------------------
+
+#RHQ_SERVER_ADDITIONAL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
+
+# Enable JProfiler
+#JPROFILER_HOME="/opt/jprofiler6"
+#RHQ_SERVER_ADDITIONAL_JAVA_OPTS="$RHQ_SERVER_ADDITIONAL_JAVA_OPTS -agentlib:jprofilerti=port=8849 -Xbootclasspath/a:$JPROFILER_HOME/bin/agent.jar"
+#export PATH="$PATH:$JPROFILER_HOME/bin"
+#export LD_LIBRARY_PATH="$JPROFILER_HOME/bin/linux-x64"
+
+# ----------------------------------------------------------------------
+# Make sure we unset any lingering JBossAS environment variables that
+# were set in the user's environment.  This might happen if the user
+# has an external JBossAS configured.
+# ----------------------------------------------------------------------
+
+unset JBOSS_HOME
+unset RUN_CONF
+unset JAVAC_JAR
+unset JBOSS_CLASSPATH
+
+# ----------------------------------------------------------------------
+# Dumps a message iff debug mode is enabled
+# ----------------------------------------------------------------------
+
+debug_msg ()
+{
+   # if debug variable is set, it is assumed to be on, unless its value is false
+   if [ -n "$RHQ_SERVER_DEBUG" ] && [ "$RHQ_SERVER_DEBUG" != "false" ]; then
+      echo $1
+   fi
+}
+
+# ----------------------------------------------------------------------
+# Sets _SERVER_STATUS, _SERVER_RUNNING and _SERVER_PID based on the
+# status of the RHQ Server VM start script (standalone.sh).
+# Also sets _JVM_STATUS, _JVM_RUNNING and _JVM_PID based on the
+# status of the JBossAS Java Virtual Machine.
+# ----------------------------------------------------------------------
+
+check_status ()
+{
+    if [ -f "$_SERVER_PIDFILE" ]; then
+        _SERVER_PID=`cat "$_SERVER_PIDFILE"`
+        if [ -n "$_SERVER_PID" ] && kill -0 $_SERVER_PID 2>/dev/null ; then
+            _SERVER_STATUS="RHQ Server (pid $_SERVER_PID) is $1"
+            _SERVER_RUNNING=1
+        else
+            _SERVER_STATUS="RHQ Server (pid $_SERVER_PID) is NOT running"
+            _SERVER_RUNNING=0
+        fi
+    else
+        _SERVER_STATUS="RHQ Server (no pid file) is NOT running"
+        _SERVER_RUNNING=0
+    fi
+
+    if [ -f "$_JVM_PIDFILE" ]; then
+        _JVM_PID=`cat "$_JVM_PIDFILE"`
+        if [ -n "$_JVM_PID" ] && kill -0 $_JVM_PID 2>/dev/null ; then
+            _JVM_STATUS="JBossAS Java VM child process (pid $_JVM_PID) is $1"
+            _JVM_RUNNING=1
+        else
+            _JVM_STATUS="JBossAS Java VM child process (pid $_JVM_PID) is NOT running"
+            _JVM_RUNNING=0
+        fi
+    else
+        _JVM_STATUS="JBossAS Java VM child process (no pid file) is NOT running"
+        _JVM_RUNNING=0
+    fi
+}
+
+# ----------------------------------------------------------------------
+# Ensures that the PID files no longer exist
+# ----------------------------------------------------------------------
+
+remove_pid_files ()
+{
+   if [ -f "$_SERVER_PIDFILE" ]; then
+      rm -f "$_SERVER_PIDFILE"
+   fi
+   if [ -f "$_JVM_PIDFILE" ]; then
+      rm -f "$_JVM_PIDFILE"
+   fi
+}
+
+# ----------------------------------------------------------------------
+# Determine what specific platform we are running on.
+# Set some platform-specific variables.
+# ----------------------------------------------------------------------
+
+case "`uname`" in
+   CYGWIN*) _CYGWIN=true
+            ;;
+   Linux*)  _LINUX=true
+            ;;
+   Darwin*) _DARWIN=true
+            ;;
+   SunOS*) _SOLARIS=true
+            ;;
+   AIX*)   _AIX=true
+            ;;
+esac
+
+# ----------------------------------------------------------------------
+# Determine the RHQ Server installation directory.
+# If RHQ_SERVER_HOME is not defined, we will assume we are running
+# directly from the server installation's bin directory.
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_HOME" ]; then
+   if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
+      # only certain platforms support the -e argument for readlink
+      _READLINK_ARG="-e"
+   fi
+   _DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
+   RHQ_SERVER_HOME=`dirname "$_DOLLARZERO"`/..
+else
+   if [ ! -d "$RHQ_SERVER_HOME" ]; then
+      echo "ERROR! RHQ_SERVER_HOME is not pointing to a valid directory"
+      echo "RHQ_SERVER_HOME: $RHQ_SERVER_HOME"
+      exit 1
+   fi
+fi
+
+cd "$RHQ_SERVER_HOME"
+RHQ_SERVER_HOME=`pwd`
+
+debug_msg "RHQ_SERVER_HOME: $RHQ_SERVER_HOME"
+
+if [ ! -f "${RHQ_SERVER_HOME}/jbossas/jboss-modules.jar" ]; then
+   echo "ERROR! RHQ_SERVER_HOME is not pointing to a valid RHQ Server"
+   echo "Missing ${RHQ_SERVER_HOME}/jbossas/jboss-modules.jar"
+   exit 1
+fi
+
+# ----------------------------------------------------------------------
+# if we are on a Mac and JAVA_HOME is not set, then set it to /usr
+# as this is the default location.
+# ----------------------------------------------------------------------
+if [ -z "$JAVA_HOME" ]; then
+   if [ -n "$_DARWIN" ]; then
+     debug_msg "Running on Mac OS X, setting JAVA_HOME to /usr"
+     JAVA_HOME=/usr
+   fi
+fi
+
+# create the logs directory
+_LOG_DIR_PATH="${RHQ_SERVER_HOME}/logs"
+if [ -n "$_CYGWIN" ]; then
+   _LOG_DIR_PATH=`cygpath --windows --path "$_LOG_DIR_PATH"`
+fi
+if [ ! -d "${_LOG_DIR_PATH}" ]; then
+   mkdir "${_LOG_DIR_PATH}"
+fi
+
+# ----------------------------------------------------------------------
+# Find the Java executable and verify we have a VM available
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_JAVA_EXE_FILE_PATH" ]; then
+   if [ -z "$RHQ_SERVER_JAVA_HOME" ]; then
+      RHQ_SERVER_JAVA_HOME="${RHQ_SERVER_HOME}/jre"     
+      if [ -d "$RHQ_SERVER_JAVA_HOME" ]; then
+         debug_msg "Using the embedded JRE"
+      else
+         debug_msg "No embedded JRE found - will try to use JAVA_HOME: $JAVA_HOME"
+         RHQ_SERVER_JAVA_HOME="$JAVA_HOME"
+      fi
+   fi
+   debug_msg "RHQ_SERVER_JAVA_HOME: $RHQ_SERVER_JAVA_HOME"
+   RHQ_SERVER_JAVA_EXE_FILE_PATH="${RHQ_SERVER_JAVA_HOME}/bin/java"
+fi
+debug_msg "RHQ_SERVER_JAVA_EXE_FILE_PATH: $RHQ_SERVER_JAVA_EXE_FILE_PATH"
+
+if [ ! -f "$RHQ_SERVER_JAVA_EXE_FILE_PATH" ]; then
+   echo "There is no JVM available."
+   echo "Please set RHQ_SERVER_JAVA_HOME or RHQ_SERVER_JAVA_EXE_FILE_PATH appropriately."
+   exit 1
+fi
+
+# standalone.sh will use JAVA as the full java command
+JAVA="$RHQ_SERVER_JAVA_EXE_FILE_PATH"
+export JAVA
+
+# ----------------------------------------------------------------------
+# Prepare the VM command line options to be passed in
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_JAVA_OPTS" ]; then
+   RHQ_SERVER_JAVA_OPTS="-Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
+fi
+# Add the JVM opts that we always want to specify, whether or not the user set RHQ_SERVER_JAVA_OPTS.
+# Note that the double equals for the policy file specification IS INTENTIONAL
+RHQ_SERVER_JAVA_OPTS="-Dapp.name=rhq-server ${RHQ_SERVER_JAVA_OPTS} -Djboss.server.log.dir=${_LOG_DIR_PATH} -Djava.awt.headless=true -Dsun.lang.ClassLoader.allowArraySyntax=true -Djboss.server.default.config=standalone.xml -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.security.manager -Djava.security.policy==${RHQ_SERVER_HOME}/bin/rhq-server.security-policy"
+
+debug_msg "RHQ_SERVER_JAVA_OPTS: $RHQ_SERVER_JAVA_OPTS"
+debug_msg "RHQ_SERVER_ADDITIONAL_JAVA_OPTS: $RHQ_SERVER_ADDITIONAL_JAVA_OPTS"
+
+# standalone.sh wants the options to be in the JAVA_OPTS variable
+JAVA_OPTS="$RHQ_SERVER_JAVA_OPTS $RHQ_SERVER_ADDITIONAL_JAVA_OPTS"
+export JAVA_OPTS
+
+# ----------------------------------------------------------------------
+# Prepare the command line arguments passed to the RHQ Server JBossAS
+# standalone.sh script
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_CMDLINE_OPTS" ]; then
+   _PROPS_FILE_PATH="${RHQ_SERVER_HOME}/bin/rhq-server.properties"
+
+   # convert paths if we are on Windows
+   if [ -n "$_CYGWIN" ]; then
+      _PROPS_FILE_PATH=`cygpath --windows --path "$_PROPS_FILE_PATH"`
+   fi
+
+   RHQ_SERVER_CMDLINE_OPTS="-P ${_PROPS_FILE_PATH}"   
+fi
+
+debug_msg "RHQ_SERVER_CMDLINE_OPTS: $RHQ_SERVER_CMDLINE_OPTS"
+debug_msg "RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS: $RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS"
+
+# JBoss may parse its command line args such that later options of a
+# certain type may override earlier options of that same type, so make sure the
+# additional opts are added after the base opts, since we want the additional
+# opts to take precedence
+_CMDLINE_OPTS="$RHQ_SERVER_CMDLINE_OPTS $RHQ_SERVER_ADDITIONAL_CMDLINE_OPTS"
+
+# ----------------------------------------------------------------------
+# Now find the JBossAS standalone.sh script
+# ----------------------------------------------------------------------
+
+_JBOSS_RUN_SCRIPT="${RHQ_SERVER_HOME}/jbossas/bin/standalone.sh"
+
+if [ ! -f "$_JBOSS_RUN_SCRIPT" ]; then
+   echo "ERROR! Cannot find the JBossAS run script"
+   echo "Not found: $_JBOSS_RUN_SCRIPT"
+   exit 1
+fi
+debug_msg "_JBOSS_RUN_SCRIPT: $_JBOSS_RUN_SCRIPT"
+
+# ----------------------------------------------------------------------
+# Define where we want to write the pidfiles - let user override the dir
+# Note that we actually have two pidfiles - one is for the script
+# that starts the JBossAS Java virtual machine and the second is the
+# actual server's Java virtual machine process itself.
+# ----------------------------------------------------------------------
+
+if [ -z "$RHQ_SERVER_PIDFILE_DIR" ]; then
+   RHQ_SERVER_PIDFILE_DIR="${RHQ_SERVER_HOME}/bin"
+fi
+mkdir -p "$RHQ_SERVER_PIDFILE_DIR"
+
+_SERVER_PIDFILE="${RHQ_SERVER_PIDFILE_DIR}/rhq-server.pid"
+_JVM_PIDFILE="${RHQ_SERVER_PIDFILE_DIR}/rhq-jvm.pid"
+
+# ----------------------------------------------------------------------
+# Execute the command that the user wants us to do
+# ----------------------------------------------------------------------
+
+check_status "running"
+
+case "$1" in
+'console')
+        if [ "$_SERVER_RUNNING" = "1" ]; then
+           echo "$_SERVER_STATUS"
+           exit 0
+        fi
+
+        echo "Starting RHQ Server in console..."
+
+        # we are running in foreground, make both pids show the same process
+        echo "$$" > "$_SERVER_PIDFILE"
+        echo "$$" > "$_JVM_PIDFILE"
+
+        # start the server, making sure its working directory is the JBossAS bin directory
+        cd "${RHQ_SERVER_HOME}/jbossas/bin"
+        "$_JBOSS_RUN_SCRIPT" $_CMDLINE_OPTS
+
+        _JBOSS_STATUS=$?
+
+        remove_pid_files
+
+        exit $_JBOSS_STATUS
+        ;;
+
+'start')
+        if [ "$_SERVER_RUNNING" = "1" ]; then
+           echo "$_SERVER_STATUS"
+           exit 0
+        fi
+
+        echo "Trying to start the RHQ Server..."
+
+        LAUNCH_JBOSS_IN_BACKGROUND=true
+        JBOSS_PIDFILE="$_JVM_PIDFILE"
+        export LAUNCH_JBOSS_IN_BACKGROUND
+        export JBOSS_PIDFILE
+
+        # start the server, making sure its working directory is the JBossAS bin directory
+        cd "${RHQ_SERVER_HOME}/jbossas/bin"
+        if [ -n "$RHQ_SERVER_DEBUG" ] && [ "$RHQ_SERVER_DEBUG" != "false" ]; then
+           "$_JBOSS_RUN_SCRIPT" $_CMDLINE_OPTS &
+        else
+           "$_JBOSS_RUN_SCRIPT" $_CMDLINE_OPTS > /dev/null 2>&1 &
+        fi
+
+        echo "$!" > "$_SERVER_PIDFILE"
+
+        sleep 5
+        check_status "starting"
+        echo "$_SERVER_STATUS"
+
+        if [ "$_SERVER_RUNNING" = "1" ]; then
+           exit 0
+        else
+           echo "Failed to start - make sure the RHQ Server is fully configured properly"
+           exit 1
+        fi
+        ;;
+
+'stop')
+        if [ "$_SERVER_RUNNING" = "0" ]; then
+           echo "$_SERVER_STATUS"
+           remove_pid_files
+           exit 0
+        fi
+
+        echo "Trying to stop the RHQ Server..."
+
+        echo "RHQ Server (pid=${_SERVER_PID}) is stopping..."
+
+        while [ "$_SERVER_RUNNING" = "1"  ]; do
+           kill -TERM $_SERVER_PID
+           sleep 2
+           check_status "stopping..."
+        done
+
+        remove_pid_files
+        echo "RHQ Server has stopped."
+        exit 0
+        ;;
+
+'kill')
+        if [ "$_SERVER_RUNNING" = "0" ]; then
+           echo "$_SERVER_STATUS"
+        fi
+        if [ "$_JVM_RUNNING" = "0" ]; then
+           echo "$_JVM_STATUS"
+           remove_pid_files
+           exit 0
+        fi
+
+        echo "Trying to kill the RHQ Server..."
+
+        echo "RHQ Server parent process (pid=${_SERVER_PID}) is being killed..."
+        while [ "$_SERVER_RUNNING" = "1"  ]; do
+           kill -9 $_SERVER_PID
+           sleep 2
+           check_status "killing..."
+        done
+
+        echo "Java Virtual Machine child process (pid=${_JVM_PID}) is being killed..."
+        while [ "$_JVM_RUNNING" = "1"  ]; do
+           kill -9 $_JVM_PID
+           sleep 2
+           check_status "killing..."
+        done
+
+        remove_pid_files
+        echo "RHQ Server has been killed."
+        exit 0
+        ;;
+
+'status')
+        echo "$_SERVER_STATUS"
+        echo "$_JVM_STATUS"
+        exit 0
+        ;;
+
+*)
+        echo "Usage: $0 { start | stop | kill | status | console }"
+        exit 1
+        ;;
+esac
+
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf
new file mode 100644
index 0000000..9fef419
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf
@@ -0,0 +1,212 @@
+#*****************************************************************************
+# RHQ Server Java Service Wrapper Configuration File
+#
+# If you wish to modify these settings or add additional ones, it is
+# recommended that you do not modify this file; instead, create your own
+# override include file named "rhq-server-wrapper.inc" and place it in the
+# same directory where this file is located.
+#
+# See http://wrapper.tanukisoftware.org/doc/english/properties.html
+# for full documentation on all available wrapper.* settings
+#*****************************************************************************
+
+#*****************************************************************************
+# Environment Variables Required
+#
+# All of the below environment variables may be either specified in the
+# process environment or in the wrapper environment configuration file or on
+# the command line. The wrapper environment configuration file must be
+# named "rhq-server-wrapper.env" and must be placed in the same directory
+# where this file is located.
+#
+# Note that all paths must be full, absolute paths unless noted otherwise.
+#
+# set.RHQ_SERVER_HOME                 - RHQ Server installation directory
+# set.RHQ_SERVER_INSTANCE_NAME        - A name to identify the RHQ Server
+# set.RHQ_SERVER_JAVA_EXE_FILE_PATH   - Java executable
+# set.RHQ_SERVER_OS_PLATFORM          - The operating system platform name
+# set.RHQ_SERVER_WRAPPER_LOG_DIR_PATH - The Java Service Wrapper's log file (helpful if installing, uninstalling or starting fails)
+#*****************************************************************************
+
+# Load in the specific environment for the RHQ Server instance to start
+#include %RHQ_SERVER_HOME%/bin/wrapper/rhq-server-wrapper.env
+
+#*****************************************************************************
+# Start Properties
+#*****************************************************************************
+# Java JVM Executable (quotes not needed)
+wrapper.java.command=%RHQ_SERVER_JAVA_EXE_FILE_PATH%
+
+# Java Main class. This class must implement the WrapperListener interface. (quotes not needed)
+wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
+
+# Java Classpath (include wrapper.jar). Add classpath elements starting at 1 (quotes not needed)
+wrapper.java.classpath.1=%RHQ_SERVER_HOME%/bin/wrapper/%RHQ_SERVER_OS_PLATFORM%/wrapper.jar
+
+# Java Library Path (location of wrapper.dll/libwrapper.so and other JNI libs) (quotes not needed)
+wrapper.java.library.path.1=%RHQ_SERVER_HOME%/bin/wrapper/%RHQ_SERVER_OS_PLATFORM%
+
+# The RHQ Server starts the JBossAS container
+wrapper.app.parameter.1=-jar
+wrapper.app.parameter.2="%RHQ_SERVER_HOME%/jbossas/jboss-modules.jar"
+
+# Additional command line arguments to be passed to the RHQ Server/JBossAS container (quotes ARE needed)
+wrapper.app.parameter.3=-mp
+wrapper.app.parameter.4="%RHQ_SERVER_HOME%/jbossas/modules"
+wrapper.app.parameter.5=-jaxpmodule
+wrapper.app.parameter.6=javax.xml.jaxp-provider
+wrapper.app.parameter.7=org.jboss.as.standalone
+wrapper.app.parameter.8="-Djboss.home.dir=%RHQ_SERVER_HOME%/jbossas"
+wrapper.app.parameter.9=-P
+wrapper.app.parameter.10="%RHQ_SERVER_HOME%/bin/rhq-server.properties"
+
+# Additional JVM parameters (quotes ARE needed)
+wrapper.java.additional.1="-D[Standalone]"
+wrapper.java.additional.2=-Dapp.name=rhq-server
+wrapper.java.additional.3=-server
+wrapper.java.additional.4=-Xms1024M
+wrapper.java.additional.5=-Xmx1024M
+wrapper.java.additional.6=-XX:PermSize=256M
+wrapper.java.additional.7=-XX:MaxPermSize=256M
+wrapper.java.additional.8=-XX:+TieredCompilation
+wrapper.java.additional.9=-XX:+UseCompressedOops
+wrapper.java.additional.10=-Djava.net.preferIPv4Stack=true
+wrapper.java.additional.11=-Dorg.jboss.resolver.warning=true
+wrapper.java.additional.12=-Dsun.rmi.dgc.client.gcInterval=3600000
+wrapper.java.additional.13=-Dsun.rmi.dgc.server.gcInterval=3600000
+wrapper.java.additional.14=-Djboss.modules.system.pkgs=org.jboss.byteman
+wrapper.java.additional.15=-Djava.awt.headless=true
+wrapper.java.additional.16=-Djboss.server.default.config=standalone.xml
+wrapper.java.additional.17="-Dorg.jboss.boot.log.file=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%/jbossas-boot.log"
+wrapper.java.additional.18="-Dlogging.configuration=file:%RHQ_SERVER_HOME%/jbossas/standalone/configuration/logging.properties"
+wrapper.java.additional.19=-Dsun.lang.ClassLoader.allowArraySyntax=true
+wrapper.java.additional.20=-Djava.security.manager
+# the double equals for the policy file specification IS INTENTIONAL
+wrapper.java.additional.21="-Djava.security.policy==%RHQ_SERVER_HOME%/bin/rhq-server.security-policy"
+# Don't need these now, but this is commented out in case we need to add an endorsed dir in the future
+#wrapper.java.additional.22="-Djava.endorsed.dirs=%RHQ_SERVER_HOME%/jbossas/lib/endorsed"
+
+# We want to make sure the Server starts in the JBossAS bin directory
+wrapper.working.dir=%RHQ_SERVER_HOME%/jbossas/bin
+
+#*****************************************************************************
+# Wrapper Logging Properties
+#*****************************************************************************
+# if TRUE, this will turn logging level immediately to DEBUG
+wrapper.debug=FALSE
+
+# Format of output for the console.  (See docs for formats)
+wrapper.console.format=M
+
+# Log Level for console output. (NONE,DEBUG,STATUS,INFO,ERROR,FATAL)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging. (quotes not needed)
+wrapper.logfile=%RHQ_SERVER_WRAPPER_LOG_DIR_PATH%/rhq-server-wrapper.log
+
+# Format of output for the log file.  (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output. (NONE,DEBUG,STATUS,INFO,ERROR,FATAL)
+wrapper.logfile.loglevel=ERROR
+
+# Maximum size that the log file will be allowed to grow to before
+#  the log is rolled. Size is specified in bytes.  The default value
+#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
+#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=1m
+
+# Maximum number of rolled log files which will be allowed before old
+#  files are deleted.  The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=1
+
+# Log Level for sys/event log output.  (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+# if JVM hangs, this tries to get a thread dump
+# (if TRUE, then ntservice.console is forced to TRUE as well)
+wrapper.request_thread_dump_on_failed_jvm_exit=FALSE
+
+#*****************************************************************************
+# Wrapper Windows Properties
+#*****************************************************************************
+# Title to use when running as a console
+wrapper.console.title=RHQ Server [%RHQ_SERVER_INSTANCE_NAME%]
+
+#*****************************************************************************
+# Wrapper Windows XP Service Properties
+#*****************************************************************************
+# WARNING - Do not modify any of these properties when an application
+#  using this configuration file has been installed as a service.
+#  Please uninstall the service before modifying this section.  The
+#  service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=%RHQ_SERVER_INSTANCE_NAME%
+
+# Display name of the service
+wrapper.ntservice.displayname=RHQ Server [%RHQ_SERVER_INSTANCE_NAME%]
+
+# Description of the service
+wrapper.ntservice.description=RHQ Server instance named %RHQ_SERVER_INSTANCE_NAME%
+
+# Service dependencies.  Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed.  AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow service to interact with desktop (must be FALSE if account is specified)
+wrapper.ntservice.interactive=FALSE
+
+# Show a console - only takes effect if interactive is TRUE
+wrapper.ntservice.console=FALSE
+
+# The service runs as this user; Local System account is used if not specified
+# If prompt is true, the user will be prompted for the password.  If false,
+# the password configuration property will be used.
+#wrapper.ntservice.account=.\username
+wrapper.ntservice.password.prompt=TRUE
+#wrapper.ntservice.password=xyz
+
+#*****************************************************************************
+# Wrapper UNIX Service Properties
+#*****************************************************************************
+# For UNIX, make sure it is daemonized
+wrapper.daemonize=TRUE
+
+#*****************************************************************************
+# Wrapper Shutdown Monitoring Properties
+#*****************************************************************************
+# File to be monitored - when anchor file is deleted, the instance will shutdown
+#wrapper.anchorfile=%RHQ_SERVER_HOME%\bin\anchor
+#wrapper.anchor.poll_interval=5
+
+# auto-restart on weird exit status - if exiting normally, just shutdown
+wrapper.on_exit.default=RESTART
+wrapper.on_exit.0=SHUTDOWN
+
+# immediately restart the JVM when java.lang.OutOfMemoryError is detected in its output
+wrapper.filter.trigger.1=java.lang.OutOfMemoryError
+wrapper.filter.action.1=RESTART
+
+# Determine when to restart or if an invocation simply failed on startup
+wrapper.max_failed_invocations=2
+wrapper.successful_invocation_time=300
+wrapper.startup.timeout=30
+
+# How to poll the VM to make sure it is not hung
+wrapper.ping.interval=30
+wrapper.ping.timeout=45
+wrapper.cpu.timeout=10
+
+# Allow our server some extra time to shutdown, since it may take a while to clear the comm repo
+wrapper.shutdown.timeout=180
+wrapper.jvm_exit.timeout=180
+
+#*****************************************************************************
+# Wrapper Override Properties
+# wrapper.XXX properties defined in this included file override any
+# properties previously defined above.
+#*****************************************************************************
+#include %RHQ_SERVER_HOME%/bin/wrapper/rhq-server-wrapper.inc
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.dll b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.dll
new file mode 100644
index 0000000..37c4f33
Binary files /dev/null and b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.dll differ
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.exe b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.exe
new file mode 100644
index 0000000..a46a2ac
Binary files /dev/null and b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.exe differ
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.jar b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.jar
new file mode 100644
index 0000000..c766405
Binary files /dev/null and b/modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/windows-x86_32/wrapper.jar differ
diff --git a/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc b/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc
new file mode 100644
index 0000000..7bd2e8a
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc
@@ -0,0 +1,16 @@
+#
+# Additional dev-only options for the RHQ Server Java Service Wrapper
+#
+
+# enable remote debugging
+wrapper.java.additional.22=-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
+
+# enable jprofiler
+#set.PATH=%PATH%;<jprofiler-install-dir>\bin\windows
+#wrapper.java.additional.23=-agentlib:jprofilerti=port=8849
+#wrapper.java.additional.24=-Xbootclasspath/a:<jprofiler-install-dir>\bin\agent.jar
+
+# disable JVM startup timeout
+wrapper.startup.timeout=0
+# disable JVM ping timeout
+wrapper.ping.timeout=0
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
index e4888b4..eded774 100644
--- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -199,6 +199,11 @@
         <delete dir="${jboss.home}/standalone/tmp" />
         <delete dir="${jboss.home}/standalone/work" /> <!-- TODO: does AS7 still have this? -->
 
+        <echo>Delete unused configurations</echo>
+        <delete file="${jboss.home}/standalone/configuration/standalone-ha.xml" />
+        <delete file="${jboss.home}/standalone/configuration/standalone-full.xml" />
+        <delete file="${jboss.home}/standalone/configuration/standalone-full-ha.xml" />
+
         <!-- TODO: we need to put Quartz in the ear and deploy a scheduler sar -->
         <!--
         <echo>Upgrading Quartz to v${quartz.version} ...</echo>


commit 6ea465b93a34055613bd67420d0972a2f0835674
Author: John Mazzitelli <mazz at redhat.com>
Date:   Tue Jul 31 18:15:27 2012 -0400

    the start of the new container build ant script. still have a ways to go before this produces a functional rhq server on as7

diff --git a/modules/enterprise/server/appserver/pom.xml b/modules/enterprise/server/appserver/pom.xml
new file mode 100644
index 0000000..ee378b8
--- /dev/null
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -0,0 +1,331 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.rhq</groupId>
+        <artifactId>rhq-parent</artifactId>
+        <version>4.5.0-SNAPSHOT</version>
+        <relativePath>../../../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.rhq</groupId>
+    <artifactId>rhq-enterprise-server-appserver</artifactId>
+    <packaging>pom</packaging>
+
+    <name>RHQ Enterprise Server Application Server Container</name>
+    <description>The full RHQ appserver container build, including the JBossAS server and all config/deploy files</description>
+
+    <properties>
+        <jboss.version>7.1.1.Final</jboss.version>
+
+        <!-- TODO do we still need this? -->
+        <rhq.webappsReloadable>false</rhq.webappsReloadable>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.rhq</groupId>
+            <artifactId>safe-invoker</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.rhq</groupId>
+            <artifactId>rhq-container-lib</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- 3rd Party Deps -->
+
+        <dependency>
+            <groupId>javax.faces</groupId>
+            <artifactId>jsf-api</artifactId>
+            <!-- NOTE: version defined in root pom dependencyManagement section -->
+        </dependency>
+
+        <dependency>
+            <groupId>javax.faces</groupId>
+            <artifactId>jsf-impl</artifactId>
+            <!-- NOTE: version defined in root pom dependencyManagement section -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-dist</artifactId>
+            <version>7.1.1.Final</version>
+            <type>zip</type>
+        </dependency>
+
+        <dependency>
+            <groupId>jgroups</groupId>
+            <artifactId>jgroups-all</artifactId>
+            <version>2.2.9.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.opensymphony.quartz</groupId>
+            <artifactId>quartz</artifactId>
+            <!-- NOTE: version defined in root pom dependencyManagement section -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.opensymphony.quartz</groupId>
+            <artifactId>quartz-oracle</artifactId>
+            <!-- NOTE: version defined in root pom dependencyManagement section -->
+        </dependency>
+
+        <dependency>
+            <groupId>postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <!-- NOTE: version defined in root pom dependencyManagement section -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>1.7.3</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>rhq-server-${project.version}</finalName>
+        <outputDirectory>target/${project.build.finalName}</outputDirectory>
+
+        <resources>
+
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+
+            <resource>
+                <directory>src/main/bin-resources</directory>
+                <filtering>false</filtering>
+            </resource>
+
+        </resources>
+
+        <plugins>
+
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>move-src</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+
+                    <execution>
+                        <id>prepare-container</id>
+                        <phase>generate-resources</phase>
+                        <configuration>
+                            <target>
+                                <echo>settings.localRepository=${settings.localRepository}</echo>
+                                <echo>project.build.outputDirectory=${project.build.outputDirectory}</echo>
+                                <ant antfile="src/main/scripts/rhq-container.build.xml"
+                                     target="prepare-container">
+                                    <property name="settings.localRepository"      value="${settings.localRepository}" />
+                                    <property name="project.build.outputDirectory" value="${project.build.outputDirectory}" />
+                                    <property name="project.version"               value="${project.version}" />
+                                    <property name="dev.profile.active"            value="${dev.profile.active}" />
+                                    <property name="developer"                     value="${developer}" />
+                                    <property name="rhq.earName"                   value="${rhq.earName}" />
+
+                                    <!-- dependency versions -->
+                                    <property name="rhq.version"                   value="${project.version}" />
+                                    <property name="jboss.version"                 value="${jboss.version}" />
+                                    <property name="jboss.zip"                     location="${settings.localRepository}/org/jboss/as/jboss-as-dist/${jboss.version}/jboss-as-dist-${jboss.version}.zip" />
+                                    <property name="ojdbc6.version"                value="${ojdbc6.version}" />
+                                    <property name="postgresql.version"            value="${postgresql.version}" />
+                                    <property name="jboss-javassist.version"       value="${jboss-javassist.version}" />
+                                    <property name="jsf-api.version"               value="${jsf-api.version}" />
+                                    <property name="jsf-impl.version"              value="${jsf-impl.version}" />
+                                    <property name="hibernate3.version"            value="${hibernate3.version}" />
+                                    <property name="quartz.version"                value="${quartz.version}" />
+                                    <property name="xercesImpl.version"            value="${xercesImpl.version}" />
+
+                                    <!-- dev DB settings (used to init rhq-server.properties if dev profile is active or developer prop is set) -->
+                                    <property name="rhq.dev.ds.connection-url"          value="${rhq.dev.ds.connection-url}" />
+                                    <property name="rhq.dev.ds.driver-class"            value="${rhq.dev.ds.driver-class}" />
+                                    <property name="rhq.dev.ds.xa-datasource-class"     value="${rhq.dev.ds.xa-datasource-class}" />
+                                    <property name="rhq.dev.ds.user-name"               value="${rhq.dev.ds.user-name}" />
+                                    <property name="rhq.dev.ds.password.encrypted"      value="${rhq.dev.ds.password.encrypted}" />
+                                    <property name="rhq.dev.ds.type-mapping"            value="${rhq.dev.ds.type-mapping}" />
+                                    <property name="rhq.dev.ds.server-name"             value="${rhq.dev.ds.server-name}" />
+                                    <property name="rhq.dev.ds.port"                    value="${rhq.dev.ds.port}" />
+                                    <property name="rhq.dev.ds.db-name"                 value="${rhq.dev.ds.db-name}" />
+                                    <property name="rhq.dev.ds.hibernate-dialect"       value="${rhq.dev.ds.hibernate-dialect}" />
+                                    <property name="rhq.dev.quartz.driverDelegateClass" value="${rhq.dev.quartz.driverDelegateClass}" />
+                                    <property name="rhq.dev.quartz.selectWithLockSQL"   value="${rhq.dev.quartz.selectWithLockSQL}" />
+                                    <property name="rhq.dev.quartz.lockHandlerClass"    value="${rhq.dev.quartz.lockHandlerClass}" />
+
+                                    <!-- default server settings used by installer -->
+                                    <property name="rhq.server.http.port"               value="${rhq.server.http.port}" />
+                                    <property name="rhq.server.https.port"              value="${rhq.server.https.port}" />
+                                    <property name="rhq.sync.endpoint-address"          value="${rhq.sync.endpoint-address}" />
+                                </ant>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>prepare-release</id>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <target>
+                                <echo>Preparing the release at ${project.build.outputDirectory}...</echo>
+                                <ant antfile="src/main/scripts/rhq-container.build.xml"
+                                     target="prepare-release">
+
+                                    <property name="project.build.outputDirectory" value="${project.build.outputDirectory}" />
+
+                                    <!-- the 'dev.profile.active' prop is set to true by the root POM if the dev profile is active;
+                                         if 'dev.profile.active' != "true", the container will be made packageable
+                                         (i.e. running the installer first will be required);
+                                         if 'dev.profile.active' == "true", the ear, datasource and JMS backend will be predeployed;
+                                         developers will normally want to do this to avoid having to run the installer
+                                         [mazz] added the ability to say -Ddeveloper to also predeploy, even if not in dev profile -->
+                                    <property name="dev.profile.active" value="${dev.profile.active}" />
+                                    <property name="developer"          value="${developer}" />
+                                    <property name="rhq.earName"        value="${rhq.earName}" />
+
+                                    <!-- dev/test DB type (needed to init rhq-ds.xml) -->
+                                    <property name="rhq.test.ds.type-mapping" value="${rhq.test.ds.type-mapping}" />
+                                    <property name="rhq.dev.ds.type-mapping"  value="${rhq.dev.ds.type-mapping}" />
+                                </ant>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <archiverConfig>
+                        <!-- permissions for archiver configuration are in decimal (not octal) -->
+                        <!-- 493 (decimal) = 755 (octal) -->
+                        <defaultDirectoryMode>493</defaultDirectoryMode>
+                    </archiverConfig>
+                    <descriptors>
+                        <descriptor>src/main/scripts/rhq-container.assembly.xml</descriptor>
+                    </descriptors>
+                    <finalName>${project.build.finalName}</finalName>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>assemble-server-container-zip</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- We skip the API checking in this module, because there is
+                no new code to check. This module merely composes classes from other modules
+                which have already been checked. Also, enabling the API checks in this module
+                causes some weird problems for the animal sniffer, because it most probably
+                cannot figure out the full set of dependencies for classes of the web apps
+                contained in the EAR were creating here. -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+
+        <profile>
+            <id>dev</id>
+
+            <properties>
+                <rhq.rootDir>../../../..</rhq.rootDir>
+                <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+                <!-- TODO do we still need this? -->
+                <rhq.webappsReloadable>true</rhq.webappsReloadable>
+            </properties>
+
+            <build>
+                <plugins>
+
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+
+                            <execution>
+                                <id>deploy</id>
+                                <phase>package</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.containerDir}" />
+                                        <echo>*** Copying updated files
+                                            from
+                                            target${file.separator}${project.build.finalName}${file.separator}
+                                            to
+                                            ${deployment.dir}${file.separator}...</echo>
+                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
+                                            <fileset dir="${basedir}/target/${project.build.finalName}" />
+                                        </copy>
+                                        <!-- Make sure shell scripts are readable and executable. -->
+                                        <chmod perm="ug+x" verbose="true">
+                                            <fileset dir="${deployment.dir}/bin"         includes="*.sh" />
+                                            <fileset dir="${deployment.dir}/jbossas/bin" includes="*.sh" />
+                                        </chmod>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>undeploy</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.containerDir}" />
+                                        <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
+                                        <delete dir="${deployment.dir}" />
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+    </profiles>
+
+</project>
+
diff --git a/modules/enterprise/server/appserver/src/main/bin-resources/jbossas/standalone/configuration/rhq.truststore b/modules/enterprise/server/appserver/src/main/bin-resources/jbossas/standalone/configuration/rhq.truststore
new file mode 100644
index 0000000..fdaf825
Binary files /dev/null and b/modules/enterprise/server/appserver/src/main/bin-resources/jbossas/standalone/configuration/rhq.truststore differ
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.assembly.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.assembly.xml
new file mode 100644
index 0000000..ef6c459
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.assembly.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<assembly>
+    <id>rhq-container</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>${project.build.finalName}</baseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>${project.build.outputDirectory}</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+            <excludes>
+                <exclude>**/*.sh</exclude>
+                <exclude>**/*.so</exclude>
+                <exclude>**/*.sl</exclude>
+                <exclude>**/*.dylib</exclude>
+            </excludes>
+            <fileMode>0644</fileMode>
+            <directoryMode>0755</directoryMode>
+        </fileSet>
+        <fileSet>
+            <directory>${project.build.outputDirectory}</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>**/*.sh</include>
+                <include>**/*.so</include>
+                <include>**/*.sl</include>
+                <include>**/*.dylib</include>
+            </includes>
+            <fileMode>0755</fileMode>
+            <directoryMode>0755</directoryMode>
+        </fileSet>
+    </fileSets>
+</assembly>
\ No newline at end of file
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
new file mode 100644
index 0000000..e4888b4
--- /dev/null
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -0,0 +1,578 @@
+<?xml version="1.0"?>
+
+<project name="rhq-appserver-container" basedir=".">
+
+    <property name="default.rhq.server.database.hibernate-dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
+    <property name="default.rhq.server.database.connection-url"    value="jdbc:postgresql://127.0.0.1:5432/rhq" />
+    <property name="default.rhq.server.database.user-name"          value="rhqadmin" />
+    <property name="default.rhq.server.database.password"           value="rhqadmin" />
+    <property name="default.rhq.server.database.password.encrypted" value="1eeb2f255e832171df8592078de921bc" />
+    <property name="default.rhq.server.database.type-mapping"       value="PostgreSQL" />
+
+    <!-- these are needed for the PostgreSQL XADataSource setup -->
+    <property name="default.rhq.server.database.server-name"        value="127.0.0.1" />
+    <property name="default.rhq.server.database.port"               value="5432" />
+    <property name="default.rhq.server.database.db-name"            value="rhq" />
+    <property name="default.rhq.server.quartz.driverDelegateClass"  value="org.quartz.impl.jdbcjobstore.PostgreSQLDelegate" />
+    <property name="default.rhq.server.quartz.selectWithLockSQL"    value="SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE" />
+    <property name="default.rhq.server.quartz.lockHandlerClass"     value="org.quartz.impl.jdbcjobstore.StdRowLockSemaphore" />
+
+    <property name="rhq.sync.endpoint-address" value="false"/>
+
+    <property name="default.rhq.server.drift.binary.content" value="false"/>
+
+    <target name="set-predeploy-prop">
+        <condition property="predeploy" value="true">
+            <or>
+                <equals arg1="${dev.profile.active}" arg2="true" />
+                <equals arg1="${developer}" arg2="true" />
+            </or>
+        </condition>
+    </target>
+
+    <target name="set-dev-server-props" if="predeploy">
+        <echo>*** Using dev database settings in rhq-server.properties...</echo>
+        <property name="rhq.server.database.hibernate-dialect" value="${rhq.dev.ds.hibernate-dialect}" />
+        <property name="rhq.server.database.connection-url"    value="${rhq.dev.ds.connection-url}" />
+        <property name="rhq.server.database.user-name"         value="${rhq.dev.ds.user-name}" />
+        <property name="rhq.server.database.password"          value="${rhq.dev.ds.password.encrypted}" />
+        <property name="rhq.server.database.type-mapping"      value="${rhq.dev.ds.type-mapping}" />
+        <property name="rhq.server.database.server-name"       value="${rhq.dev.ds.server-name}" />
+        <property name="rhq.server.database.port"              value="${rhq.dev.ds.port}" />
+        <property name="rhq.server.database.db-name"           value="${rhq.dev.ds.db-name}" />
+        <property name="rhq.server.quartz.driverDelegateClass" value="${rhq.dev.quartz.driverDelegateClass}" />
+        <property name="rhq.server.quartz.selectWithLockSQL"   value="${rhq.dev.quartz.selectWithLockSQL}" />
+        <property name="rhq.server.quartz.lockHandlerClass"    value="${rhq.dev.quartz.lockHandlerClass}" />
+        <property name="rhq.server.drift.store-binary-content" value="${default.rhq.server.drift.binary.content}"/>
+    </target>
+
+    <target name="set-default-server-props" unless="predeploy">
+        <echo>*** Using default database settings in rhq-server.properties...</echo>
+        <property name="rhq.server.database.hibernate-dialect" value="${default.rhq.server.database.hibernate-dialect}" />
+        <property name="rhq.server.database.connection-url"    value="${default.rhq.server.database.connection-url}" />
+        <property name="rhq.server.database.user-name"         value="${default.rhq.server.database.user-name}" />
+        <property name="rhq.server.database.password"          value="${default.rhq.server.database.password.encrypted}" />
+        <property name="rhq.server.database.type-mapping"      value="${default.rhq.server.database.type-mapping}" />
+        <property name="rhq.server.database.server-name"       value="${default.rhq.server.database.server-name}" />
+        <property name="rhq.server.database.port"              value="${default.rhq.server.database.port}" />
+        <property name="rhq.server.database.db-name"           value="${default.rhq.server.database.db-name}" />
+        <property name="rhq.server.quartz.driverDelegateClass" value="${default.rhq.server.quartz.driverDelegateClass}" />
+        <property name="rhq.server.quartz.selectWithLockSQL"   value="${default.rhq.server.quartz.selectWithLockSQL}" />
+        <property name="rhq.server.quartz.lockHandlerClass"    value="${default.rhq.server.quartz.lockHandlerClass}" />
+        <property name="rhq.server.drift.store-binary-content" value="${default.rhq.server.drift.binary.content}"/>
+    </target>
+
+    <target name="initialize" depends="set-predeploy-prop, set-dev-server-props, set-default-server-props">
+        <echo>*** Database type is ${rhq.server.database.type-mapping}</echo>
+        <property name="jboss.home" location="${project.build.outputDirectory}/jbossas" />
+
+        <!-- TODO: if JBossAS has a marker file that we can check to see if server is running, we can use it here -->
+        <!--
+            <property name="marker.file" location="${jboss.home}/server/default/data/hypersonic/localDB.lck" />
+            <fail message="The RHQ container appears to be currently running (${marker.file} exists). Please stop the container before rebuilding it in place.">
+                <condition>
+                    <available file="${marker.file}" />
+                </condition>
+            </fail>
+        -->
+
+        <property name="jboss.deploy.dir" location="${jboss.home}/standalone/deployments" />
+
+        <condition property="use-postgres" value="true">
+            <contains string="${rhq.server.database.type-mapping}" substring="postgres" casesensitive="false" />
+        </condition>
+        <condition property="use-oracle" value="true">
+            <contains string="${rhq.server.database.type-mapping}" substring="oracle" casesensitive="false" />
+        </condition>
+
+        <condition property="copy.dev.resources" value="true">
+            <or>
+                <equals arg1="${dev.profile.active}" arg2="true" />
+                <equals arg1="${developer}" arg2="true" />
+            </or>
+        </condition>
+
+        <condition property="predeploy-postgres" value="true">
+            <and>
+                <equals arg1="${predeploy}" arg2="true" />
+                <equals arg1="${use-postgres}" arg2="true" />
+            </and>
+        </condition>
+
+        <condition property="predeploy-oracle" value="true">
+            <and>
+                <equals arg1="${predeploy}" arg2="true" />
+                <equals arg1="${use-oracle}" arg2="true" />
+            </and>
+        </condition>
+
+        <!-- developers might want to deploy agent/server plugins frequently, so we'll scan every 30 seconds -->
+        <!-- in production, plugins change very infrequently, so only scan every 5 minutes -->
+        <condition property="rhq.server.plugin-scan-period-ms" value="30000">
+            <or>
+                <equals arg1="${dev.profile.active}" arg2="true" />
+                <equals arg1="${developer}" arg2="true" />
+            </or>
+        </condition>
+        <condition property="rhq.server.plugin-scan-period-ms" value="300000">
+            <not>
+                <or>
+                    <equals arg1="${dev.profile.active}" arg2="true" />
+                    <equals arg1="${developer}" arg2="true" />
+                </or>
+            </not>
+        </condition>
+
+    </target>
+
+    <target name="prepare-container"
+            depends="prepare-jbossas-dir,
+                     prepare-bin-dir" />
+
+    <target name="prepare-jbossas-dir"
+            depends="initialize"
+            description="prepare JBossAS for hosting the RHQ Server">
+
+        <echo>*** Preparing jbossas dir ***</echo>
+
+        <echo>Unzipping vanilla JBoss dist zipfile found at ${jboss.zip}</echo>
+        <condition property="jboss.uptodate">
+            <and>
+                <uptodate srcfile="${jboss.zip}" targetfile="${jboss.home}" />
+                <available file="${jboss.home}/jboss-modules.jar" type="file" />
+            </and>
+        </condition>
+
+        <antcall target="unzip-jboss" />
+
+        <echo>Checking that we have a valid JBossAS distribution...</echo>
+        <available file="${jboss.home}/jboss-modules.jar" type="file" property="jboss.home.is.valid" />
+        <fail unless="jboss.home.is.valid" message="${jboss.home} does not contain a valid JBossAS installation - aborting!" />
+
+        <!-- TODO: THESE WERE NEEDED IN THE OLD 4.2.3 CONTAINER - WE SHOULD BE ABLE TO DELETE THESE
+        <echo>Installing patched hibernate jar ...</echo>
+        <copy file="${settings.localRepository}/hibernate/hibernate3/${hibernate3.version}/hibernate3-${hibernate3.version}.jar"
+              tofile="${jboss.home}/server/default/lib/hibernate3.jar" verbose="true"/>
+
+        <echo>Installing custom container library...</echo>
+        <copy file="${settings.localRepository}/org/rhq/rhq-container-lib/${rhq.version}/rhq-container-lib-${rhq.version}.jar"
+              tofile="${jboss.home}/server/default/lib/rhq-container-lib-${rhq.version}.jar" verbose="true"/>
+        -->
+
+        <property name="jboss.modules.dir" location="${jboss.home}/modules" />
+        <echo>Adding JDBC modules to ${jboss.modules.dir} ...</echo>
+        <copy file="${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar"
+              toDir="${jboss.modules.dir}/org/rhq/oracle/main" failonerror="false" verbose="true" />
+        <echo file="${jboss.modules.dir}/org/rhq/oracle/main/module.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<module xmlns="urn:jboss:module:1.1" name="org.rhq.oracle">
+    <resources>
+        <resource-root path="ojdbc6-${ojdbc6.version}.jar"/>
+    </resources>
+    <dependencies>
+        <module name="javax.api"/>
+        <module name="javax.transaction.api"/>
+    </dependencies>
+</module>
+]]></echo>
+        <copy file="${settings.localRepository}/postgresql/postgresql/${postgresql.version}/postgresql-${postgresql.version}.jar"
+              toDir="${jboss.modules.dir}/org/rhq/postgres/main" verbose="true" />
+        <echo file="${jboss.modules.dir}/org/rhq/postgres/main/module.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<module xmlns="urn:jboss:module:1.1" name="org.rhq.postgres">
+    <resources>
+        <resource-root path="postgresql-${postgresql.version}.jar"/>
+    </resources>
+    <dependencies>
+        <module name="javax.api"/>
+        <module name="javax.transaction.api"/>
+    </dependencies>
+</module>
+]]></echo>
+
+        <echo>Generate SSL key for RHQ server - 128-bit key that expires in 20 years</echo>
+        <property name="jboss.conf.dir" location="${jboss.home}/standalone/configuration" />
+        <available file="${jboss.conf.dir}/rhq.keystore" type="file" property="rhq.keystore.exists" />
+        <antcall target="generate-rhq-ssl-key" />
+
+        <echo>Delete the various working directories if they happen to exist</echo>
+        <delete dir="${jboss.home}/standalone/data" />
+        <delete dir="${jboss.home}/standalone/log" />
+        <delete dir="${jboss.home}/standalone/tmp" />
+        <delete dir="${jboss.home}/standalone/work" /> <!-- TODO: does AS7 still have this? -->
+
+        <!-- TODO: we need to put Quartz in the ear and deploy a scheduler sar -->
+        <!--
+        <echo>Upgrading Quartz to v${quartz.version} ...</echo>
+        <copy file="${settings.localRepository}/org/opensymphony/quartz/quartz/${quartz.version}/quartz-${quartz.version}.jar"
+              tofile="${jboss.home}/server/default/lib/quartz.jar" overwrite="true" verbose="true" />
+        <copy file="${settings.localRepository}/org/opensymphony/quartz/quartz-oracle/${quartz.version}/quartz-oracle-${quartz.version}.jar"
+              tofile="${jboss.home}/server/default/lib/quartz-oracle.jar" overwrite="true" verbose="true" />
+        -->
+
+        <echo>Deploying ${rhq.earName} ...</echo>
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}" />
+        <unjar src="${settings.localRepository}/org/rhq/rhq-enterprise-server-ear/${rhq.version}/rhq-enterprise-server-ear-${rhq.version}.ear"
+               dest="${jboss.deploy.dir}/${rhq.earName}" />
+
+        <echo>Deploying installer webapp ...</echo>
+        <mkdir dir="${jboss.deploy.dir}/rhq-installer.war" />
+        <unwar src="${settings.localRepository}/org/rhq/rhq-installer/${rhq.version}/rhq-installer-${rhq.version}.war"
+               dest="${jboss.deploy.dir}/rhq-installer.war" />
+
+        <!-- TODO: deploy embedded agent sar -->
+        <!--
+        <echo>Deploying embedded agent sar ...</echo>
+        <mkdir dir="${jboss.deploy.dir}/rhq-agent.sar" />
+        <unjar src="${settings.localRepository}/org/rhq/rhq-enterprise-server-agent-sar/${rhq.version}/rhq-enterprise-server-agent-sar-${rhq.version}.sar"
+               dest="${jboss.deploy.dir}/rhq-agent.sar" />
+        -->
+
+        <echo>Delete docs, README, et. al. files</echo>
+        <delete dir="${jboss.home}/docs/examples" />
+        <delete>
+            <fileset dir="${jboss.home}" includes="*.txt" />
+        </delete>
+
+        <echo>Delete domain files - we only start in standalone mode</echo>
+        <delete dir="${jboss.home}/domain" />
+
+        <!-- TODO: setup our own welcome-content that points to our app -->
+        <!--
+        <echo>Setup welcome content</echo>
+        <delete dir="${jboss.home}/welcome-content" />
+        -->
+
+        <echo>Make sure the top level downloads directory exists</echo>
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads" />
+
+        <echo>Deploying static downloadable content</echo>
+        <copy todir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads" 
+              verbose="true"
+              failonerror="false">
+            <fileset dir="${basedir}/src/main/downloadable-resources" />
+        </copy>
+      
+        <echo>Make sure our downloads directories exist</echo>
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/rhq-agent" />
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/rhq-client" />
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/rhq-plugins" />
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/connectors" />
+        <mkdir dir="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/bundle-deployer" />
+
+        <echo>Deploying the latest agent update binary and renaming it rhq-enterprise-agent-${rhq.version}.jar</echo>
+        <copy file="${settings.localRepository}/org/rhq/rhq-enterprise-agentupdate/${rhq.version}/rhq-enterprise-agentupdate-${rhq.version}.jar"
+              tofile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/rhq-agent/rhq-enterprise-agent-${rhq.version}.jar"
+              verbose="true"
+              failonerror="true"/>
+
+        <echo>Deploying the latest remote client binary</echo>
+        <copy file="${settings.localRepository}/org/rhq/rhq-remoting-cli/${rhq.version}/rhq-remoting-cli-${rhq.version}.zip"
+              tofile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/rhq-client/rhq-remoting-cli-${rhq.version}.zip"
+              verbose="true"
+              failonerror="false"/>
+
+        <echo>Deploying the latest command-line bundle deployer to the downloads location</echo>
+        <copy file="${settings.localRepository}/org/rhq/rhq-ant-bundle-common/${rhq.version}/rhq-ant-bundle-common-${rhq.version}.zip"
+              tofile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/bundle-deployer/rhq-bundle-deployer-${rhq.version}.zip"
+              verbose="true"
+              failonerror="false"/>
+
+        <antcall target="package-connectors" />
+        <echo>Deploying RT filter jar ...</echo>
+        <unzip src="${settings.localRepository}/org/rhq/helpers/rhq-rtfilter/${project.version}/rhq-rtfilter-${project.version}.zip" 
+               dest="${jboss.home}/modules" />
+
+        <unzip src="${settings.localRepository}/org/rhq/helpers/rhq-rtfilter-subsystem/${project.version}/rhq-rtfilter-subsystem-${project.version}.zip" 
+               dest="${jboss.home}/modules" />
+        <!-- TODO: it is up to either the installer or our EAR's WAR to use this so JON itself can have its RT data collected -->
+
+    </target>
+
+    <target name="package-connectors">
+        <echo>Deploying the response-time (RT) servlet filter connectors ...</echo>
+        <delete file="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/connectors/connector-rtfilter.zip" />
+        <zip destfile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/connectors/connector-rtfilter.zip">
+            <zipfileset dir="${settings.localRepository}/org/rhq/helpers/rhq-rtfilter/${project.version}">
+                <include name="rhq-rtfilter-${project.version}.jar" />
+            </zipfileset>
+            <zipfileset dir="${settings.localRepository}/commons-logging/commons-logging/1.1.1">
+                <include name="commons-logging-1.1.1.jar" />
+            </zipfileset>
+        </zip>
+
+        <!-- rtfilter AS7 modules -->
+        <copy file="${settings.localRepository}/org/rhq/helpers/rhq-rtfilter/${project.version}/rhq-rtfilter-${project.version}.zip" 
+              tofile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/connectors/rhq-rtfilter-module.zip" />
+
+        <copy file="${settings.localRepository}/org/rhq/helpers/rhq-rtfilter-subsystem/${project.version}/rhq-rtfilter-subsystem-${project.version}.zip" 
+              tofile="${jboss.deploy.dir}/${rhq.earName}/rhq-downloads/connectors/rhq-rtfilter-subsystem-module.zip" />
+    </target>
+
+    <target name="prepare-bin-dir">
+        <echo>*** Preparing bin dir ***</echo>
+        <echo>Connection URL is ${rhq.server.database.connection-url}</echo>
+
+        <property name="rhq.bin.dir" location="${project.build.outputDirectory}/bin" />
+        <mkdir dir="${rhq.bin.dir}" />
+        <echo file="${rhq.bin.dir}/rhq-server.properties">### RHQ Server Configuration Properties
+
+# Database
+rhq.server.database.connection-url=${rhq.server.database.connection-url}
+rhq.server.database.user-name=${rhq.server.database.user-name}
+rhq.server.database.password=${rhq.server.database.password}
+rhq.server.database.type-mapping=${rhq.server.database.type-mapping}
+rhq.server.database.server-name=${rhq.server.database.server-name}
+rhq.server.database.port=${rhq.server.database.port}
+rhq.server.database.db-name=${rhq.server.database.db-name}
+hibernate.dialect=${rhq.server.database.hibernate-dialect}
+
+# Quartz
+rhq.server.quartz.driverDelegateClass=${rhq.server.quartz.driverDelegateClass}
+rhq.server.quartz.selectWithLockSQL=${rhq.server.quartz.selectWithLockSQL}
+rhq.server.quartz.lockHandlerClass=${rhq.server.quartz.lockHandlerClass}
+
+# Container configuration
+# ********************************** NOTE ************************************
+# If the jboss.bind.address property is set to anything besides 0.0.0.0,
+# uncomment the java.rmi.server.hostname property below and set it to the same
+# value - setting it to ${jboss.bind.address} will *not* work.
+jboss.bind.address=0.0.0.0
+#java.rmi.server.hostname=0.0.0.0
+
+# High Availability (HA)
+rhq.server.high-availability.name=
+rhq.server.maintenance-mode-at-startup=false
+
+# General Properties
+rhq.server.startup.web.http.port=${rhq.server.http.port}
+rhq.server.startup.web.https.port=${rhq.server.https.port}
+rhq.server.startup.webservice.port=9093
+rhq.server.startup.namingservice.port=2099
+rhq.server.startup.namingservice.rmiport=2098
+rhq.server.startup.jrmpinvoker.rmiport=7444
+rhq.server.startup.pooledinvoker.rmiport=7445
+rhq.server.startup.ajp.port=9009
+rhq.server.startup.unifiedinvoker.port=5446
+rhq.server.startup.aspectdeployer.bind-port=4873
+
+# The number of concurrent threads used to deploy plugins.
+# Currently, it is not recommended to increase this value.
+rhq.server.plugin-deployer-threads=1
+
+# RHQ Server's remote endpoint for agents to talk to
+# bind-address and bind-port are derived from the HA server definition,
+# if you set the address/port here, they will override the HA server definition found in the database
+rhq.communications.connector.transport=servlet
+rhq.communications.connector.bind-address=
+rhq.communications.connector.bind-port=
+rhq.communications.connector.transport-params=/jboss-remoting-servlet-invoker/ServerInvokerServlet
+
+# Multicast detector configuration for auto-discovery
+rhq.communications.multicast-detector.enabled=false
+rhq.communications.multicast-detector.bind-address=${jboss.bind.address}
+rhq.communications.multicast-detector.multicast-address=224.16.16.16
+rhq.communications.multicast-detector.port=16162
+
+# Server-side SSL Security Configuration for HTTPS thru Tomcat
+# These are used for browser https: access and for incoming messages from agents over sslservlet transport
+# [you cannot use ${x} variables - see https://jira.jboss.org/jira/browse/JBWEB-74]
+rhq.server.tomcat.security.client-auth-mode=want
+rhq.server.tomcat.security.secure-socket-protocol=TLS
+rhq.server.tomcat.security.algorithm=SunX509
+rhq.server.tomcat.security.keystore.alias=RHQ
+rhq.server.tomcat.security.keystore.file=conf/rhq.keystore
+rhq.server.tomcat.security.keystore.password=RHQManagement
+rhq.server.tomcat.security.keystore.type=JKS
+rhq.server.tomcat.security.truststore.file=conf/rhq.truststore
+rhq.server.tomcat.security.truststore.password=RHQManagement
+rhq.server.tomcat.security.truststore.type=JKS
+
+# Server-side SSL Security Configuration (for incoming messages from agents)
+# These are used when secure transports other than sslservlet are used
+rhq.communications.connector.security.secure-socket-protocol=TLS
+rhq.communications.connector.security.keystore.file=${jboss.server.home.dir}/conf/rhq.keystore
+rhq.communications.connector.security.keystore.algorithm=SunX509
+rhq.communications.connector.security.keystore.type=JKS
+rhq.communications.connector.security.keystore.password=RHQManagement
+rhq.communications.connector.security.keystore.key-password=RHQManagement
+rhq.communications.connector.security.keystore.alias=RHQ
+rhq.communications.connector.security.truststore.file=${jboss.server.home.dir}/conf/rhq.truststore
+rhq.communications.connector.security.truststore.algorithm=SunX509
+rhq.communications.connector.security.truststore.type=JKS
+rhq.communications.connector.security.truststore.password=RHQManagement
+rhq.communications.connector.security.client-auth-mode=none
+
+# Client-side SSL Security Configuration (for outgoing messages to agents)
+rhq.server.client.security.secure-socket-protocol=TLS
+rhq.server.client.security.keystore.file=${jboss.server.home.dir}/conf/rhq.keystore
+rhq.server.client.security.keystore.algorithm=SunX509
+rhq.server.client.security.keystore.type=JKS
+rhq.server.client.security.keystore.password=RHQManagement
+rhq.server.client.security.keystore.key-password=RHQManagement
+rhq.server.client.security.keystore.alias=RHQ
+rhq.server.client.security.truststore.file=${jboss.server.home.dir}/conf/rhq.truststore
+rhq.server.client.security.truststore.algorithm=SunX509
+rhq.server.client.security.truststore.type=JKS
+rhq.server.client.security.truststore.password=RHQManagement
+rhq.server.client.security.server-auth-mode-enabled=false
+
+# Embedded RHQ Agent
+rhq.server.embedded-agent.enabled=false
+rhq.server.embedded-agent.name=
+rhq.server.embedded-agent.reset-configuration=true
+rhq.server.embedded-agent.disable-native-system=false
+
+# Email
+rhq.server.email.smtp-host=localhost
+rhq.server.email.smtp-port=25
+rhq.server.email.from-address=rhqadmin at localhost
+
+# Operations/controls timeout
+# Defines the default timeout for all operations (specified in seconds)
+rhq.server.operation-timeout=600
+
+# Concurrency limits for incoming UI and agent messages
+rhq.server.startup.web.max-connections=200
+rhq.server.agent-downloads-limit=45
+rhq.server.client-downloads-limit=5
+rhq.communications.global-concurrency-limit=30
+rhq.server.concurrency-limit.inventory-report=5
+rhq.server.concurrency-limit.availability-report=25
+rhq.server.concurrency-limit.inventory-sync=10
+rhq.server.concurrency-limit.content-report=5
+rhq.server.concurrency-limit.content-download=5
+rhq.server.concurrency-limit.measurement-report=10
+rhq.server.concurrency-limit.measurement-schedule-request=10
+
+# Content Local Filesystem Repository
+rhq.server.content.filesystem=${jboss.server.data.dir}/packagebits
+
+# The frequency (in millis) the server checks for updated plugins
+rhq.server.plugin-scan-period-ms=${rhq.server.plugin-scan-period-ms}
+
+# When this is enabled, the server at start up will compare its endpoint
+# address to the host name/address found on the host machine. If they differ,
+# the server endpoint address will be updated to the value found on the host
+# machine. This is targeted for use in cloud deployments where IP addresses
+# change frequently, but it can be of use in other deployment settings where
+# you have to deal with IP address changes.
+rhq.sync.endpoint-address=false
+
+# When this is enabled, the server will request that agents send content for
+# for binary files that are being monitored for drift. The content for those
+# files will then be persisted on the server. By default, the server does not
+# persist content for well known binary file types like .ear, .war, .zip, .so,
+# etc. The server does however persist content for text files or any other
+# files that are not known binary types.
+# rhq.server.drift.store-binary-content=${rhq.server.drift.store-binary-content}
+
+# Auto-Install Pre-Configuration Settings
+# If you wish to circumvent the installer webapp and auto-install the server
+# immediately upon first startup, make sure all of the settings above are
+# correctly set for your server's deployment environment. Then make sure the
+# following rhq.autoinstall properties are defined appropriately:
+# rhq.autoinstall.enabled: must be true to trigger the automatic install
+# rhq.autoinstall.database: allowed values: auto, overwrite, skip
+#                           "auto" will create a new schema if one does not
+#                           yet exist or, if a schema does exist, will simply
+#                           upgrade it as needed (which keeps existing data).
+#                           "overwrite" if you want to create an empty schema,
+#                           even if one already exists (loses existing data).
+#                           "skip" if you don't want to do any database
+#                           upgrade or creation. WARNING! You must ensure your
+#                           database schema already exists and is up to date.
+# rhq.autoinstall.public-endpoint-address: public IP/hostname that all agents
+#                                          will use to talk to this server.
+#                                          If not set, a value to use is
+#                                          determined at auto-install time.
+rhq.autoinstall.enabled=false
+rhq.autoinstall.database=auto
+rhq.autoinstall.public-endpoint-address=
+
+</echo>
+
+    </target>
+
+    <target name="unzip-jboss" unless="jboss.uptodate">
+        <echo>Unzipping JBossAS ${jboss.version} found at ${jboss.zip}</echo>
+        <unzip src="${jboss.zip}" dest="${basedir}/target" />
+        <delete dir="${jboss.home}" />
+        <move file="${basedir}/target/jboss-as-${jboss.version}" tofile="${jboss.home}" />
+    </target>
+
+    <target name="generate-rhq-ssl-key" unless="rhq.keystore.exists">
+        <echo>Generating self-signed certificate in ${jboss.conf.dir} ...</echo>
+        <genkey alias="RHQ"
+                keystore="${jboss.conf.dir}/rhq.keystore"
+                keyalg="rsa"
+                storepass="RHQManagement"
+                validity="7300"
+                dname="CN=RHQ, OU=RHQ, O=rhq-project.org, C=US" />
+        <!-- the rhq.truststore is pre-built and checked into git. It is empty with the same store pass as above -->
+    </target>
+
+    <target name="copy-dev-resources" if="copy.dev.resources">
+        <echo>Copying dev-only resources ...</echo>
+        <copy todir="${project.build.outputDirectory}" verbose="true">
+            <fileset dir="src/main/dev-resources" />
+        </copy>
+        <echo>Putting a developer setting in rhq-server.properties to turn on/off strict agent update version checking</echo>
+        <echo file="${project.build.outputDirectory}/bin/rhq-server.properties" append="true">rhq.server.agent-update.nonstrict-version-check=true</echo>
+    </target>
+
+    <!-- The prepare-release target must be run AFTER the resources:resources goal has executed. -->
+    <!-- (i.e. after rhq-server.sh, etc. have been copied over by the resources plugin) -->
+
+    <target name="prepare-release"
+            description="If this is a release build, make sure it is properly prepared."
+            depends="initialize,
+                     fix-perms,
+                     prepare-postinstaller-war,
+                     developer-release-message,
+                     copy-dev-resources,
+                     deploy-postgres-ds,
+                     deploy-oracle-ds,
+                     undeploy-ear">
+
+        <echo>Adding license files...</echo>
+        <copy todir="${project.build.outputDirectory}">
+            <fileset dir="${basedir}/../../../.." includes="LICENSE*" />
+        </copy>
+    </target>
+
+    <target name="fix-perms">
+        <!-- Make sure shell scripts are readable and executable. -->
+        <chmod dir="${project.build.outputDirectory}/bin" includes="*.sh" perm="ug+x" verbose="true" />
+        <chmod dir="${jboss.home}/bin" includes="*.sh" perm="ug+x" verbose="true" />
+    </target>
+
+    <target name="prepare-postinstaller-war">
+        <!-- nothing to do here - leaving in case we need to perform things in the future -->
+    </target>
+
+    <target name="developer-release-message" if="predeploy">
+        <echo>!!THIS IS A DEVELOPER CONTAINER BUILD - PRE-DEPLOYING RHQ SERVER!!</echo>
+    </target>
+
+    <!-- TODO: when we ship with an embedded agent -->
+    <!--
+    <target name="undeploy-embedded-agent" unless="predeploy">
+        <echo>Preparing for release - undeploying Embedded Agent...</echo>
+        <move file="${jboss.deploy.dir}/rhq-agent.sar" tofile="${jboss.deploy.dir}/rhq-agent.sar.skipdeploy" />
+    </target>
+    -->
+
+    <target name="undeploy-ear" unless="predeploy">
+        <echo>Preparing for release - telling AS to skip ear deployment</echo>
+        <touch file="${jboss.deploy.dir}/${rhq.earName}.skipdeploy" />
+    </target>
+
+    <target name="deploy-postgres-ds" if="predeploy-postgres">
+        <echo>Postgres will be your datasource backend!</echo>
+    </target>
+
+    <target name="deploy-oracle-ds" if="predeploy-oracle">
+        <echo>Oracle will be your datasource backend!</echo>
+    </target>
+
+</project>
+


commit baa1cb98d2719e9c58e79765a863312ede455593
Author: John Mazzitelli <mazz at redhat.com>
Date:   Fri Jul 20 17:14:55 2012 -0400

    fix typo

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index f93b823..0fc0215 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -475,7 +475,7 @@ public class Installer implements EntryPoint {
         });
 
         serverSettingWebSecureHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTPS_PORT,
-            PROPS_MSG.rhq_server_startup_web_http_port());
+            PROPS_MSG.rhq_server_startup_web_https_port());
         serverSettingWebSecureHttpPort.setWidth(fieldWidth);
         serverSettingWebSecureHttpPort.setMin(1);
         serverSettingWebSecureHttpPort.setMax(65535);


commit 9ed79911f33268aa7075228bd8d42635275b238e
Author: John Mazzitelli <mazz at redhat.com>
Date:   Fri Jul 20 02:52:14 2012 -0400

    the workflow in the gui is mostly done i think. just a matter of getting the server-side code to install everything that the user asked for.

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index 12d5885..f93b823 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -40,6 +40,8 @@ import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
 import com.smartgwt.client.widgets.form.fields.PasswordItem;
 import com.smartgwt.client.widgets.form.fields.SelectItem;
 import com.smartgwt.client.widgets.form.fields.SpacerItem;
@@ -47,9 +49,10 @@ import com.smartgwt.client.widgets.form.fields.SpinnerItem;
 import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
+import com.smartgwt.client.widgets.form.fields.events.IconClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.IconClickHandler;
 import com.smartgwt.client.widgets.grid.ListGrid;
 import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
 import com.smartgwt.client.widgets.grid.events.EditCompleteEvent;
 import com.smartgwt.client.widgets.grid.events.EditCompleteHandler;
 import com.smartgwt.client.widgets.layout.VLayout;
@@ -58,6 +61,7 @@ import com.smartgwt.client.widgets.tab.TabSet;
 import com.smartgwt.client.widgets.toolbar.ToolStrip;
 
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
 import org.rhq.enterprise.gui.installer.client.shared.ServerProperties;
 
 /**
@@ -71,12 +75,12 @@ public class Installer implements EntryPoint {
     public static final Messages MSG = GWT.create(Messages.class);
     public static final ServerPropertiesMessages PROPS_MSG = GWT.create(ServerPropertiesMessages.class);
 
-    private static final String PROPERTY_NAME = "propertyName";
-    private static final String PROPERTY_VALUE = "propertyValue";
+    private static final String NEW_SERVER_TO_REGISTER = "*new*";
 
-    private InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
-    private HashMap<String, String> serverProperties = new HashMap<String, String>();
-    private HashMap<String, String> originalProperties = new HashMap<String, String>();
+    private final InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
+    private final ServerPropertyRecordList serverProperties = new ServerPropertyRecordList();
+    private final HashMap<String, String> originalProperties = new HashMap<String, String>();
+    private final LinkedHashMap<String, String> registeredServerNames = new LinkedHashMap<String, String>();
 
     private ListGrid advancedPropertyItemGrid;
     private Button mainInstallButton;
@@ -120,7 +124,7 @@ public class Installer implements EntryPoint {
     }
 
     private void updateServerProperty(String name, Object value) {
-        serverProperties.put(name, value == null ? "" : value.toString());
+        serverProperties.putServerProperty(name, value == null ? "" : value.toString());
         refreshAdvancedView();
     }
 
@@ -131,8 +135,7 @@ public class Installer implements EntryPoint {
                 if (result.size() == 0) {
                     SC.say("Initial server properties are missing.");
                 }
-                serverProperties.clear();
-                serverProperties.putAll(result);
+                serverProperties.replaceServerProperties(result);
 
                 // remember these original properties in case the user wants to reset them back
                 originalProperties.clear();
@@ -152,34 +155,26 @@ public class Installer implements EntryPoint {
     }
 
     private void refreshSimpleView() {
+        Map<String, String> props = serverProperties.getMap();
+
         // DB SETTINGS
-        dbType.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_TYPE));
-        dbConnectionUrl.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
-        dbUsername.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_USERNAME));
+        dbType.setValue(props.get(ServerProperties.PROP_DATABASE_TYPE));
+        dbConnectionUrl.setValue(props.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
+        dbUsername.setValue(props.get(ServerProperties.PROP_DATABASE_USERNAME));
         // do not prefill the database password - force the user to know it and type it in for security purposes
 
         // SERVER SETTINGS
-        serverSettingServerName.setValue(serverProperties.get(ServerProperties.PROP_HIGH_AVAILABILITY_NAME));
-        serverSettingWebHttpPort.setValue(serverProperties.get(ServerProperties.PROP_WEB_HTTP_PORT));
-        serverSettingWebSecureHttpPort.setValue(serverProperties.get(ServerProperties.PROP_WEB_HTTPS_PORT));
-        serverSettingEmailSMTPHostname.setValue(serverProperties.get(ServerProperties.PROP_EMAIL_SMTP_HOST));
-        serverSettingEmailFromAddress.setValue(serverProperties.get(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
+        serverSettingServerName.setValue(props.get(ServerProperties.PROP_HIGH_AVAILABILITY_NAME));
+        serverSettingWebHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTP_PORT));
+        serverSettingWebSecureHttpPort.setValue(props.get(ServerProperties.PROP_WEB_HTTPS_PORT));
+        serverSettingEmailSMTPHostname.setValue(props.get(ServerProperties.PROP_EMAIL_SMTP_HOST));
+        serverSettingEmailFromAddress.setValue(props.get(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
 
-        dbExistingSchemaOption.hide();
-        testConnectionButton.setIcon(null);
+        forceAnotherTestConnection();
     }
 
     private void refreshAdvancedView() {
-        ArrayList<ListGridRecord> records = new ArrayList<ListGridRecord>();
-        for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
-            ListGridRecord record = new ListGridRecord();
-            record.setAttribute(PROPERTY_NAME, entry.getKey());
-            record.setAttribute(PROPERTY_VALUE, entry.getValue());
-            records.add(record);
-        }
-        advancedPropertyItemGrid.setData(records.toArray(new ListGridRecord[records.size()]));
         advancedPropertyItemGrid.markForRedraw();
-        return;
     }
 
     private Canvas createHeader() {
@@ -216,23 +211,22 @@ public class Installer implements EntryPoint {
         final TabSet topTabSet = new TabSet();
         topTabSet.setTabBarPosition(Side.TOP);
         topTabSet.setTabBarAlign(Side.LEFT);
-        topTabSet.setWidth("80%");
-        topTabSet.setHeight("75%");
+        topTabSet.setWidth("90%");
 
         final Tab welcomeTab = new Tab(MSG.tab_welcome());
         Label welcomeLabel = new Label(MSG.tab_welcome_content());
         welcomeTab.setPane(welcomeLabel);
 
-        final Tab databaseTab = new Tab(MSG.tab_simpleView());
-        Canvas databaseForm = createSimpleForm();
-        databaseTab.setPane(databaseForm);
+        final Tab simpleViewTab = new Tab(MSG.tab_simpleView());
+        Canvas simpleForm = createSimpleForm();
+        simpleViewTab.setPane(simpleForm);
 
         final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
         Canvas advancedView = createAdvancedView();
         advancedViewTab.setPane(advancedView);
 
         topTabSet.addTab(welcomeTab);
-        topTabSet.addTab(databaseTab);
+        topTabSet.addTab(simpleViewTab);
         topTabSet.addTab(advancedViewTab);
 
         return topTabSet;
@@ -247,10 +241,10 @@ public class Installer implements EntryPoint {
         IButton saveButton = new IButton(MSG.button_save());
         saveButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
-                installerService.saveServerProperties(serverProperties, new AsyncCallback<Void>() {
+                installerService.saveServerProperties(serverProperties.getMap(), new AsyncCallback<Void>() {
                     public void onSuccess(Void result) {
                         originalProperties.clear();
-                        originalProperties.putAll(serverProperties);
+                        originalProperties.putAll(serverProperties.getMap());
                         SC.say("Properties saved to server");
                     }
 
@@ -263,8 +257,7 @@ public class Installer implements EntryPoint {
         IButton resetButton = new IButton(MSG.button_reset());
         resetButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
-                serverProperties.clear();
-                serverProperties.putAll(originalProperties);
+                serverProperties.replaceServerProperties(originalProperties);
                 refreshAdvancedView();
             }
         });
@@ -275,22 +268,23 @@ public class Installer implements EntryPoint {
         advancedPropertyItemGrid = new ListGrid();
         advancedPropertyItemGrid.setWidth100();
         advancedPropertyItemGrid.setHeight100();
-        advancedPropertyItemGrid.setData(new ListGridRecord[0]);
+        advancedPropertyItemGrid.setData(serverProperties);
 
-        ListGridField nameField = new ListGridField(PROPERTY_NAME, MSG.property_name_label());
+        ListGridField nameField = new ListGridField(ServerPropertyRecordList.PROPERTY_NAME, MSG.property_name_label());
         nameField.setCanEdit(false);
 
-        ListGridField valueField = new ListGridField(PROPERTY_VALUE, MSG.property_value_label());
+        ListGridField valueField = new ListGridField(ServerPropertyRecordList.PROPERTY_VALUE,
+            MSG.property_value_label());
         valueField.setCanEdit(true);
 
         advancedPropertyItemGrid.setFields(nameField, valueField);
-        advancedPropertyItemGrid.setSortField(PROPERTY_NAME);
+        advancedPropertyItemGrid.setSortField(ServerPropertyRecordList.PROPERTY_NAME);
 
         advancedPropertyItemGrid.addEditCompleteHandler(new EditCompleteHandler() {
             public void onEditComplete(EditCompleteEvent event) {
                 String newValue = (String) event.getNewValues().values().iterator().next().toString();
-                String changedProperty = event.getOldRecord().getAttribute(PROPERTY_NAME);
-                serverProperties.put(changedProperty, newValue);
+                String changedProperty = event.getOldRecord().getAttribute(ServerPropertyRecordList.PROPERTY_NAME);
+                serverProperties.getMap().put(changedProperty, newValue); // we need this to be reflected in the internal map
                 refreshSimpleView();
             }
         });
@@ -302,7 +296,7 @@ public class Installer implements EntryPoint {
 
     private Canvas createSimpleForm() {
 
-        final int fieldWidth = 250;
+        final int fieldWidth = 300;
 
         ////////////////////////////////////////////////////////
         // The Database form
@@ -322,6 +316,7 @@ public class Installer implements EntryPoint {
         dbConnectionUrl.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
             }
         });
 
@@ -331,6 +326,7 @@ public class Installer implements EntryPoint {
         dbUsername.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_DATABASE_USERNAME, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
             }
         });
 
@@ -340,6 +336,7 @@ public class Installer implements EntryPoint {
         dbPassword.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_DATABASE_PASSWORD, String.valueOf(event.getValue()));
+                forceAnotherTestConnection();
             }
         });
 
@@ -353,48 +350,42 @@ public class Installer implements EntryPoint {
         dbExistingSchemaOption.setVisible(false);
         dbExistingSchemaOption.setWidth(fieldWidth);
         dbExistingSchemaOption.setWrapTitle(true);
+        dbExistingSchemaOption.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                if (registeredServersSelection != null) {
+                    String selected = event.getValue().toString();
+                    if ("overwrite".equals(selected)) {
+                        registeredServersSelection.setValue((String) null);
+                        registeredServersSelection.disable();
+                    } else {
+                        registeredServersSelection.enable();
+                    }
+                }
+            }
+        });
 
         testConnectionButton = new ButtonItem("testConnectionButton", MSG.button_testConnection());
         testConnectionButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
             public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
-                final String connectionUrl = dbConnectionUrl.getValueAsString();
-                final String username = dbUsername.getValueAsString();
-                final String password = dbPassword.getValueAsString();
-
-                installerService.testConnection(connectionUrl, username, password, new AsyncCallback<String>() {
-                    public void onSuccess(String result) {
-                        if (result != null) {
-                            SC.say("Could not connect to the database: " + result);
-                            testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
-                            mainInstallButton.disable();
-                            dbExistingSchemaOption.hide();
-                        } else {
-                            testConnectionButton.setIcon("[SKIN]/actions/ok.png");
-                            installerService.isDatabaseSchemaExist(connectionUrl, username, password,
-                                new AsyncCallback<Boolean>() {
-                                    public void onSuccess(Boolean schemaExists) {
-                                        if (schemaExists) {
-                                            dbExistingSchemaOption.show();
-                                        } else {
-                                            dbExistingSchemaOption.hide();
-                                        }
-                                        mainInstallButton.enable();
-                                    }
-
-                                    public void onFailure(Throwable caught) {
-                                        SC.say("Cannot determine the status of the database schema: " + caught);
-                                    }
-                                });
+                final Conn conn = new Conn();
+                installerService.testConnection(conn.url(), conn.username(), conn.password(),
+                    new AsyncCallback<String>() {
+                        public void onSuccess(String result) {
+                            if (result != null) {
+                                forceAnotherTestConnection();
+                                testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                                SC.say("Could not connect to the database: " + result);
+                            } else {
+                                connectedToDatabase();
+                            }
                         }
-                    }
 
-                    public void onFailure(Throwable caught) {
-                        SC.say("Failed to test connection: " + caught.toString());
-                        testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
-                        mainInstallButton.disable();
-                        dbExistingSchemaOption.hide();
-                    }
-                });
+                        public void onFailure(Throwable caught) {
+                            forceAnotherTestConnection();
+                            testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                            SC.say("Failed to test connection: " + caught.toString());
+                        }
+                    });
 
             }
         });
@@ -408,10 +399,7 @@ public class Installer implements EntryPoint {
         dbType.setDefaultToFirstOption(true);
         dbType.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
-                // force the user to re-test the connection
-                mainInstallButton.disable();
-                testConnectionButton.setIcon(null);
-                dbExistingSchemaOption.setVisible(false);
+                forceAnotherTestConnection();
 
                 String newDBType = (String) event.getValue();
                 String newURL = "";
@@ -431,11 +419,11 @@ public class Installer implements EntryPoint {
                 }
                 dbConnectionUrl.setValue(newURL);
 
-                serverProperties.put(ServerProperties.PROP_DATABASE_CONNECTION_URL, newURL);
-                serverProperties.put(ServerProperties.PROP_DATABASE_HIBERNATE_DIALECT, dialect);
-                serverProperties.put(ServerProperties.PROP_QUARTZ_DRIVER_DELEGATE_CLASS, quartzDriverDelegateClass);
-                serverProperties.put(ServerProperties.PROP_QUARTZ_SELECT_WITH_LOCK_SQL, quartzSelectWithLockSQL);
-                serverProperties.put(ServerProperties.PROP_QUARTZ_LOCK_HANDLER_CLASS, quartzLockHandlerClass);
+                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, newURL);
+                updateServerProperty(ServerProperties.PROP_DATABASE_HIBERNATE_DIALECT, dialect);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_DRIVER_DELEGATE_CLASS, quartzDriverDelegateClass);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_SELECT_WITH_LOCK_SQL, quartzSelectWithLockSQL);
+                updateServerProperty(ServerProperties.PROP_QUARTZ_LOCK_HANDLER_CLASS, quartzLockHandlerClass);
                 updateServerProperty(ServerProperties.PROP_DATABASE_TYPE, newDBType); // this refreshes the advanced view, too
             }
         });
@@ -465,6 +453,9 @@ public class Installer implements EntryPoint {
         serverSettingServerName.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, String.valueOf(event.getValue()));
+                if (registeredServersSelection != null) {
+                    registeredServersSelection.setValue((String) null); // flip it back to *new* since the server name changed
+                }
             }
         });
 
@@ -496,20 +487,40 @@ public class Installer implements EntryPoint {
 
         registeredServersSelection = new SelectItem("registeredServersSelectItem",
             MSG.tab_simpleView_serverSettings_registeredServers());
-        final LinkedHashMap<String, String> registeredServers = new LinkedHashMap<String, String>();
-        registeredServers.put("*new*", MSG.tab_simpleView_serverSettings_registeredServers_newServer());
-        registeredServers.put("blah", "blah");
-        registeredServersSelection.setValueMap(registeredServers);
+        registeredServersSelection.setWidth(fieldWidth);
+        addContextualHelp(registeredServersSelection, MSG.help_registeredServers());
+        registeredServerNames.put(NEW_SERVER_TO_REGISTER,
+            MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+        registeredServersSelection.setValueMap(registeredServerNames);
         registeredServersSelection.setDefaultToFirstOption(true);
         registeredServersSelection.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
-                String selectedServerName = String.valueOf(event.getValue());
-                boolean newServer = "*new*".equals(selectedServerName);
+                final String selectedServerName = String.valueOf(event.getValue());
+                final boolean newServer = NEW_SERVER_TO_REGISTER.equals(selectedServerName);
                 if (newServer) {
                     serverSettingServerName.setValue("");
                     serverSettingPublicAddress.setValue("");
+                    updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, "");
                 } else {
-                    serverSettingServerName.setValue(selectedServerName);
+                    final Conn conn = new Conn();
+                    installerService.getServerDetails(conn.url(), conn.username(), conn.password(), selectedServerName,
+                        new AsyncCallback<ServerDetails>() {
+                            public void onSuccess(ServerDetails details) {
+                                serverSettingServerName.setValue(details.getName());
+                                serverSettingPublicAddress.setValue(details.getEndpointAddress());
+                                serverSettingWebHttpPort.setValue(details.getEndpointPortString());
+                                serverSettingWebSecureHttpPort.setValue(details.getEndpointSecurePortString());
+                                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, details.getName());
+                                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT,
+                                    details.getEndpointPortString());
+                                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT,
+                                    details.getEndpointSecurePortString());
+                            }
+
+                            public void onFailure(Throwable caught) {
+                                SC.say("Failed to get details on selected server [" + selectedServerName + "]");
+                            }
+                        });
                 }
             }
         });
@@ -550,4 +561,91 @@ public class Installer implements EntryPoint {
 
         return simpleForm;
     }
+
+    private void connectedToDatabase() {
+        final Conn conn = new Conn();
+        testConnectionButton.setIcon("[SKIN]/actions/ok.png");
+        installerService.isDatabaseSchemaExist(conn.url(), conn.username(), conn.password(),
+            new AsyncCallback<Boolean>() {
+                public void onSuccess(Boolean schemaExists) {
+                    if (schemaExists) {
+                        dbExistingSchemaOption.show();
+                        registeredServersSelection.enable();
+
+                        installerService.getServerNames(conn.url(), conn.username(), conn.password(),
+                            new AsyncCallback<ArrayList<String>>() {
+                                public void onSuccess(ArrayList<String> servers) {
+                                    registeredServerNames.clear();
+                                    registeredServerNames.put(NEW_SERVER_TO_REGISTER,
+                                        MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+                                    for (String server : servers) {
+                                        registeredServerNames.put(server, server);
+                                    }
+                                    registeredServersSelection.setValueMap(registeredServerNames);
+                                }
+
+                                public void onFailure(Throwable caught) {
+                                    SC.say("Cannot get the registered server names");
+                                }
+                            });
+                    } else {
+                        dbExistingSchemaOption.hide();
+                        registeredServersSelection.setValue((String) null);
+                        registeredServersSelection.disable();
+                    }
+                    mainInstallButton.enable();
+                }
+
+                public void onFailure(Throwable caught) {
+                    SC.say("Cannot determine the status of the database schema: " + caught);
+                }
+            });
+    }
+
+    private void addContextualHelp(final FormItem item, final String helpText) {
+        final FormItemIcon helpIcon = new FormItemIcon();
+        helpIcon.setSrc("[SKIN]/actions/help.png");
+        helpIcon.setNeverDisable(true);
+        item.setIcons(helpIcon);
+
+        item.addIconClickHandler(new IconClickHandler() {
+            public void onIconClick(IconClickEvent event) {
+                if (event.getIcon().equals(helpIcon)) {
+                    SC.say(helpText);
+                }
+            }
+        });
+    }
+
+    /**
+     * Call this when the user changed something (like connection URL or password) that renders
+     * the old connection test invalid. This will ensure the user is forced to re-test the connection.
+     */
+    private void forceAnotherTestConnection() {
+        mainInstallButton.disable();
+        testConnectionButton.setIcon(null);
+        dbExistingSchemaOption.hide();
+
+        if (registeredServerNames.size() > 1) {
+            registeredServerNames.clear();
+            registeredServerNames.put(NEW_SERVER_TO_REGISTER, MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+        }
+        registeredServersSelection.setValue((String) null);
+        registeredServersSelection.setValueMap(registeredServerNames);
+    }
+
+    // for convienence, so we can get the conn url, user, pass in one object
+    private class Conn {
+        public String url() {
+            return Installer.this.dbConnectionUrl.getValueAsString();
+        }
+
+        public String username() {
+            return Installer.this.dbUsername.getValueAsString();
+        }
+
+        public String password() {
+            return Installer.this.dbPassword.getValueAsString();
+        }
+    }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
new file mode 100644
index 0000000..654e3cf
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/ServerPropertyRecordList.java
@@ -0,0 +1,62 @@
+package org.rhq.enterprise.gui.installer.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.RecordList;
+
+/**
+ * This provides a RecordList that is really a map underneath (each record is nothing more
+ * than a name/value pair; that is, each record has two attributes: name and value).
+ *
+ * We use this because this RecordList will be the list backing the Advanced View grid.
+ * So changing this list will be automatically reflected in that grid.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerPropertyRecordList extends RecordList {
+
+    public static final String PROPERTY_NAME = "n";
+    public static final String PROPERTY_VALUE = "v";
+
+    // this map is kept in sync with the record list
+    private HashMap<String, String> map = new HashMap<String, String>();
+
+    public HashMap<String, String> getMap() {
+        return map;
+    }
+
+    public String getServerProperty(String name) {
+        String value = map.get(name);
+        return (value == null) ? "" : value;
+    }
+
+    public void putServerProperty(String name, String value) {
+        // fill in the internal map
+        map.put(name, value);
+
+        // now update the record list
+        Record found = find(PROPERTY_NAME, name);
+        if (found == null) {
+            Record record = new Record();
+            record.setAttribute(PROPERTY_NAME, name);
+            record.setAttribute(PROPERTY_VALUE, value);
+            add(record);
+        } else {
+            found.setAttribute(PROPERTY_VALUE, value);
+        }
+    }
+
+    public void replaceServerProperties(Map<String, String> newMap) {
+        // first update the internal map
+        map.clear();
+        map.putAll(newMap);
+
+        // now update the record list
+        setLength(0);
+        for (Map.Entry<String, String> entry : newMap.entrySet()) {
+            putServerProperty(entry.getKey(), entry.getValue());
+        }
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index 2272e9c..c37d923 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -18,16 +18,43 @@
  */
 package org.rhq.enterprise.gui.installer.client.gwt;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 
 import com.google.gwt.user.client.rpc.RemoteService;
 
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
+
 /**
  * @author John Mazzitelli
  */
 public interface InstallerGWTService extends RemoteService {
 
     /**
+     * Returns a list of all registered servers in the database.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return list of all existing servers registered in the database.
+     * @throws Exception
+     */
+    ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Returns details on a specific server that is registered in the database.
+     * 
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @param serverName the name of the server whose details are to be retrieved
+     * @return the details of the server or null if the server does not exist
+     * @throws Exception
+     */
+    ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
+        throws Exception;
+
+    /**
      * Tests to see if there is already a schema installed.
      * 
      * @param connectionUrl
@@ -63,22 +90,6 @@ public interface InstallerGWTService extends RemoteService {
     void saveServerProperties(HashMap<String, String> serverProperties) throws Exception;
 
     /**
-     * Creates a security domain in the app server for use by the datasources.
-     * @param username username the security domain will use to connect to the database
-     * @param password password the security domain will use to connect to the database 
-     * @throws Exception
-     */
-    void createDatasourceSecurityDomain(String username, String password) throws Exception;
-
-    /**
-     * Returns the directory name where the app server is installed (e.g. the root install directory
-     * of the app server).
-     * @return app server install dir
-     * @throws Exception
-     */
-    String getAppServerHomeDir() throws Exception;
-
-    /**
      * Returns the version string for the app server itself (e.g. "7.1.2.Final").
      * @return version string of app server
      * @throws Exception
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
new file mode 100644
index 0000000..b54e380
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerDetails.java
@@ -0,0 +1,115 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.shared;
+
+import java.io.Serializable;
+
+public class ServerDetails implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    public static final String DEFAULT_AFFINITY_GROUP = "";
+    public static final int DEFAULT_ENDPOINT_PORT = 7080;
+    public static final int DEFAULT_ENDPOINT_SECURE_PORT = 7443;
+
+    private String name;
+    private String endpointAddress;
+    private int endpointPort;
+    private int endpointSecurePort;
+    private String affinityGroup;
+
+    protected ServerDetails() {
+        // for GWT
+    }
+
+    public ServerDetails(String name, String endpointAddress, int port, int securePort, String affinityGroup) {
+        this.name = name;
+        this.endpointAddress = endpointAddress;
+        this.endpointPort = port;
+        this.endpointSecurePort = securePort;
+        this.affinityGroup = affinityGroup;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        if ((null != name) && (!"".equals(name.trim()))) {
+            this.name = name;
+        }
+    }
+
+    public String getEndpointAddress() {
+        return endpointAddress;
+    }
+
+    public void setEndpointAddress(String endpointAddress) {
+        if ((null != endpointAddress) && (!"".equals(endpointAddress.trim()))) {
+            this.endpointAddress = endpointAddress;
+        }
+    }
+
+    public int getEndpointPort() {
+        return endpointPort;
+    }
+
+    public void setEndpointPort(int endpointPort) {
+        this.endpointPort = endpointPort;
+    }
+
+    public String getEndpointPortString() {
+        return (String.valueOf(endpointPort));
+    }
+
+    public void setEndpointPortString(String endpointPort) {
+        this.endpointPort = Integer.valueOf(endpointPort).intValue();
+    }
+
+    public int getEndpointSecurePort() {
+        return endpointSecurePort;
+    }
+
+    public void setEndpointSecurePort(int endpointSecurePort) {
+        this.endpointSecurePort = endpointSecurePort;
+    }
+
+    public String getEndpointSecurePortString() {
+        return (String.valueOf(endpointSecurePort));
+    }
+
+    public void setEndpointSecurePortString(String endpointSecurePort) {
+        this.endpointSecurePort = Integer.valueOf(endpointSecurePort).intValue();
+    }
+
+    public String getAffinityGroup() {
+        return affinityGroup;
+    }
+
+    public void setAffinityGroup(String affinityGroup) {
+        if ((null != affinityGroup) && (!"".equals(affinityGroup.trim()))) {
+            this.affinityGroup = affinityGroup;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "[name=" + name + " address=" + endpointAddress + " port=" + endpointPort + " secureport="
+            + endpointSecurePort + " affinitygroup=" + affinityGroup + "]";
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index e023bd1..6247168 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -19,6 +19,7 @@
 package org.rhq.enterprise.gui.installer.server.servlet;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
@@ -34,6 +35,7 @@ import org.rhq.common.jbossas.client.controller.JBossASClient;
 import org.rhq.common.jbossas.client.controller.SecurityDomainJBossASClient;
 import org.rhq.core.util.PropertiesFileUpdate;
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
 import org.rhq.enterprise.gui.installer.server.service.ManagementService;
 
 /**
@@ -47,6 +49,27 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
 
     @Override
+    public ArrayList<String> getServerNames(String connectionUrl, String username, String password) throws Exception {
+        try {
+            return ServerInstallUtil.getServerNames(connectionUrl, username, password);
+        } catch (Exception e) {
+            log("Could not get the list of registered server names", e);
+            return null;
+        }
+    }
+
+    @Override
+    public ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
+        throws Exception {
+        try {
+            return ServerInstallUtil.getServerDetails(connectionUrl, username, password, serverName);
+        } catch (Exception e) {
+            log("Could not get server details for [" + serverName + "]", e);
+            return null;
+        }
+    }
+
+    @Override
     public boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception {
         try {
             return ServerInstallUtil.isDatabaseSchemaExist(connectionUrl, username, password);
@@ -93,26 +116,6 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     }
 
     @Override
-    public void createDatasourceSecurityDomain(String username, String password) throws Exception {
-        final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
-        final String securityDomain = RHQ_SECURITY_DOMAIN;
-        if (!client.isSecurityDomain(securityDomain)) {
-            client.createNewSecureIdentitySecurityDomainRequest(securityDomain, username, password);
-            log("Security domain [" + securityDomain + "] created");
-        } else {
-            log("Security domain [" + securityDomain + "] already exists, skipping the creation request");
-        }
-    }
-
-    @Override
-    public String getAppServerHomeDir() throws Exception {
-        JBossASClient client = new JBossASClient(getClient());
-        String[] address = { "core-service", "server-environment" };
-        String dir = client.getStringAttribute(true, "home-dir", Address.root().add(address));
-        return dir;
-    }
-
-    @Override
     public String getAppServerVersion() throws Exception {
         JBossASClient client = new JBossASClient(getClient());
         String version = client.getStringAttribute("release-version", Address.root());
@@ -127,6 +130,13 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
         return osName;
     }
 
+    private String getAppServerHomeDir() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String[] address = { "core-service", "server-environment" };
+        String dir = client.getStringAttribute(true, "home-dir", Address.root().add(address));
+        return dir;
+    }
+
     private File getServerPropertiesFile() throws Exception {
         File appServerHomeDir = new File(getAppServerHomeDir());
         File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
@@ -137,4 +147,15 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
         ModelControllerClient client = ManagementService.getClient();
         return client;
     }
+
+    private void createDatasourceSecurityDomain(String username, String password) throws Exception {
+        final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
+        final String securityDomain = RHQ_SECURITY_DOMAIN;
+        if (!client.isSecurityDomain(securityDomain)) {
+            client.createNewSecureIdentitySecurityDomainRequest(securityDomain, username, password);
+            log("Security domain [" + securityDomain + "] created");
+        } else {
+            log("Security domain [" + securityDomain + "] already exists, skipping the creation request");
+        }
+    }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java
deleted file mode 100644
index e81187d..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.server.servlet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class ServerDetails {
-    private final Log LOG = LogFactory.getLog(ServerDetails.class);
-
-    public static final String DEFAULT_AFFINITY_GROUP = "";
-    public static final int DEFAULT_ENDPOINT_PORT = 7080;
-    public static final int DEFAULT_ENDPOINT_SECURE_PORT = 7443;
-
-    private String name;
-    private String endpointAddress;
-    private int endpointPort;
-    private int endpointSecurePort;
-    private String affinityGroup;
-
-    public ServerDetails(String name, String endpointAddress, int port, int securePort, String affinityGroup) {
-        this.name = name;
-        this.endpointAddress = endpointAddress;
-        this.endpointPort = port;
-        this.endpointSecurePort = securePort;
-        this.affinityGroup = affinityGroup;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        if ((null != name) && (!"".equals(name.trim()))) {
-            this.name = name;
-        }
-    }
-
-    public String getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    public void setEndpointAddress(String endpointAddress) {
-        if ((null != endpointAddress) && (!"".equals(endpointAddress.trim()))) {
-            this.endpointAddress = endpointAddress;
-        }
-    }
-
-    public int getEndpointPort() {
-        return endpointPort;
-    }
-
-    public void setEndpointPort(int endpointPort) {
-        this.endpointPort = endpointPort;
-    }
-
-    public String getEndpointPortString() {
-        return (String.valueOf(this.endpointPort));
-    }
-
-    public void setEndpointPortString(String endpointPort) {
-        try {
-            this.endpointPort = Integer.valueOf(endpointPort).intValue();
-        } catch (NumberFormatException e) {
-            LOG.debug("Failed to set port with invalid number: " + endpointPort);
-        }
-    }
-
-    public int getEndpointSecurePort() {
-        return endpointSecurePort;
-    }
-
-    public void setEndpointSecurePort(int endpointSecurePort) {
-        this.endpointSecurePort = endpointSecurePort;
-    }
-
-    public String getEndpointSecurePortString() {
-        return (String.valueOf(this.endpointSecurePort));
-    }
-
-    public void setEndpointSecurePortString(String endpointSecurePort) {
-        try {
-            this.endpointSecurePort = Integer.valueOf(endpointSecurePort).intValue();
-        } catch (NumberFormatException e) {
-            LOG.debug("Failed to set secure port with invalid number: " + endpointSecurePort);
-        }
-    }
-
-    public String getAffinityGroup() {
-        return affinityGroup;
-    }
-
-    public void setAffinityGroup(String affinityGroup) {
-        if ((null != affinityGroup) && (!"".equals(affinityGroup.trim()))) {
-            this.affinityGroup = affinityGroup;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "[name=" + name + " address=" + endpointAddress + " port=" + endpointPort + " secureport="
-            + endpointSecurePort + " affinitygroup=" + affinityGroup + "]";
-    }
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
index c3c8d89..4577789 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
@@ -24,7 +24,6 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -33,6 +32,7 @@ import org.rhq.core.db.DatabaseType;
 import org.rhq.core.db.DatabaseTypeFactory;
 import org.rhq.core.db.DbUtil;
 import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.enterprise.gui.installer.client.shared.ServerDetails;
 
 /**
  * Provides utility methods necessary to complete the server installation.
@@ -87,12 +87,13 @@ public class ServerInstallUtil {
      *
      * @throws Exception if failed to communicate with the database
      */
-    public List<String> getServerNames(String connectionUrl, String username, String password) throws Exception {
+    public static ArrayList<String> getServerNames(String connectionUrl, String username, String password)
+        throws Exception {
         DatabaseType db = null;
         Connection conn = null;
         Statement stm = null;
         ResultSet rs = null;
-        List<String> result = new ArrayList<String>();
+        ArrayList<String> result = new ArrayList<String>();
 
         try {
             conn = getDatabaseConnection(connectionUrl, username, password);
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
index 82aeb86..5915f40 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -2,6 +2,7 @@ button_reset = Reset
 button_save = Save
 button_startInstallation = Press To Start The Installation Now
 button_testConnection = Test Connection
+help_registeredServers = If you are performing an upgrade or a re-installation then you should select a server from this list of registered servers. If you want to install a new server into the system, select the *New Server* option. (Note that if you are going to overwrite your existing schema, you cannot select an existing registered server since they will be deleted when the overwrite is performed.)
 property_name_label = Property
 property_value_label = Value
 schema_update_keep = Keep (Maintain Existing Data)
@@ -14,7 +15,7 @@ tab_simpleView_database = Database Settings
 tab_simpleView_serverSettings = Server Settings
 tab_simpleView_serverSettings_publicAddress = Server Public Address
 tab_simpleView_serverSettings_registeredServers = Registered Server Names
-tab_simpleView_serverSettings_registeredServers_newServer = New Server
+tab_simpleView_serverSettings_registeredServers_newServer = *New Server*
 tab_welcome = Welcome
 tab_welcome_content = <h1>Welcome to the new GWT Installer</h1>\nThis is the <b>new</b> installer.\nAny HTML can go in here.
 welcome_title = Installing the Server


commit 9851e4e733c69a223975c72a1912fba96b5a4bf0
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Jul 19 23:39:00 2012 -0400

    layout of the system settings

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index d9fb689..12d5885 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -42,6 +42,8 @@ import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.ButtonItem;
 import com.smartgwt.client.widgets.form.fields.PasswordItem;
 import com.smartgwt.client.widgets.form.fields.SelectItem;
+import com.smartgwt.client.widgets.form.fields.SpacerItem;
+import com.smartgwt.client.widgets.form.fields.SpinnerItem;
 import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
@@ -84,6 +86,13 @@ public class Installer implements EntryPoint {
     private SelectItem dbExistingSchemaOption;
     private ButtonItem testConnectionButton;
     private SelectItem dbType;
+    private TextItem serverSettingServerName;
+    private TextItem serverSettingPublicAddress;
+    private SpinnerItem serverSettingWebHttpPort;
+    private SpinnerItem serverSettingWebSecureHttpPort;
+    private SelectItem registeredServersSelection;
+    private TextItem serverSettingEmailSMTPHostname;
+    private TextItem serverSettingEmailFromAddress;
 
     public void onModuleLoad() {
         Canvas header = createHeader();
@@ -143,10 +152,21 @@ public class Installer implements EntryPoint {
     }
 
     private void refreshSimpleView() {
+        // DB SETTINGS
         dbType.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_TYPE));
         dbConnectionUrl.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
         dbUsername.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_USERNAME));
         // do not prefill the database password - force the user to know it and type it in for security purposes
+
+        // SERVER SETTINGS
+        serverSettingServerName.setValue(serverProperties.get(ServerProperties.PROP_HIGH_AVAILABILITY_NAME));
+        serverSettingWebHttpPort.setValue(serverProperties.get(ServerProperties.PROP_WEB_HTTP_PORT));
+        serverSettingWebSecureHttpPort.setValue(serverProperties.get(ServerProperties.PROP_WEB_HTTPS_PORT));
+        serverSettingEmailSMTPHostname.setValue(serverProperties.get(ServerProperties.PROP_EMAIL_SMTP_HOST));
+        serverSettingEmailFromAddress.setValue(serverProperties.get(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
+
+        dbExistingSchemaOption.hide();
+        testConnectionButton.setIcon(null);
     }
 
     private void refreshAdvancedView() {
@@ -203,8 +223,8 @@ public class Installer implements EntryPoint {
         Label welcomeLabel = new Label(MSG.tab_welcome_content());
         welcomeTab.setPane(welcomeLabel);
 
-        final Tab databaseTab = new Tab(MSG.tab_simple());
-        DynamicForm databaseForm = createSimpleForm();
+        final Tab databaseTab = new Tab(MSG.tab_simpleView());
+        Canvas databaseForm = createSimpleForm();
         databaseTab.setPane(databaseForm);
 
         final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
@@ -271,6 +291,7 @@ public class Installer implements EntryPoint {
                 String newValue = (String) event.getNewValues().values().iterator().next().toString();
                 String changedProperty = event.getOldRecord().getAttribute(PROPERTY_NAME);
                 serverProperties.put(changedProperty, newValue);
+                refreshSimpleView();
             }
         });
 
@@ -279,13 +300,24 @@ public class Installer implements EntryPoint {
         return layout;
     }
 
-    private DynamicForm createSimpleForm() {
-        final DynamicForm simpleForm = new DynamicForm();
+    private Canvas createSimpleForm() {
+
+        final int fieldWidth = 250;
+
+        ////////////////////////////////////////////////////////
+        // The Database form
+
+        final DynamicForm databaseForm = new DynamicForm();
+        databaseForm.setAutoWidth();
+        databaseForm.setPadding(5);
+        databaseForm.setCellPadding(5);
+        databaseForm.setWrapItemTitles(false);
+        databaseForm.setIsGroup(true);
+        databaseForm.setGroupTitle(MSG.tab_simpleView_database());
 
         dbConnectionUrl = new TextItem(ServerProperties.PROP_DATABASE_CONNECTION_URL,
             PROPS_MSG.rhq_server_database_connection_url());
-        dbConnectionUrl.setWrapTitle(false);
-        dbConnectionUrl.setWidth(300);
+        dbConnectionUrl.setWidth(fieldWidth);
         dbConnectionUrl.setValue("jdbc:postgresql://127.0.0.1:5432/rhq");
         dbConnectionUrl.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
@@ -295,8 +327,7 @@ public class Installer implements EntryPoint {
 
         dbUsername = new TextItem(ServerProperties.PROP_DATABASE_USERNAME,
             PROPS_MSG.rhq_server_database_user_name());
-        dbUsername.setWrapTitle(false);
-        dbUsername.setWidth(200);
+        dbUsername.setWidth(fieldWidth);
         dbUsername.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_DATABASE_USERNAME, String.valueOf(event.getValue()));
@@ -305,8 +336,7 @@ public class Installer implements EntryPoint {
 
         dbPassword = new PasswordItem(ServerProperties.PROP_DATABASE_PASSWORD,
             PROPS_MSG.rhq_server_database_password());
-        dbPassword.setWrapTitle(false);
-        dbPassword.setWidth(200);
+        dbPassword.setWidth(fieldWidth);
         dbPassword.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent event) {
                 updateServerProperty(ServerProperties.PROP_DATABASE_PASSWORD, String.valueOf(event.getValue()));
@@ -321,9 +351,10 @@ public class Installer implements EntryPoint {
         dbExistingSchemaOption.setValueMap(schemaOpt);
         dbExistingSchemaOption.setDefaultToFirstOption(true);
         dbExistingSchemaOption.setVisible(false);
-        dbExistingSchemaOption.setWidth(200);
+        dbExistingSchemaOption.setWidth(fieldWidth);
+        dbExistingSchemaOption.setWrapTitle(true);
 
-        testConnectionButton = new ButtonItem("testDbConnectionButton", MSG.button_testConnection());
+        testConnectionButton = new ButtonItem("testConnectionButton", MSG.button_testConnection());
         testConnectionButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
             public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
                 final String connectionUrl = dbConnectionUrl.getValueAsString();
@@ -409,9 +440,114 @@ public class Installer implements EntryPoint {
             }
         });
 
-        simpleForm.setFields(dbType, dbConnectionUrl, dbUsername, dbPassword, testConnectionButton,
+        // use this to move the button over to the second column - it looks better this way
+        SpacerItem buttonSpacer = new SpacerItem();
+        buttonSpacer.setEndRow(false);
+        testConnectionButton.setStartRow(false);
+
+        databaseForm.setFields(dbType, dbConnectionUrl, dbUsername, dbPassword, buttonSpacer, testConnectionButton,
             dbExistingSchemaOption);
 
+        ////////////////////////////////////////////////////////
+        // The Server Settings form
+
+        final DynamicForm serverSettingsForm = new DynamicForm();
+        serverSettingsForm.setPadding(5);
+        serverSettingsForm.setCellPadding(5);
+        serverSettingsForm.setAutoWidth();
+        serverSettingsForm.setIsGroup(true);
+        serverSettingsForm.setWrapItemTitles(false);
+        serverSettingsForm.setGroupTitle(MSG.tab_simpleView_serverSettings());
+
+        serverSettingServerName = new TextItem(ServerProperties.PROP_HIGH_AVAILABILITY_NAME,
+            PROPS_MSG.rhq_server_high_availability_name());
+        serverSettingServerName.setWidth(fieldWidth);
+        serverSettingServerName.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_HIGH_AVAILABILITY_NAME, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingPublicAddress = new TextItem("serverPublicAddress",
+            MSG.tab_simpleView_serverSettings_publicAddress());
+        serverSettingPublicAddress.setWidth(fieldWidth);
+
+        serverSettingWebHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTP_PORT,
+            PROPS_MSG.rhq_server_startup_web_http_port());
+        serverSettingWebHttpPort.setWidth(fieldWidth);
+        serverSettingWebHttpPort.setMin(1);
+        serverSettingWebHttpPort.setMax(65535);
+        serverSettingWebHttpPort.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_WEB_HTTP_PORT, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingWebSecureHttpPort = new SpinnerItem(ServerProperties.PROP_WEB_HTTPS_PORT,
+            PROPS_MSG.rhq_server_startup_web_http_port());
+        serverSettingWebSecureHttpPort.setWidth(fieldWidth);
+        serverSettingWebSecureHttpPort.setMin(1);
+        serverSettingWebSecureHttpPort.setMax(65535);
+        serverSettingWebSecureHttpPort.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_WEB_HTTPS_PORT, String.valueOf(event.getValue()));
+            }
+        });
+
+        registeredServersSelection = new SelectItem("registeredServersSelectItem",
+            MSG.tab_simpleView_serverSettings_registeredServers());
+        final LinkedHashMap<String, String> registeredServers = new LinkedHashMap<String, String>();
+        registeredServers.put("*new*", MSG.tab_simpleView_serverSettings_registeredServers_newServer());
+        registeredServers.put("blah", "blah");
+        registeredServersSelection.setValueMap(registeredServers);
+        registeredServersSelection.setDefaultToFirstOption(true);
+        registeredServersSelection.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                String selectedServerName = String.valueOf(event.getValue());
+                boolean newServer = "*new*".equals(selectedServerName);
+                if (newServer) {
+                    serverSettingServerName.setValue("");
+                    serverSettingPublicAddress.setValue("");
+                } else {
+                    serverSettingServerName.setValue(selectedServerName);
+                }
+            }
+        });
+
+        serverSettingEmailSMTPHostname = new TextItem(ServerProperties.PROP_EMAIL_SMTP_HOST,
+            PROPS_MSG.rhq_server_email_smtp_host());
+        serverSettingEmailSMTPHostname.setWidth(fieldWidth);
+        serverSettingEmailSMTPHostname.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_EMAIL_SMTP_HOST, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingEmailFromAddress = new TextItem(ServerProperties.PROP_EMAIL_FROM_ADDRESS,
+            PROPS_MSG.rhq_server_email_from_address());
+        serverSettingEmailFromAddress.setWidth(fieldWidth);
+        serverSettingEmailFromAddress.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_EMAIL_FROM_ADDRESS, String.valueOf(event.getValue()));
+            }
+        });
+
+        serverSettingsForm.setItems(registeredServersSelection, serverSettingServerName, serverSettingPublicAddress,
+            serverSettingWebHttpPort, serverSettingWebSecureHttpPort, serverSettingEmailSMTPHostname,
+            serverSettingEmailFromAddress);
+
+        ////////////////////////////////////////////////////////
+        // The layout holding the forms in the simple view tab
+
+        VLayout simpleForm = new VLayout();
+        simpleForm.setLayoutMargin(5);
+        simpleForm.setMembersMargin(5);
+        simpleForm.setWidth100();
+        simpleForm.setHeight100();
+        simpleForm.setDefaultLayoutAlign(Alignment.CENTER);
+        simpleForm.addMember(databaseForm);
+        simpleForm.addMember(serverSettingsForm);
+
         return simpleForm;
     }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
index e6f5fbc..82aeb86 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -9,7 +9,12 @@ schema_update_overwrite = Overwrite (Lose Existing Data!)
 schema_update_question = A database schema already exists. What do you want to do?
 schema_update_skip = Skip (Leave Database As-Is)
 tab_advancedView = Advanced View
-tab_simple = Simple View
+tab_simpleView = Simple View
+tab_simpleView_database = Database Settings
+tab_simpleView_serverSettings = Server Settings
+tab_simpleView_serverSettings_publicAddress = Server Public Address
+tab_simpleView_serverSettings_registeredServers = Registered Server Names
+tab_simpleView_serverSettings_registeredServers_newServer = New Server
 tab_welcome = Welcome
 tab_welcome_content = <h1>Welcome to the new GWT Installer</h1>\nThis is the <b>new</b> installer.\nAny HTML can go in here.
 welcome_title = Installing the Server
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
index 944e61e..cb9016e 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
@@ -35,7 +35,7 @@
 
     <div id="Loading-Panel" style="width: 214px; height: 90px; margin-top: 300px; margin-left: 40%; margin-right: 40%;">
         <div style="text-align: center; border: 3px solid lightgray;">
-            Loading RHQ Installer...
+            Loading Installer...
         </div>
     </div>
 


commit 24b7e5975fd7c0824e5760eb43c70babf839eaf8
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Jul 19 21:15:42 2012 -0400

    trying to get the database portion of the installer to work. half way there

diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
index 01a6915..3b73c6c 100644
--- a/modules/enterprise/gui/gwt-installer-war/pom.xml
+++ b/modules/enterprise/gui/gwt-installer-war/pom.xml
@@ -62,7 +62,7 @@
     <dependencies>
         <dependency>
             <groupId>org.rhq</groupId>
-            <artifactId>rhq-core-util</artifactId>
+            <artifactId>rhq-core-dbutils</artifactId>
             <version>${project.version}</version>
         </dependency>
 
@@ -189,6 +189,7 @@
                     <debugSuspend>false</debugSuspend>
                     <servicePattern>**/gwt/*GWTService.java</servicePattern>
                     <i18nMessagesBundle>org.rhq.enterprise.gui.installer.client.Messages</i18nMessagesBundle>
+                    <i18nConstantsWithLookupBundle>org.rhq.enterprise.gui.installer.client.ServerPropertiesMessages</i18nConstantsWithLookupBundle>
                     <style>${gwt.style}</style>
                     <strict>true</strict>
                     <!-- compiles gwt artifacts like symbolMap outside of war so it doesnt
@@ -359,7 +360,7 @@
                         <artifactId>maven-compiler-plugin</artifactId>
                         <configuration>
                             <includes>
-                                <include>org/rhq/enterprise/gui/installer/client/Messages*.java</include>
+                                <include>org/rhq/enterprise/gui/installer/client/*Messages.java</include>
                             </includes>
                         </configuration>
                     </plugin>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index e45bf6d..d9fb689 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.installer.client;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import com.google.gwt.core.client.EntryPoint;
@@ -38,7 +39,12 @@ import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.widgets.form.fields.PasswordItem;
+import com.smartgwt.client.widgets.form.fields.SelectItem;
 import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
 import com.smartgwt.client.widgets.grid.ListGrid;
 import com.smartgwt.client.widgets.grid.ListGridField;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
@@ -50,6 +56,7 @@ import com.smartgwt.client.widgets.tab.TabSet;
 import com.smartgwt.client.widgets.toolbar.ToolStrip;
 
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
+import org.rhq.enterprise.gui.installer.client.shared.ServerProperties;
 
 /**
  * The GWT {@link EntryPoint entry point} to the RHQ Installer GUI.
@@ -59,7 +66,8 @@ import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
 public class Installer implements EntryPoint {
 
     // This must come first to ensure proper I18N class loading for dev mode
-    private static final Messages MSG = GWT.create(Messages.class);
+    public static final Messages MSG = GWT.create(Messages.class);
+    public static final ServerPropertiesMessages PROPS_MSG = GWT.create(ServerPropertiesMessages.class);
 
     private static final String PROPERTY_NAME = "propertyName";
     private static final String PROPERTY_VALUE = "propertyValue";
@@ -69,10 +77,17 @@ public class Installer implements EntryPoint {
     private HashMap<String, String> originalProperties = new HashMap<String, String>();
 
     private ListGrid advancedPropertyItemGrid;
+    private Button mainInstallButton;
+    private TextItem dbConnectionUrl;
+    private TextItem dbUsername;
+    private PasswordItem dbPassword;
+    private SelectItem dbExistingSchemaOption;
+    private ButtonItem testConnectionButton;
+    private SelectItem dbType;
 
     public void onModuleLoad() {
         Canvas header = createHeader();
-        Canvas installButton = createMainInstallButton();
+        mainInstallButton = createMainInstallButton();
         Canvas tabSet = createTabSet();
 
         VLayout layout = new VLayout();
@@ -82,7 +97,7 @@ public class Installer implements EntryPoint {
         layout.setMembersMargin(5);
         layout.setDefaultLayoutAlign(Alignment.CENTER);
         layout.addMember(header);
-        layout.addMember(installButton);
+        layout.addMember(mainInstallButton);
         layout.addMember(tabSet);
         layout.draw();
 
@@ -95,6 +110,11 @@ public class Installer implements EntryPoint {
 
     }
 
+    private void updateServerProperty(String name, Object value) {
+        serverProperties.put(name, value == null ? "" : value.toString());
+        refreshAdvancedView();
+    }
+
     private void loadServerProperties() {
         // load the initial server properties
         installerService.getServerProperties(new AsyncCallback<HashMap<String, String>>() {
@@ -109,6 +129,9 @@ public class Installer implements EntryPoint {
                 originalProperties.clear();
                 originalProperties.putAll(result);
 
+                // refresh the simple view with the new data
+                refreshSimpleView();
+
                 // refresh the advanced view with the new data
                 refreshAdvancedView();
             }
@@ -119,6 +142,13 @@ public class Installer implements EntryPoint {
         });
     }
 
+    private void refreshSimpleView() {
+        dbType.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_TYPE));
+        dbConnectionUrl.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_CONNECTION_URL));
+        dbUsername.setValue(serverProperties.get(ServerProperties.PROP_DATABASE_USERNAME));
+        // do not prefill the database password - force the user to know it and type it in for security purposes
+    }
+
     private void refreshAdvancedView() {
         ArrayList<ListGridRecord> records = new ArrayList<ListGridRecord>();
         for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
@@ -148,10 +178,11 @@ public class Installer implements EntryPoint {
         return strip;
     }
 
-    private Canvas createMainInstallButton() {
-        Button installButton = new Button(MSG.start_installation_label());
+    private Button createMainInstallButton() {
+        Button installButton = new Button(MSG.button_startInstallation());
         installButton.setWrap(false);
         installButton.setAutoFit(true);
+        installButton.setDisabled(true); // we can't allow the user to install yet
         installButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 SC.say("TODO: this should start the install");
@@ -172,21 +203,16 @@ public class Installer implements EntryPoint {
         Label welcomeLabel = new Label(MSG.tab_welcome_content());
         welcomeTab.setPane(welcomeLabel);
 
-        final Tab databaseTab = new Tab(MSG.tab_database());
-        DynamicForm databaseForm = createDatabaseForm();
+        final Tab databaseTab = new Tab(MSG.tab_simple());
+        DynamicForm databaseForm = createSimpleForm();
         databaseTab.setPane(databaseForm);
 
-        final Tab systemSettingsTab = new Tab(MSG.tab_systemSettings());
-        DynamicForm systemSettingsForm = createSystemSettingsForm();
-        systemSettingsTab.setPane(systemSettingsForm);
-
         final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
         Canvas advancedView = createAdvancedView();
         advancedViewTab.setPane(advancedView);
 
         topTabSet.addTab(welcomeTab);
         topTabSet.addTab(databaseTab);
-        topTabSet.addTab(systemSettingsTab);
         topTabSet.addTab(advancedViewTab);
 
         return topTabSet;
@@ -198,7 +224,7 @@ public class Installer implements EntryPoint {
         ToolStrip strip = new ToolStrip();
         strip.setWidth100();
 
-        IButton saveButton = new IButton(MSG.save_label());
+        IButton saveButton = new IButton(MSG.button_save());
         saveButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 installerService.saveServerProperties(serverProperties, new AsyncCallback<Void>() {
@@ -214,7 +240,7 @@ public class Installer implements EntryPoint {
                 });
             }
         });
-        IButton resetButton = new IButton(MSG.reset_label());
+        IButton resetButton = new IButton(MSG.button_reset());
         resetButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 serverProperties.clear();
@@ -253,19 +279,139 @@ public class Installer implements EntryPoint {
         return layout;
     }
 
-    private DynamicForm createSystemSettingsForm() {
-        DynamicForm systemSettingsForm = new DynamicForm();
-        TextItem nameTextItem = new TextItem();
-        nameTextItem.setTitle("Your Name");
-        systemSettingsForm.setFields(nameTextItem);
-        return systemSettingsForm;
-    }
+    private DynamicForm createSimpleForm() {
+        final DynamicForm simpleForm = new DynamicForm();
+
+        dbConnectionUrl = new TextItem(ServerProperties.PROP_DATABASE_CONNECTION_URL,
+            PROPS_MSG.rhq_server_database_connection_url());
+        dbConnectionUrl.setWrapTitle(false);
+        dbConnectionUrl.setWidth(300);
+        dbConnectionUrl.setValue("jdbc:postgresql://127.0.0.1:5432/rhq");
+        dbConnectionUrl.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_CONNECTION_URL, String.valueOf(event.getValue()));
+            }
+        });
+
+        dbUsername = new TextItem(ServerProperties.PROP_DATABASE_USERNAME,
+            PROPS_MSG.rhq_server_database_user_name());
+        dbUsername.setWrapTitle(false);
+        dbUsername.setWidth(200);
+        dbUsername.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_USERNAME, String.valueOf(event.getValue()));
+            }
+        });
+
+        dbPassword = new PasswordItem(ServerProperties.PROP_DATABASE_PASSWORD,
+            PROPS_MSG.rhq_server_database_password());
+        dbPassword.setWrapTitle(false);
+        dbPassword.setWidth(200);
+        dbPassword.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                updateServerProperty(ServerProperties.PROP_DATABASE_PASSWORD, String.valueOf(event.getValue()));
+            }
+        });
+
+        dbExistingSchemaOption = new SelectItem("existingSchemaOption", MSG.schema_update_question());
+        final LinkedHashMap<String, String> schemaOpt = new LinkedHashMap<String, String>();
+        schemaOpt.put("keep", MSG.schema_update_keep());
+        schemaOpt.put("overwrite", MSG.schema_update_overwrite());
+        schemaOpt.put("skip", MSG.schema_update_skip());
+        dbExistingSchemaOption.setValueMap(schemaOpt);
+        dbExistingSchemaOption.setDefaultToFirstOption(true);
+        dbExistingSchemaOption.setVisible(false);
+        dbExistingSchemaOption.setWidth(200);
+
+        testConnectionButton = new ButtonItem("testDbConnectionButton", MSG.button_testConnection());
+        testConnectionButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
+            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
+                final String connectionUrl = dbConnectionUrl.getValueAsString();
+                final String username = dbUsername.getValueAsString();
+                final String password = dbPassword.getValueAsString();
+
+                installerService.testConnection(connectionUrl, username, password, new AsyncCallback<String>() {
+                    public void onSuccess(String result) {
+                        if (result != null) {
+                            SC.say("Could not connect to the database: " + result);
+                            testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                            mainInstallButton.disable();
+                            dbExistingSchemaOption.hide();
+                        } else {
+                            testConnectionButton.setIcon("[SKIN]/actions/ok.png");
+                            installerService.isDatabaseSchemaExist(connectionUrl, username, password,
+                                new AsyncCallback<Boolean>() {
+                                    public void onSuccess(Boolean schemaExists) {
+                                        if (schemaExists) {
+                                            dbExistingSchemaOption.show();
+                                        } else {
+                                            dbExistingSchemaOption.hide();
+                                        }
+                                        mainInstallButton.enable();
+                                    }
+
+                                    public void onFailure(Throwable caught) {
+                                        SC.say("Cannot determine the status of the database schema: " + caught);
+                                    }
+                                });
+                        }
+                    }
+
+                    public void onFailure(Throwable caught) {
+                        SC.say("Failed to test connection: " + caught.toString());
+                        testConnectionButton.setIcon("[SKIN]/actions/exclamation.png");
+                        mainInstallButton.disable();
+                        dbExistingSchemaOption.hide();
+                    }
+                });
+
+            }
+        });
+
+        dbType = new SelectItem(ServerProperties.PROP_DATABASE_TYPE,
+            PROPS_MSG.rhq_server_database_type_mapping());
+        final LinkedHashMap<String, String> dbs = new LinkedHashMap<String, String>();
+        dbs.put("PostgreSQL", "PostgreSQL");
+        dbs.put("Oracle", "Oracle");
+        dbType.setValueMap(dbs);
+        dbType.setDefaultToFirstOption(true);
+        dbType.addChangedHandler(new ChangedHandler() {
+            public void onChanged(ChangedEvent event) {
+                // force the user to re-test the connection
+                mainInstallButton.disable();
+                testConnectionButton.setIcon(null);
+                dbExistingSchemaOption.setVisible(false);
+
+                String newDBType = (String) event.getValue();
+                String newURL = "";
+                String dialect = "";
+                String quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.StdJDBCDelegate";
+                String quartzSelectWithLockSQL = "SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE";
+                String quartzLockHandlerClass = "org.quartz.impl.jdbcjobstore.StdRowLockSemaphore";
+
+                if ("PostgreSQL".equalsIgnoreCase(newDBType)) {
+                    newURL = "jdbc:postgresql://127.0.0.1:5432/rhq";
+                    dialect = "org.hibernate.dialect.PostgreSQLDialect";
+                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate";
+                } else if ("Oracle".equalsIgnoreCase(newDBType)) {
+                    newURL = "jdbc:oracle:thin:@127.0.0.1:1521:rhq";
+                    dialect = "org.hibernate.dialect.Oracle10gDialect";
+                    quartzDriverDelegateClass = "org.quartz.impl.jdbcjobstore.oracle.OracleDelegate";
+                }
+                dbConnectionUrl.setValue(newURL);
+
+                serverProperties.put(ServerProperties.PROP_DATABASE_CONNECTION_URL, newURL);
+                serverProperties.put(ServerProperties.PROP_DATABASE_HIBERNATE_DIALECT, dialect);
+                serverProperties.put(ServerProperties.PROP_QUARTZ_DRIVER_DELEGATE_CLASS, quartzDriverDelegateClass);
+                serverProperties.put(ServerProperties.PROP_QUARTZ_SELECT_WITH_LOCK_SQL, quartzSelectWithLockSQL);
+                serverProperties.put(ServerProperties.PROP_QUARTZ_LOCK_HANDLER_CLASS, quartzLockHandlerClass);
+                updateServerProperty(ServerProperties.PROP_DATABASE_TYPE, newDBType); // this refreshes the advanced view, too
+            }
+        });
+
+        simpleForm.setFields(dbType, dbConnectionUrl, dbUsername, dbPassword, testConnectionButton,
+            dbExistingSchemaOption);
 
-    private DynamicForm createDatabaseForm() {
-        DynamicForm databaseForm = new DynamicForm();
-        TextItem dbUsernameTextItem = new TextItem();
-        dbUsernameTextItem.setTitle("Database User");
-        databaseForm.setFields(dbUsernameTextItem);
-        return databaseForm;
+        return simpleForm;
     }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index 0184c77..2272e9c 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -27,15 +27,68 @@ import com.google.gwt.user.client.rpc.RemoteService;
  */
 public interface InstallerGWTService extends RemoteService {
 
+    /**
+     * Tests to see if there is already a schema installed.
+     * 
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>true</code> if there appears to be a schema installed in the database already.
+     * @throws Exception
+     */
+    boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Tests that the database can be connected to with the given URL and credentials.
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>null</code> if the connection succeeded; this will be an error message if failed
+     * @throws Exception
+     */
+    String testConnection(String connectionUrl, String username, String password) throws Exception;
+
+    /**
+     * Returns the rhq-server.properties values in a map.
+     * @return server properties
+     * @throws Exception
+     */
     HashMap<String, String> getServerProperties() throws Exception;
 
+    /**
+     * Saves the rhq-server.properties with the given values.
+     * @param serverProperties
+     * @throws Exception
+     */
     void saveServerProperties(HashMap<String, String> serverProperties) throws Exception;
 
+    /**
+     * Creates a security domain in the app server for use by the datasources.
+     * @param username username the security domain will use to connect to the database
+     * @param password password the security domain will use to connect to the database 
+     * @throws Exception
+     */
     void createDatasourceSecurityDomain(String username, String password) throws Exception;
 
-    String getAppServerVersion() throws Exception;
-
+    /**
+     * Returns the directory name where the app server is installed (e.g. the root install directory
+     * of the app server).
+     * @return app server install dir
+     * @throws Exception
+     */
     String getAppServerHomeDir() throws Exception;
 
+    /**
+     * Returns the version string for the app server itself (e.g. "7.1.2.Final").
+     * @return version string of app server
+     * @throws Exception
+     */
+    String getAppServerVersion() throws Exception;
+
+    /**
+     * Returns the general type of operating system the server is running on (e.g. "Linux").
+     * @return os type name
+     * @throws Exception
+     */
     String getOperatingSystem() throws Exception;
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
new file mode 100644
index 0000000..d92d4ce
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/shared/ServerProperties.java
@@ -0,0 +1,53 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.shared;
+
+/**
+ * Settings found in the rhq-server.properties file that controls the startup configuration of the server.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerProperties {
+    public static final String PREFIX_PROP_DATABASE = "rhq.server.database.";
+    public static final String PROP_DATABASE_TYPE = PREFIX_PROP_DATABASE + "type-mapping";
+    public static final String PROP_DATABASE_CONNECTION_URL = PREFIX_PROP_DATABASE + "connection-url";
+    public static final String PROP_DATABASE_USERNAME = PREFIX_PROP_DATABASE + "user-name";
+    public static final String PROP_DATABASE_PASSWORD = PREFIX_PROP_DATABASE + "password";
+    public static final String PROP_DATABASE_SERVER_NAME = PREFIX_PROP_DATABASE + "server-name";
+    public static final String PROP_DATABASE_PORT = PREFIX_PROP_DATABASE + "port";
+    public static final String PROP_DATABASE_DB_NAME = PREFIX_PROP_DATABASE + "db-name";
+    public static final String PROP_DATABASE_HIBERNATE_DIALECT = "hibernate.dialect";
+    public static final String PROP_QUARTZ_DRIVER_DELEGATE_CLASS = "rhq.server.quartz.driverDelegateClass";
+    public static final String PROP_QUARTZ_SELECT_WITH_LOCK_SQL = "rhq.server.quartz.selectWithLockSQL";
+    public static final String PROP_QUARTZ_LOCK_HANDLER_CLASS = "rhq.server.quartz.lockHandlerClass";
+
+    public static final String PREFIX_PROP_WEB = "rhq.server.startup.web.";
+    public static final String PROP_WEB_HTTP_PORT = PREFIX_PROP_WEB + "http.port";
+    public static final String PROP_WEB_HTTPS_PORT = PREFIX_PROP_WEB + "https.port";
+
+    public static final String PREFIX_PROP_EMBEDDED_AGENT = "rhq.server.embedded-agent.";
+    public static final String PROP_EMBEDDED_AGENT_ENABLED = PREFIX_PROP_EMBEDDED_AGENT + "enabled";
+
+    public static final String PREFIX_PROP_EMAIL = "rhq.server.email.";
+    public static final String PROP_EMAIL_SMTP_HOST = PREFIX_PROP_EMAIL + "smtp-host";
+    public static final String PROP_EMAIL_FROM_ADDRESS = PREFIX_PROP_EMAIL + "from-address";
+
+    public static final String PROP_HIGH_AVAILABILITY_NAME = "rhq.server.high-availability.name";
+    public static final String PROP_MM_AT_START = "rhq.server.maintenance-mode-at-startup";
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index 3890e1b..e023bd1 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -47,9 +47,24 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
 
     @Override
+    public boolean isDatabaseSchemaExist(String connectionUrl, String username, String password) throws Exception {
+        try {
+            return ServerInstallUtil.isDatabaseSchemaExist(connectionUrl, username, password);
+        } catch (Exception e) {
+            log("Could not determine database existence", e);
+            return false;
+        }
+    }
+
+    @Override
+    public String testConnection(String connectionUrl, String username, String password) throws Exception {
+        String results = ServerInstallUtil.testConnection(connectionUrl, username, password);
+        return results;
+    }
+
+    @Override
     public HashMap<String, String> getServerProperties() throws Exception {
-        File appServerHomeDir = new File(getAppServerHomeDir());
-        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        File serverPropertiesFile = getServerPropertiesFile();
         PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
         Properties props = propsFile.loadExistingProperties();
 
@@ -63,8 +78,7 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
 
     @Override
     public void saveServerProperties(HashMap<String, String> serverProperties) throws Exception {
-        File appServerHomeDir = new File(getAppServerHomeDir());
-        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        File serverPropertiesFile = getServerPropertiesFile();
         PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
 
         // GWT can't handle Properties - convert from HashMap
@@ -91,13 +105,6 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     }
 
     @Override
-    public String getAppServerVersion() throws Exception {
-        JBossASClient client = new JBossASClient(getClient());
-        String version = client.getStringAttribute("release-version", Address.root());
-        return version;
-    }
-
-    @Override
     public String getAppServerHomeDir() throws Exception {
         JBossASClient client = new JBossASClient(getClient());
         String[] address = { "core-service", "server-environment" };
@@ -106,6 +113,13 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     }
 
     @Override
+    public String getAppServerVersion() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String version = client.getStringAttribute("release-version", Address.root());
+        return version;
+    }
+
+    @Override
     public String getOperatingSystem() throws Exception {
         JBossASClient client = new JBossASClient(getClient());
         String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
@@ -113,6 +127,12 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
         return osName;
     }
 
+    private File getServerPropertiesFile() throws Exception {
+        File appServerHomeDir = new File(getAppServerHomeDir());
+        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        return serverPropertiesFile;
+    }
+
     private ModelControllerClient getClient() {
         ModelControllerClient client = ManagementService.getClient();
         return client;
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java
new file mode 100644
index 0000000..e81187d
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerDetails.java
@@ -0,0 +1,120 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.servlet;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ServerDetails {
+    private final Log LOG = LogFactory.getLog(ServerDetails.class);
+
+    public static final String DEFAULT_AFFINITY_GROUP = "";
+    public static final int DEFAULT_ENDPOINT_PORT = 7080;
+    public static final int DEFAULT_ENDPOINT_SECURE_PORT = 7443;
+
+    private String name;
+    private String endpointAddress;
+    private int endpointPort;
+    private int endpointSecurePort;
+    private String affinityGroup;
+
+    public ServerDetails(String name, String endpointAddress, int port, int securePort, String affinityGroup) {
+        this.name = name;
+        this.endpointAddress = endpointAddress;
+        this.endpointPort = port;
+        this.endpointSecurePort = securePort;
+        this.affinityGroup = affinityGroup;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        if ((null != name) && (!"".equals(name.trim()))) {
+            this.name = name;
+        }
+    }
+
+    public String getEndpointAddress() {
+        return endpointAddress;
+    }
+
+    public void setEndpointAddress(String endpointAddress) {
+        if ((null != endpointAddress) && (!"".equals(endpointAddress.trim()))) {
+            this.endpointAddress = endpointAddress;
+        }
+    }
+
+    public int getEndpointPort() {
+        return endpointPort;
+    }
+
+    public void setEndpointPort(int endpointPort) {
+        this.endpointPort = endpointPort;
+    }
+
+    public String getEndpointPortString() {
+        return (String.valueOf(this.endpointPort));
+    }
+
+    public void setEndpointPortString(String endpointPort) {
+        try {
+            this.endpointPort = Integer.valueOf(endpointPort).intValue();
+        } catch (NumberFormatException e) {
+            LOG.debug("Failed to set port with invalid number: " + endpointPort);
+        }
+    }
+
+    public int getEndpointSecurePort() {
+        return endpointSecurePort;
+    }
+
+    public void setEndpointSecurePort(int endpointSecurePort) {
+        this.endpointSecurePort = endpointSecurePort;
+    }
+
+    public String getEndpointSecurePortString() {
+        return (String.valueOf(this.endpointSecurePort));
+    }
+
+    public void setEndpointSecurePortString(String endpointSecurePort) {
+        try {
+            this.endpointSecurePort = Integer.valueOf(endpointSecurePort).intValue();
+        } catch (NumberFormatException e) {
+            LOG.debug("Failed to set secure port with invalid number: " + endpointSecurePort);
+        }
+    }
+
+    public String getAffinityGroup() {
+        return affinityGroup;
+    }
+
+    public void setAffinityGroup(String affinityGroup) {
+        if ((null != affinityGroup) && (!"".equals(affinityGroup.trim()))) {
+            this.affinityGroup = affinityGroup;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "[name=" + name + " address=" + endpointAddress + " port=" + endpointPort + " secureport="
+            + endpointSecurePort + " affinitygroup=" + affinityGroup + "]";
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
new file mode 100644
index 0000000..c3c8d89
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/ServerInstallUtil.java
@@ -0,0 +1,273 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.servlet;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.db.DatabaseType;
+import org.rhq.core.db.DatabaseTypeFactory;
+import org.rhq.core.db.DbUtil;
+import org.rhq.core.util.exception.ThrowableUtil;
+
+/**
+ * Provides utility methods necessary to complete the server installation.
+ *
+ * @author John Mazzitelli
+ */
+public class ServerInstallUtil {
+    private static final Log LOG = LogFactory.getLog(ServerInstallUtil.class);
+
+    public enum ExistingSchemaOption {
+        OVERWRITE, KEEP, SKIP
+    };
+
+    public static boolean isKeepExistingSchema(ExistingSchemaOption existingSchemaOption) {
+        return ExistingSchemaOption.KEEP.name().equals(existingSchemaOption)
+            || ExistingSchemaOption.SKIP.name().equals(existingSchemaOption);
+    }
+
+    /**
+     * Returns <code>true</code> if the database already has the database schema created for it. It will not be known
+     * what version of schema or if its the latest, all this method tells you is that some RHQ database schema exists.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return <code>true</code> if the database can be connected to
+     *
+     * @throws Exception if failed to communicate with the database
+     */
+    public static boolean isDatabaseSchemaExist(String connectionUrl, String username, String password)
+        throws Exception {
+
+        Connection conn = getDatabaseConnection(connectionUrl, username, password);
+        DatabaseType db = DatabaseTypeFactory.getDatabaseType(conn);
+
+        try {
+            return db.checkTableExists(conn, "RHQ_PRINCIPAL");
+        } catch (IllegalStateException e) {
+            return false;
+        } finally {
+            db.closeConnection(conn);
+        }
+    }
+
+    /**
+     * Get the list of existing servers from an existing schema.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return List of server names registered in the database. Empty list if the table does not exist or there are no entries in the table.
+     *
+     * @throws Exception if failed to communicate with the database
+     */
+    public List<String> getServerNames(String connectionUrl, String username, String password) throws Exception {
+        DatabaseType db = null;
+        Connection conn = null;
+        Statement stm = null;
+        ResultSet rs = null;
+        List<String> result = new ArrayList<String>();
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            if (db.checkTableExists(conn, "rhq_server")) {
+
+                stm = conn.createStatement();
+                rs = stm.executeQuery("SELECT name FROM rhq_server ORDER BY name asc");
+
+                while (rs.next()) {
+                    result.add(rs.getString(1));
+                }
+            }
+        } catch (IllegalStateException e) {
+            // table does not exist
+        } catch (SQLException e) {
+            LOG.info("Unable to fetch existing server info: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeJDBCObjects(conn, stm, rs);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Returns information on the server as found in the database (port numbers, affinity group, etc).
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @param serverName the server whose details are to be returned
+     * @return the information on the named server
+     */
+    public static ServerDetails getServerDetails(String connectionUrl, String username, String password,
+        String serverName) {
+
+        DatabaseType db = null;
+        Connection conn = null;
+        ServerDetails result = null;
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            result = getServerDetails(db, conn, serverName);
+
+        } catch (Exception e) {
+            LOG.info("Unable to get server detail: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeConnection(conn);
+            }
+        }
+
+        return result;
+    }
+
+    private static ServerDetails getServerDetails(DatabaseType db, Connection conn, String serverName) {
+        PreparedStatement stm = null;
+        ResultSet rs = null;
+        ServerDetails result = null;
+
+        if (null == serverName) {
+            return result;
+        }
+
+        try {
+            stm = conn.prepareStatement("" //
+                + "SELECT s.address, s.port, s.secure_port, ag.name " //
+                + "  FROM rhq_server s LEFT JOIN rhq_affinity_group ag ON ag.id = s.affinity_group_id " //
+                + " WHERE s.name = ?");
+            stm.setString(1, serverName.trim());
+
+            rs = stm.executeQuery();
+
+            if (rs.next()) {
+                result = new ServerDetails(serverName, rs.getString(1), rs.getInt(2), rs.getInt(3), rs.getString(4));
+            }
+
+        } catch (SQLException e) {
+            LOG.info("Unable to get affinity group name for server: " + e.getMessage());
+        } finally {
+            if (null != db) {
+                db.closeResultSet(rs);
+                db.closeStatement(stm);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Tests to make sure the server can be connected to with the given settings.
+     * If the test is successful, <code>null</code>. If the test fails, the returned string
+     * will be the error message to indicate the problem.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     * @return error message if test failed; <code>null</code> if test succeeded
+     */
+    public static String testConnection(String connectionUrl, String username, String password) {
+
+        // its possible the JDBC URL was changed, clear the factory cache in case the DB version is different now
+        DatabaseTypeFactory.clearDatabaseTypeCache();
+
+        try {
+            ensureDatabaseIsSupported(connectionUrl, username, password);
+            return null;
+        } catch (Exception e) {
+            LOG.warn("Installer failed to test connection", e);
+            return ThrowableUtil.getAllMessages(e);
+        }
+    }
+
+    /**
+     * Call this when you need to confirm that the database is supported.
+     *
+     * @param connectionUrl
+     * @param username
+     * @param password
+     *
+     * @throws Exception if the database is not supported
+     */
+    public static void ensureDatabaseIsSupported(String connectionUrl, String username, String password)
+        throws Exception {
+        Connection conn = null;
+        DatabaseType db = null;
+
+        try {
+            conn = getDatabaseConnection(connectionUrl, username, password);
+            db = DatabaseTypeFactory.getDatabaseType(conn);
+
+            String version = db.getVersion();
+
+            if (DatabaseTypeFactory.isPostgres(db)) {
+                if (version.startsWith("7") || version.equals("8") || version.startsWith("8.0")
+                    || version.startsWith("8.1")) {
+                    throw new Exception("Unsupported PostgreSQL [" + db + "]");
+                }
+            } else if (DatabaseTypeFactory.isOracle(db)) {
+                if (version.startsWith("8") || version.startsWith("9")) {
+                    throw new Exception("Unsupported Oracle [" + db + "]");
+                }
+            } else {
+                throw new Exception("Unsupported DB [" + db + "]");
+            }
+
+            LOG.info("Database is supported: " + db);
+        } finally {
+            if (db != null) {
+                db.closeConnection(conn);
+            }
+        }
+
+        return;
+    }
+
+    /**
+     * Returns a database connection with the given set of properties providing the settings that allow for a successful
+     * database connection. If <code>props</code> is <code>null</code>, it will use the server properties from
+     * {@link #getServerProperties()}.
+     *
+     * @param connectionUrl 
+     * @param userName 
+     * @param password 
+     * @return the database connection
+     *
+     * @throws SQLException if cannot successfully connect to the database
+     */
+    public static Connection getDatabaseConnection(String connectionUrl, String userName, String password)
+        throws SQLException {
+        return DbUtil.getConnection(connectionUrl, userName, password);
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
index 2a99074..e6f5fbc 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -1,13 +1,15 @@
-welcome.title=Installing the Server
-tab.welcome.content=<h1>Welcome to the new GWT Installer</h1>\n\
-This is the <b>new</b> installer.\n\
-Any HTML can go in here.
-tab.welcome=Welcome
-tab.database=Database
-tab.systemSettings=System Settings
-tab.advancedView=Advanced View
-property.name.label=Property
-property.value.label=Value
-save.label=Save
-reset.label=Reset
-start.installation.label=Press To Start The Installation Now
\ No newline at end of file
+button_reset = Reset
+button_save = Save
+button_startInstallation = Press To Start The Installation Now
+button_testConnection = Test Connection
+property_name_label = Property
+property_value_label = Value
+schema_update_keep = Keep (Maintain Existing Data)
+schema_update_overwrite = Overwrite (Lose Existing Data!)
+schema_update_question = A database schema already exists. What do you want to do?
+schema_update_skip = Skip (Leave Database As-Is)
+tab_advancedView = Advanced View
+tab_simple = Simple View
+tab_welcome = Welcome
+tab_welcome_content = <h1>Welcome to the new GWT Installer</h1>\nThis is the <b>new</b> installer.\nAny HTML can go in here.
+welcome_title = Installing the Server
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
new file mode 100644
index 0000000..6c53445
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/ServerPropertiesMessages.properties
@@ -0,0 +1,23 @@
+### RHQ Server Configuration Properties
+### These should match the actual property names in rhq-server.properties.
+
+# Database
+rhq.server.database.connection-url=Database Connection URL
+rhq.server.database.user-name=Database Username
+rhq.server.database.password=Database Password
+rhq.server.database.type-mapping=Database Type
+
+# High Availability (HA)
+rhq.server.high-availability.name=Server Name
+rhq.server.maintenance-mode-at-startup=Maintenance Mode At Startup
+
+# General Properties
+rhq.server.startup.web.http.port=HTTP Port
+rhq.server.startup.web.https.port=Secure HTTP Port
+
+# Embedded RHQ Agent
+rhq.server.embedded-agent.enabled=Embedded Agent Enabled
+
+# Email
+rhq.server.email.smtp-host=Email SMTP Host
+rhq.server.email.from-address=Email From Address
\ No newline at end of file


commit 60997f753c55e9882de3a96464a3c87983bfc22f
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Jul 18 21:51:41 2012 -0400

    It's happening again - I'm building out an installer with no one from UXD walking me away from the ledge. Oh well, here's more of the new installer prototype. I'm sure it will be the foundation of the new installer and people will hate its UI design. At least it doesn't have a red background.

diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
index e32bc78..01a6915 100644
--- a/modules/enterprise/gui/gwt-installer-war/pom.xml
+++ b/modules/enterprise/gui/gwt-installer-war/pom.xml
@@ -61,6 +61,12 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.rhq</groupId>
+            <artifactId>rhq-core-util</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>com.google.gwt</groupId>
             <artifactId>gwt-servlet</artifactId>
             <version>${gwt.version}</version>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
index 20ca4db..c8d040c 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
@@ -73,7 +73,21 @@ public class JBossASClient {
      * @return the request
      */
     public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
+        return createReadAttributeRequest(false, attributeName, address);
+    }
+
+    /**
+     * Convienence method that allows you to create request that reads a single attribute
+     * value to a resource.
+     *
+     * @param runtime if <code>true</code>, the attribute is a runtime attribute
+     * @param attributeName the name of the attribute whose value is to be read
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createReadAttributeRequest(boolean runtime, String attributeName, Address address) {
         ModelNode op = createRequest(READ_ATTRIBUTE, address);
+        op.get("include-runtime").set(runtime);
         op.get(NAME).set(attributeName);
         return op;
     }
@@ -261,7 +275,22 @@ public class JBossASClient {
      * @throws Exception if failed to obtain the attribute value
      */
     public String getStringAttribute(String attributeName, Address address) throws Exception {
-        ModelNode op = createReadAttributeRequest(attributeName, address);
+        return getStringAttribute(false, attributeName, address);
+    }
+
+    /**
+     * Convienence method that allows you to obtain a single attribute's string value from
+     * a resource.
+     *
+     * @param runtime if <code>true</code>, the attribute to be retrieved is a runtime attribute
+     * @param attributeName the attribute whose value is to be returned
+     * @param address identifies the resource
+     * @return the attribute value
+     * 
+     * @throws Exception if failed to obtain the attribute value
+     */
+    public String getStringAttribute(boolean runtime, String attributeName, Address address) throws Exception {
+        ModelNode op = createReadAttributeRequest(runtime, attributeName, address);
         ModelNode results = execute(op);
         if (isSuccess(results)) {
             ModelNode version = getResults(results);
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index c267d22..e45bf6d 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -18,17 +18,32 @@
  */
 package org.rhq.enterprise.gui.installer.client;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.smartgwt.client.types.Alignment;
 import com.smartgwt.client.types.Side;
 import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Button;
 import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.IButton;
 import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.grid.events.EditCompleteEvent;
+import com.smartgwt.client.widgets.grid.events.EditCompleteHandler;
 import com.smartgwt.client.widgets.layout.VLayout;
 import com.smartgwt.client.widgets.tab.Tab;
 import com.smartgwt.client.widgets.tab.TabSet;
@@ -46,11 +61,19 @@ public class Installer implements EntryPoint {
     // This must come first to ensure proper I18N class loading for dev mode
     private static final Messages MSG = GWT.create(Messages.class);
 
+    private static final String PROPERTY_NAME = "propertyName";
+    private static final String PROPERTY_VALUE = "propertyValue";
+
     private InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
+    private HashMap<String, String> serverProperties = new HashMap<String, String>();
+    private HashMap<String, String> originalProperties = new HashMap<String, String>();
+
+    private ListGrid advancedPropertyItemGrid;
 
     public void onModuleLoad() {
         Canvas header = createHeader();
-        TabSet tabSet = createTabSet();
+        Canvas installButton = createMainInstallButton();
+        Canvas tabSet = createTabSet();
 
         VLayout layout = new VLayout();
         layout.setWidth100();
@@ -59,12 +82,54 @@ public class Installer implements EntryPoint {
         layout.setMembersMargin(5);
         layout.setDefaultLayoutAlign(Alignment.CENTER);
         layout.addMember(header);
+        layout.addMember(installButton);
         layout.addMember(tabSet);
         layout.draw();
 
         // Remove loading image in case we don't completely cover it
         Element loadingPanel = DOM.getElementById("Loading-Panel");
         loadingPanel.removeFromParent();
+
+        // get the server properties from the server
+        loadServerProperties();
+
+    }
+
+    private void loadServerProperties() {
+        // load the initial server properties
+        installerService.getServerProperties(new AsyncCallback<HashMap<String, String>>() {
+            public void onSuccess(HashMap<String, String> result) {
+                if (result.size() == 0) {
+                    SC.say("Initial server properties are missing.");
+                }
+                serverProperties.clear();
+                serverProperties.putAll(result);
+
+                // remember these original properties in case the user wants to reset them back
+                originalProperties.clear();
+                originalProperties.putAll(result);
+
+                // refresh the advanced view with the new data
+                refreshAdvancedView();
+            }
+
+            public void onFailure(Throwable caught) {
+                SC.say("Cannot load properties: " + caught);
+            }
+        });
+    }
+
+    private void refreshAdvancedView() {
+        ArrayList<ListGridRecord> records = new ArrayList<ListGridRecord>();
+        for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
+            ListGridRecord record = new ListGridRecord();
+            record.setAttribute(PROPERTY_NAME, entry.getKey());
+            record.setAttribute(PROPERTY_VALUE, entry.getValue());
+            records.add(record);
+        }
+        advancedPropertyItemGrid.setData(records.toArray(new ListGridRecord[records.size()]));
+        advancedPropertyItemGrid.markForRedraw();
+        return;
     }
 
     private Canvas createHeader() {
@@ -83,6 +148,19 @@ public class Installer implements EntryPoint {
         return strip;
     }
 
+    private Canvas createMainInstallButton() {
+        Button installButton = new Button(MSG.start_installation_label());
+        installButton.setWrap(false);
+        installButton.setAutoFit(true);
+        installButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                SC.say("TODO: this should start the install");
+            }
+        });
+
+        return installButton;
+    }
+
     private TabSet createTabSet() {
         final TabSet topTabSet = new TabSet();
         topTabSet.setTabBarPosition(Side.TOP);
@@ -102,13 +180,79 @@ public class Installer implements EntryPoint {
         DynamicForm systemSettingsForm = createSystemSettingsForm();
         systemSettingsTab.setPane(systemSettingsForm);
 
+        final Tab advancedViewTab = new Tab(MSG.tab_advancedView());
+        Canvas advancedView = createAdvancedView();
+        advancedViewTab.setPane(advancedView);
+
         topTabSet.addTab(welcomeTab);
         topTabSet.addTab(databaseTab);
         topTabSet.addTab(systemSettingsTab);
+        topTabSet.addTab(advancedViewTab);
 
         return topTabSet;
     }
 
+    private Canvas createAdvancedView() {
+        VLayout layout = new VLayout();
+
+        ToolStrip strip = new ToolStrip();
+        strip.setWidth100();
+
+        IButton saveButton = new IButton(MSG.save_label());
+        saveButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                installerService.saveServerProperties(serverProperties, new AsyncCallback<Void>() {
+                    public void onSuccess(Void result) {
+                        originalProperties.clear();
+                        originalProperties.putAll(serverProperties);
+                        SC.say("Properties saved to server");
+                    }
+
+                    public void onFailure(Throwable caught) {
+                        SC.say("Failed to save properties to server");
+                    }
+                });
+            }
+        });
+        IButton resetButton = new IButton(MSG.reset_label());
+        resetButton.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                serverProperties.clear();
+                serverProperties.putAll(originalProperties);
+                refreshAdvancedView();
+            }
+        });
+        strip.addMember(saveButton);
+        strip.addMember(resetButton);
+        layout.addMember(strip);
+
+        advancedPropertyItemGrid = new ListGrid();
+        advancedPropertyItemGrid.setWidth100();
+        advancedPropertyItemGrid.setHeight100();
+        advancedPropertyItemGrid.setData(new ListGridRecord[0]);
+
+        ListGridField nameField = new ListGridField(PROPERTY_NAME, MSG.property_name_label());
+        nameField.setCanEdit(false);
+
+        ListGridField valueField = new ListGridField(PROPERTY_VALUE, MSG.property_value_label());
+        valueField.setCanEdit(true);
+
+        advancedPropertyItemGrid.setFields(nameField, valueField);
+        advancedPropertyItemGrid.setSortField(PROPERTY_NAME);
+
+        advancedPropertyItemGrid.addEditCompleteHandler(new EditCompleteHandler() {
+            public void onEditComplete(EditCompleteEvent event) {
+                String newValue = (String) event.getNewValues().values().iterator().next().toString();
+                String changedProperty = event.getOldRecord().getAttribute(PROPERTY_NAME);
+                serverProperties.put(changedProperty, newValue);
+            }
+        });
+
+        layout.addMember(advancedPropertyItemGrid);
+
+        return layout;
+    }
+
     private DynamicForm createSystemSettingsForm() {
         DynamicForm systemSettingsForm = new DynamicForm();
         TextItem nameTextItem = new TextItem();
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index 64e0d77..0184c77 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -18,6 +18,8 @@
  */
 package org.rhq.enterprise.gui.installer.client.gwt;
 
+import java.util.HashMap;
+
 import com.google.gwt.user.client.rpc.RemoteService;
 
 /**
@@ -25,9 +27,15 @@ import com.google.gwt.user.client.rpc.RemoteService;
  */
 public interface InstallerGWTService extends RemoteService {
 
+    HashMap<String, String> getServerProperties() throws Exception;
+
+    void saveServerProperties(HashMap<String, String> serverProperties) throws Exception;
+
     void createDatasourceSecurityDomain(String username, String password) throws Exception;
 
     String getAppServerVersion() throws Exception;
 
+    String getAppServerHomeDir() throws Exception;
+
     String getOperatingSystem() throws Exception;
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index 2451b45..3890e1b 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -18,6 +18,11 @@
  */
 package org.rhq.enterprise.gui.installer.server.servlet;
 
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
 import javax.servlet.annotation.WebServlet;
 
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@@ -27,6 +32,7 @@ import org.jboss.as.controller.client.ModelControllerClient;
 import org.rhq.common.jbossas.client.controller.Address;
 import org.rhq.common.jbossas.client.controller.JBossASClient;
 import org.rhq.common.jbossas.client.controller.SecurityDomainJBossASClient;
+import org.rhq.core.util.PropertiesFileUpdate;
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
 import org.rhq.enterprise.gui.installer.server.service.ManagementService;
 
@@ -41,6 +47,38 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
 
     @Override
+    public HashMap<String, String> getServerProperties() throws Exception {
+        File appServerHomeDir = new File(getAppServerHomeDir());
+        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
+        Properties props = propsFile.loadExistingProperties();
+
+        // GWT can't handle Properties - convert to HashMap
+        HashMap<String, String> map = new HashMap<String, String>(props.size());
+        for (Object property : props.keySet()) {
+            map.put(property.toString(), props.getProperty(property.toString()));
+        }
+        return map;
+    }
+
+    @Override
+    public void saveServerProperties(HashMap<String, String> serverProperties) throws Exception {
+        File appServerHomeDir = new File(getAppServerHomeDir());
+        File serverPropertiesFile = new File(appServerHomeDir, "../bin/rhq-server.properties");
+        PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());
+
+        // GWT can't handle Properties - convert from HashMap
+        Properties props = new Properties();
+        for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
+            props.setProperty(entry.getKey(), entry.getValue());
+        }
+
+        propsFile.update(props);
+
+        return;
+    }
+
+    @Override
     public void createDatasourceSecurityDomain(String username, String password) throws Exception {
         final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
         final String securityDomain = RHQ_SECURITY_DOMAIN;
@@ -60,6 +98,14 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     }
 
     @Override
+    public String getAppServerHomeDir() throws Exception {
+        JBossASClient client = new JBossASClient(getClient());
+        String[] address = { "core-service", "server-environment" };
+        String dir = client.getStringAttribute(true, "home-dir", Address.root().add(address));
+        return dir;
+    }
+
+    @Override
     public String getOperatingSystem() throws Exception {
         JBossASClient client = new JBossASClient(getClient());
         String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
index fe75532..2a99074 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -4,4 +4,10 @@ This is the <b>new</b> installer.\n\
 Any HTML can go in here.
 tab.welcome=Welcome
 tab.database=Database
-tab.systemSettings=System Settings
\ No newline at end of file
+tab.systemSettings=System Settings
+tab.advancedView=Advanced View
+property.name.label=Property
+property.value.label=Value
+save.label=Save
+reset.label=Reset
+start.installation.label=Press To Start The Installation Now
\ No newline at end of file


commit bb7c99585e8686b3e1e2e173408d5abee7f8c303
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Jul 18 19:52:30 2012 -0400

    more prototyping - i have code that can deploy the RHQ security domain - which is necessary before we can deploy datasources

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
index ff28f35..1a54d36 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
@@ -27,7 +27,7 @@ import org.jboss.dmr.ModelNode;
  *
  * @author John Mazzitelli
  */
-public class Address {
+public class Address implements Cloneable {
     private ModelNode addressNode;
 
     public static Address root() {
@@ -67,4 +67,16 @@ public class Address {
         addressNode.add(type, name);
         return this;
     }
+
+    @Override
+    public Address clone() throws CloneNotSupportedException {
+        Address clone = new Address();
+        clone.addressNode = addressNode.clone();
+        return clone;
+    }
+
+    @Override
+    public String toString() {
+        return addressNode.asString();
+    }
 }
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
new file mode 100644
index 0000000..fb3135c
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/DatasourceJBossASClient.java
@@ -0,0 +1,34 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+
+/**
+ * Provides convienence methods associated with datasource management.
+ * 
+ * @author John Mazzitelli
+ */
+public class DatasourceJBossASClient extends JBossASClient {
+
+    public DatasourceJBossASClient(ModelControllerClient client) {
+        super(client);
+    }
+
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
new file mode 100644
index 0000000..6dde289
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/FailureException.java
@@ -0,0 +1,77 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Indicates a failed client request.
+ *
+ * @author John Mazzitelli
+ */
+public class FailureException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    private static final String GENERIC_ERROR = "Failed request";
+
+    public FailureException(ModelNode failureNode) {
+        super(buildErrorMessage(GENERIC_ERROR, failureNode));
+    }
+
+    public FailureException(ModelNode failureNode, String errMsg) {
+        super(buildErrorMessage(errMsg, failureNode));
+    }
+
+    public FailureException(ModelNode failureNode, Throwable cause) {
+        super(buildErrorMessage(GENERIC_ERROR, failureNode), cause);
+    }
+
+    public FailureException(ModelNode failureNode, String errMsg, Throwable cause) {
+        super(buildErrorMessage(errMsg, failureNode), cause);
+    }
+
+    public FailureException(String errMsg, Throwable cause) {
+        super((errMsg != null) ? errMsg : GENERIC_ERROR, cause);
+    }
+
+    public FailureException(String errMsg) {
+        super((errMsg != null) ? errMsg : GENERIC_ERROR);
+    }
+
+    public FailureException(Throwable cause) {
+        super(GENERIC_ERROR, cause);
+    }
+
+    public FailureException() {
+        super(GENERIC_ERROR);
+    }
+
+    private static final String buildErrorMessage(String errMsg, ModelNode failureNode) {
+        if (errMsg == null) {
+            errMsg = GENERIC_ERROR;
+        }
+
+        String description = JBossASClient.getFailureDescription(failureNode);
+        if (description != null) {
+            errMsg += ": " + description;
+        }
+
+        return errMsg;
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
index 0f4d3b7..20ca4db 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
@@ -22,7 +22,11 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.OperationMessageHandler;
 import org.jboss.dmr.ModelNode;
 
 /**
@@ -32,25 +36,62 @@ import org.jboss.dmr.ModelNode;
  */
 public class JBossASClient {
 
-    private static final String BATCH = "composite";
-    private static final String BATCH_STEPS = "steps";
-    private static final String OPERATION = "operation";
-    private static final String ADDRESS = "address";
-    private static final String RESULT = "result";
-    private static final String OUTCOME = "outcome";
-    private static final String OUTCOME_SUCCESS = "success";
-    private static final String FAILURE_DESCRIPTION = "failure-description";
-    private static final String NAME = "name";
-    private static final String READ_ATTRIBUTE = "read-attribute";
+    // protected to allow subclasses to have a logger, too, without explicitly declaring one themselves
+    protected final Log log = LogFactory.getLog(this.getClass());
+
+    public static final String BATCH = "composite";
+    public static final String BATCH_STEPS = "steps";
+    public static final String OPERATION = "operation";
+    public static final String ADDRESS = "address";
+    public static final String RESULT = "result";
+    public static final String OUTCOME = "outcome";
+    public static final String OUTCOME_SUCCESS = "success";
+    public static final String SUBSYSTEM = "subsystem";
+    public static final String FAILURE_DESCRIPTION = "failure-description";
+    public static final String NAME = "name";
+    public static final String VALUE = "value";
+    public static final String READ_ATTRIBUTE = "read-attribute";
+    public static final String READ_RESOURCE = "read-resource";
+    public static final String WRITE_ATTRIBUTE = "write-attribute";
+    public static final String ADD = "add";
 
     private ModelControllerClient client;
-    
+
     public JBossASClient(ModelControllerClient client) {
         this.client = client;
     }
 
-    public ModelControllerClient getModelControllerClient() {
-        return client;
+    /////////////////////////////////////////////////////////////////
+    // Some static methods useful for convienence
+
+    /**
+     * Convienence method that allows you to create request that reads a single attribute
+     * value to a resource.
+     * 
+     * @param attributeName the name of the attribute whose value is to be read
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
+        ModelNode op = createRequest(READ_ATTRIBUTE, address);
+        op.get(NAME).set(attributeName);
+        return op;
+    }
+
+    /**
+     * Convienence method that allows you to create request that writes a single attribute's
+     * string value to a resource.
+     * 
+     * @param attributeName the name of the attribute whose value is to be written
+     * @param attributeValue the attribute value that is to be written
+     * @param address identifies the resource
+     * @return the request
+     */
+    public static ModelNode createWriteAttributeRequest(String attributeName, String attributeValue, Address address) {
+        ModelNode op = createRequest(WRITE_ATTRIBUTE, address);
+        op.get(NAME).set(attributeName);
+        op.get(VALUE).set(attributeValue);
+        return op;
     }
 
     /**
@@ -60,7 +101,7 @@ public class JBossASClient {
      * @param address identifies the target resource
      * @return the partial operation request node - caller should fill this in further to complete the node
      */
-    public ModelNode createRequest(String operation, Address address) {
+    public static ModelNode createRequest(String operation, Address address) {
         final ModelNode request = new ModelNode();
         request.get(OPERATION).set(operation);
         request.get(ADDRESS).set(address.getAddressNode());
@@ -74,7 +115,7 @@ public class JBossASClient {
      * 
      * @return the batch operation node
      */
-    public ModelNode createBatchRequest(ModelNode... steps) {
+    public static ModelNode createBatchRequest(ModelNode... steps) {
         final ModelNode composite = new ModelNode();
         composite.get(OPERATION).set(BATCH);
         composite.get(ADDRESS).setEmptyList();
@@ -92,7 +133,7 @@ public class JBossASClient {
      * @param operationResult the node to examine
      * @return the result list as Strings if there is a list, empty otherwise
      */
-    public List<String> getResultList(ModelNode operationResult) {
+    public static List<String> getResultListAsStrings(ModelNode operationResult) {
         if (!operationResult.hasDefined(RESULT)) {
             return Collections.emptyList();
         }
@@ -111,13 +152,28 @@ public class JBossASClient {
     }
 
     /**
+     * If the given node has results, those results are returned in a ModelNode.
+     * Otherwise, an empty node is returned.
+     * 
+     * @param operationResult the node to examine
+     * @return the results as a ModelNode
+     */
+    public static ModelNode getResults(ModelNode operationResult) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return new ModelNode();
+        }
+
+        return operationResult.get(RESULT);
+    }
+
+    /**
      * Examines the given node's result list and if the item is found, returns true.
      * 
      * @param operationResult the node to examine
      * @param item the item to look for in the node's result list
      * @return true if the node has a result list and it contains the item; false otherwise
      */
-    public boolean listContains(ModelNode operationResult, String item) {
+    public static boolean listContains(ModelNode operationResult, String item) {
         if (!operationResult.hasDefined(RESULT)) {
             return false;
         }
@@ -142,7 +198,7 @@ public class JBossASClient {
      * @param operationResult the operation result to test
      * @return the success or failure flag of the result
      */
-    public boolean isSuccess(ModelNode operationResult) {
+    public static boolean isSuccess(ModelNode operationResult) {
         if (operationResult != null) {
             return operationResult.hasDefined(OUTCOME)
                 && operationResult.get(OUTCOME).asString().equals(OUTCOME_SUCCESS);
@@ -158,7 +214,7 @@ public class JBossASClient {
      * @param operationResult the operation whose failure description is to be returned
      * @return the failure description of <code>null</code> if the operation was a success
      */
-    public String getFailureDescription(ModelNode operationResult) {
+    public static String getFailureDescription(ModelNode operationResult) {
         if (isSuccess(operationResult)) {
             return null;
         }
@@ -171,6 +227,29 @@ public class JBossASClient {
         return "Unknown failure";
     }
 
+    /////////////////////////////////////////////////////////////////
+    // Non-static methods that need the client
+
+    public ModelControllerClient getModelControllerClient() {
+        return client;
+    }
+
+    /**
+     * Convienence method that executes the request.
+     * 
+     * @param request
+     * @return results
+     * @throws Exception
+     */
+    public ModelNode execute(ModelNode request) throws Exception {
+        try {
+            return getModelControllerClient().execute(request, OperationMessageHandler.logging);
+        } catch (Exception e) {
+            log.error("Failed to execute request", e);
+            throw e;
+        }
+    }
+
     /**
      * Convienence method that allows you to obtain a single attribute's string value from
      * a resource.
@@ -182,15 +261,15 @@ public class JBossASClient {
      * @throws Exception if failed to obtain the attribute value
      */
     public String getStringAttribute(String attributeName, Address address) throws Exception {
-        ModelNode op = createRequest(READ_ATTRIBUTE, address);
-        op.get(NAME).set(attributeName);
-        ModelNode results = getModelControllerClient().execute(op);
+        ModelNode op = createReadAttributeRequest(attributeName, address);
+        ModelNode results = execute(op);
         if (isSuccess(results)) {
-            ModelNode version = results.get(RESULT);
+            ModelNode version = getResults(results);
             String attributeValue = version.asString();
             return attributeValue;
         } else {
-            throw new RuntimeException(getFailureDescription(results));
+            throw new FailureException(results, "Failed to get attribute [" + attributeName + "] from [" + address
+                + "]");
         }
     }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
new file mode 100644
index 0000000..a73ba79
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
@@ -0,0 +1,110 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.List;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Provides convienence methods associated with security domain management.
+ * 
+ * @author John Mazzitelli
+ */
+public class SecurityDomainJBossASClient extends JBossASClient {
+
+    public static final String SUBSYSTEM_SECURITY = "security";
+    public static final String SECURITY_DOMAIN = "security-domain";
+    public static final String CACHE_TYPE = "cache-type";
+    public static final String AUTHENTICATION = "authentication";
+    public static final String LOGIN_MODULES = "login-modules";
+    public static final String CLASSIC = "classic";
+    public static final String CODE = "code";
+    public static final String FLAG = "flag";
+    public static final String MODULE_OPTIONS = "module-options";
+    public static final String USERNAME = "username";
+    public static final String PASSWORD = "password";
+
+    public SecurityDomainJBossASClient(ModelControllerClient client) {
+        super(client);
+    }
+
+    /**
+     * Checks to see if there is already a security domain with the given name.
+     *
+     * @param securityDomainName the name to check
+     * @return true if there is a security domain with the given name already in existence
+     */
+    public boolean isSecurityDomain(String securityDomainName) throws Exception {
+        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY);
+        ModelNode queryNode = createRequest(READ_RESOURCE, addr);
+        ModelNode results = execute(queryNode);
+        if (isSuccess(results)) {
+            ModelNode domains = getResults(results).get(SECURITY_DOMAIN);
+            List<ModelNode> list = domains.asList();
+            for (ModelNode domain : list) {
+                if (domain.has(securityDomainName)) {
+                    return true;
+                }
+            }
+            return false;
+        } else {
+            throw new FailureException(results, "Failed to get security domains");
+        }
+    }
+
+    /**
+     * Convienence method that builds a request which can create a new security-domain
+     * using the SecureIdentity authentication method. This is used when you want
+     * to obfuscate a database password in the configuration. 
+     *
+     * @param securityDomainName the name of the new security domain
+     * @param username the username associated with the security domain
+     * @param password the value of the password to store in the configuration (e.g. the obfuscated password itself)
+     * 
+     * @throws Exception if failed to create security domain
+     */
+    public void createNewSecureIdentitySecurityDomainRequest(String securityDomainName, String username, String password)
+        throws Exception {
+
+        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, SECURITY_DOMAIN, securityDomainName);
+        ModelNode addTopNode = createRequest(ADD, addr);
+        addTopNode.get(CACHE_TYPE).set("default");
+
+        ModelNode addAuthNode = createRequest(ADD, addr.clone().add(AUTHENTICATION, CLASSIC));
+        ModelNode loginModulesNode = addAuthNode.get(LOGIN_MODULES);
+        ModelNode loginModule = new ModelNode();
+        loginModule.get(CODE).set("SecureIdentity");
+        loginModule.get(FLAG).set("required");
+        ModelNode moduleOptions = loginModule.get(MODULE_OPTIONS);
+        moduleOptions.setEmptyList();
+        moduleOptions.add(USERNAME, username);
+        moduleOptions.add(PASSWORD, password);
+        loginModulesNode.add(loginModule);
+
+        ModelNode batch = createBatchRequest(addTopNode, addAuthNode);
+        ModelNode results = execute(batch);
+        if (!isSuccess(results)) {
+            throw new FailureException(results, "Failed to create security domain [" + securityDomainName + "]");
+        }
+
+        return;
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index decd028..c267d22 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -22,12 +22,17 @@ import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.IButton;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.Side;
+import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
+import com.smartgwt.client.widgets.tab.TabSet;
+import com.smartgwt.client.widgets.toolbar.ToolStrip;
 
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
 
@@ -41,52 +46,82 @@ public class Installer implements EntryPoint {
     // This must come first to ensure proper I18N class loading for dev mode
     private static final Messages MSG = GWT.create(Messages.class);
 
+    private InstallerGWTServiceAsync installerService = InstallerGWTServiceAsync.Util.getInstance();
+
     public void onModuleLoad() {
-        IButton button1 = new IButton(MSG.hello_msg());
-        button1.addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
-                rpc.getAppServerVersion(new AsyncCallback<String>() {
-
-                    @Override
-                    public void onSuccess(String result) {
-                        SC.say("SUCCESS: " + result);
-                    }
-
-                    @Override
-                    public void onFailure(Throwable caught) {
-                        SC.say("FAILURE: " + caught);
-                    }
-                });
-            }
-        });
-
-        IButton button2 = new IButton(MSG.hello_msg());
-        button2.addClickHandler(new ClickHandler() {
-            public void onClick(ClickEvent event) {
-                InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
-                rpc.getOperatingSystem(new AsyncCallback<String>() {
-
-                    @Override
-                    public void onSuccess(String result) {
-                        SC.say("SUCCESS: " + result);
-                    }
-
-                    @Override
-                    public void onFailure(Throwable caught) {
-                        SC.say("FAILURE: " + caught);
-                    }
-                });
-            }
-        });
-
-        VLayout layout = new VLayout(10);
-        layout.addMember(button1);
-        layout.addMember(button2);
+        Canvas header = createHeader();
+        TabSet tabSet = createTabSet();
+
+        VLayout layout = new VLayout();
+        layout.setWidth100();
+        layout.setHeight100();
+        layout.setLayoutMargin(10);
+        layout.setMembersMargin(5);
+        layout.setDefaultLayoutAlign(Alignment.CENTER);
+        layout.addMember(header);
+        layout.addMember(tabSet);
         layout.draw();
 
         // Remove loading image in case we don't completely cover it
         Element loadingPanel = DOM.getElementById("Loading-Panel");
         loadingPanel.removeFromParent();
     }
+
+    private Canvas createHeader() {
+        ToolStrip strip = new ToolStrip();
+        strip.setWidth100();
+        strip.setAlign(Alignment.CENTER);
+
+        Label title = new Label();
+        title.setWidth100();
+        title.setHeight100();
+        title.setWrap(false);
+        title.setValign(VerticalAlignment.CENTER);
+        title.setAlign(Alignment.CENTER);
+        title.setContents("<span style=\"font-size:16pt;font-weight:bold;\">" + MSG.welcome_title() + "</span>");
+        strip.addMember(title);
+        return strip;
+    }
+
+    private TabSet createTabSet() {
+        final TabSet topTabSet = new TabSet();
+        topTabSet.setTabBarPosition(Side.TOP);
+        topTabSet.setTabBarAlign(Side.LEFT);
+        topTabSet.setWidth("80%");
+        topTabSet.setHeight("75%");
+
+        final Tab welcomeTab = new Tab(MSG.tab_welcome());
+        Label welcomeLabel = new Label(MSG.tab_welcome_content());
+        welcomeTab.setPane(welcomeLabel);
+
+        final Tab databaseTab = new Tab(MSG.tab_database());
+        DynamicForm databaseForm = createDatabaseForm();
+        databaseTab.setPane(databaseForm);
+
+        final Tab systemSettingsTab = new Tab(MSG.tab_systemSettings());
+        DynamicForm systemSettingsForm = createSystemSettingsForm();
+        systemSettingsTab.setPane(systemSettingsForm);
+
+        topTabSet.addTab(welcomeTab);
+        topTabSet.addTab(databaseTab);
+        topTabSet.addTab(systemSettingsTab);
+
+        return topTabSet;
+    }
+
+    private DynamicForm createSystemSettingsForm() {
+        DynamicForm systemSettingsForm = new DynamicForm();
+        TextItem nameTextItem = new TextItem();
+        nameTextItem.setTitle("Your Name");
+        systemSettingsForm.setFields(nameTextItem);
+        return systemSettingsForm;
+    }
+
+    private DynamicForm createDatabaseForm() {
+        DynamicForm databaseForm = new DynamicForm();
+        TextItem dbUsernameTextItem = new TextItem();
+        dbUsernameTextItem.setTitle("Database User");
+        databaseForm.setFields(dbUsernameTextItem);
+        return databaseForm;
+    }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index b0f7e23..64e0d77 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -25,6 +25,8 @@ import com.google.gwt.user.client.rpc.RemoteService;
  */
 public interface InstallerGWTService extends RemoteService {
 
+    void createDatasourceSecurityDomain(String username, String password) throws Exception;
+
     String getAppServerVersion() throws Exception;
 
     String getOperatingSystem() throws Exception;
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index bc5351b..2451b45 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -26,6 +26,7 @@ import org.jboss.as.controller.client.ModelControllerClient;
 
 import org.rhq.common.jbossas.client.controller.Address;
 import org.rhq.common.jbossas.client.controller.JBossASClient;
+import org.rhq.common.jbossas.client.controller.SecurityDomainJBossASClient;
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
 import org.rhq.enterprise.gui.installer.server.service.ManagementService;
 
@@ -37,31 +38,37 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
 
     private static final long serialVersionUID = 1L;
 
+    private static final String RHQ_SECURITY_DOMAIN = "RHQDSSecurityDomain";
+
+    @Override
+    public void createDatasourceSecurityDomain(String username, String password) throws Exception {
+        final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(getClient());
+        final String securityDomain = RHQ_SECURITY_DOMAIN;
+        if (!client.isSecurityDomain(securityDomain)) {
+            client.createNewSecureIdentitySecurityDomainRequest(securityDomain, username, password);
+            log("Security domain [" + securityDomain + "] created");
+        } else {
+            log("Security domain [" + securityDomain + "] already exists, skipping the creation request");
+        }
+    }
+
     @Override
     public String getAppServerVersion() throws Exception {
-        try {
-            String version = getClient().getStringAttribute("release-version", Address.root());
+        JBossASClient client = new JBossASClient(getClient());
+        String version = client.getStringAttribute("release-version", Address.root());
         return version;
-        } catch (Exception t) {
-            t.printStackTrace();
-            throw t;
-        }
     }
 
     @Override
     public String getOperatingSystem() throws Exception {
-        try {
+        JBossASClient client = new JBossASClient(getClient());
         String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
-            String osName = getClient().getStringAttribute("name", Address.root().add(address));
+        String osName = client.getStringAttribute("name", Address.root().add(address));
         return osName;
-        } catch (Exception t) {
-            t.printStackTrace();
-            throw t;
-        }
     }
 
-    private JBossASClient getClient() {
+    private ModelControllerClient getClient() {
         ModelControllerClient client = ManagementService.getClient();
-        return new JBossASClient(client);
+        return client;
     }
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
index e83bff5..fe75532 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -1 +1,7 @@
-hello.msg=Hello from the installer
+welcome.title=Installing the Server
+tab.welcome.content=<h1>Welcome to the new GWT Installer</h1>\n\
+This is the <b>new</b> installer.\n\
+Any HTML can go in here.
+tab.welcome=Welcome
+tab.database=Database
+tab.systemSettings=System Settings
\ No newline at end of file


commit 2601cb2c18800a58e5224535cec15690ede6f53b
Author: John Mazzitelli <mazz at redhat.com>
Date:   Wed Jul 18 13:05:15 2012 -0400

    refactor client stuff so we can more easily move it to common module later

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
new file mode 100644
index 0000000..ff28f35
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/Address.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.Arrays;
+
+import org.jboss.dmr.ModelNode;
+
+/**
+ * Identifies a managed resource.
+ *
+ * @author John Mazzitelli
+ */
+public class Address {
+    private ModelNode addressNode;
+
+    public static Address root() {
+        return new Address();
+    }
+
+    public Address() {
+        addressNode = new ModelNode();
+    }
+
+    public Address(String... addressParts) {
+        this();
+        add(addressParts);
+    }
+
+    public ModelNode getAddressNode() {
+        return addressNode;
+    }
+
+    public Address add(String... addressParts) {
+        if (addressParts != null) {
+            if ((addressParts.length % 2) != 0) {
+                throw new IllegalArgumentException("address is incomplete: " + Arrays.toString(addressParts));
+            }
+
+            if (addressParts.length > 0) {
+                for (int i = 0; i < addressParts.length; i += 2) {
+                    addressNode.add(addressParts[i], addressParts[i + 1]);
+                }
+            }
+        }
+
+        return this;
+    }
+
+    public Address add(String type, String name) {
+        addressNode.add(type, name);
+        return this;
+    }
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
new file mode 100644
index 0000000..0f4d3b7
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java
@@ -0,0 +1,196 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.common.jbossas.client.controller;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * A client that can be used to talk to a JBossAS server via the DMR/ModelControllerClient API.
+ *
+ * @author John Mazzitelli
+ */
+public class JBossASClient {
+
+    private static final String BATCH = "composite";
+    private static final String BATCH_STEPS = "steps";
+    private static final String OPERATION = "operation";
+    private static final String ADDRESS = "address";
+    private static final String RESULT = "result";
+    private static final String OUTCOME = "outcome";
+    private static final String OUTCOME_SUCCESS = "success";
+    private static final String FAILURE_DESCRIPTION = "failure-description";
+    private static final String NAME = "name";
+    private static final String READ_ATTRIBUTE = "read-attribute";
+
+    private ModelControllerClient client;
+    
+    public JBossASClient(ModelControllerClient client) {
+        this.client = client;
+    }
+
+    public ModelControllerClient getModelControllerClient() {
+        return client;
+    }
+
+    /**
+     * Convienence method that builds a partial operation request node.
+     * 
+     * @param operation the operation to be requested
+     * @param address identifies the target resource
+     * @return the partial operation request node - caller should fill this in further to complete the node
+     */
+    public ModelNode createRequest(String operation, Address address) {
+        final ModelNode request = new ModelNode();
+        request.get(OPERATION).set(operation);
+        request.get(ADDRESS).set(address.getAddressNode());
+        return request;
+    }
+
+    /**
+     * Creates a batch of operations that can be atomically invoked.
+     * 
+     * @param steps the different operation steps of the batch
+     * 
+     * @return the batch operation node
+     */
+    public ModelNode createBatchRequest(ModelNode... steps) {
+        final ModelNode composite = new ModelNode();
+        composite.get(OPERATION).set(BATCH);
+        composite.get(ADDRESS).setEmptyList();
+        final ModelNode stepsNode = composite.get(BATCH_STEPS);
+        for (ModelNode step : steps) {
+            stepsNode.add(step);
+        }
+        return composite;
+    }
+
+    /**
+     * If the given node has a result list, that list will be returned
+     * with the values as Strings. Otherwise, an empty list is returned.
+     * 
+     * @param operationResult the node to examine
+     * @return the result list as Strings if there is a list, empty otherwise
+     */
+    public List<String> getResultList(ModelNode operationResult) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return Collections.emptyList();
+        }
+
+        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
+        if (nodeList.isEmpty()) {
+            return Collections.emptyList();
+        }
+
+        List<String> list = new ArrayList<String>(nodeList.size());
+        for (ModelNode node : nodeList) {
+            list.add(node.asString());
+        }
+
+        return list;
+    }
+
+    /**
+     * Examines the given node's result list and if the item is found, returns true.
+     * 
+     * @param operationResult the node to examine
+     * @param item the item to look for in the node's result list
+     * @return true if the node has a result list and it contains the item; false otherwise
+     */
+    public boolean listContains(ModelNode operationResult, String item) {
+        if (!operationResult.hasDefined(RESULT)) {
+            return false;
+        }
+
+        List<ModelNode> nodeList = operationResult.get(RESULT).asList();
+        if (nodeList.isEmpty()) {
+            return false;
+        }
+
+        for (ModelNode node : nodeList) {
+            if (node.asString().equals(item)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Returns <code>true</code> if the operation was a success; <code>false</code> otherwise.
+     * 
+     * @param operationResult the operation result to test
+     * @return the success or failure flag of the result
+     */
+    public boolean isSuccess(ModelNode operationResult) {
+        if (operationResult != null) {
+            return operationResult.hasDefined(OUTCOME)
+                && operationResult.get(OUTCOME).asString().equals(OUTCOME_SUCCESS);
+        }
+        return false;
+    }
+
+    /**
+     * If the operation result was a failure, this returns the failure description if there is one.
+     * A generic failure message will be returned if the operation was a failure but has no failure
+     * description. A <code>null</code> is returned if the operation was a success.
+     * 
+     * @param operationResult the operation whose failure description is to be returned
+     * @return the failure description of <code>null</code> if the operation was a success
+     */
+    public String getFailureDescription(ModelNode operationResult) {
+        if (isSuccess(operationResult)) {
+            return null;
+        }
+        if (operationResult != null) {
+            ModelNode descr = operationResult.get(FAILURE_DESCRIPTION);
+            if (descr != null) {
+                return descr.asString();
+            }
+        }
+        return "Unknown failure";
+    }
+
+    /**
+     * Convienence method that allows you to obtain a single attribute's string value from
+     * a resource.
+     * 
+     * @param attributeName the attribute whose value is to be returned
+     * @param address identifies the resource
+     * @return the attribute value
+     * 
+     * @throws Exception if failed to obtain the attribute value
+     */
+    public String getStringAttribute(String attributeName, Address address) throws Exception {
+        ModelNode op = createRequest(READ_ATTRIBUTE, address);
+        op.get(NAME).set(attributeName);
+        ModelNode results = getModelControllerClient().execute(op);
+        if (isSuccess(results)) {
+            ModelNode version = results.get(RESULT);
+            String attributeValue = version.asString();
+            return attributeValue;
+        } else {
+            throw new RuntimeException(getFailureDescription(results));
+        }
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index 97d38a2..b0f7e23 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -25,7 +25,7 @@ import com.google.gwt.user.client.rpc.RemoteService;
  */
 public interface InstallerGWTService extends RemoteService {
 
-    String getAppServerVersion();
+    String getAppServerVersion() throws Exception;
 
-    String getOperatingSystem();
+    String getOperatingSystem() throws Exception;
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index 21e489e..bc5351b 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -23,8 +23,9 @@ import javax.servlet.annotation.WebServlet;
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
 
 import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.dmr.ModelNode;
 
+import org.rhq.common.jbossas.client.controller.Address;
+import org.rhq.common.jbossas.client.controller.JBossASClient;
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
 import org.rhq.enterprise.gui.installer.server.service.ManagementService;
 
@@ -37,52 +38,30 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     private static final long serialVersionUID = 1L;
 
     @Override
-    public String getAppServerVersion() {
-        ModelControllerClient client = ManagementService.getClient();
-
-        // create the read operation we want to invoke on the root AS resource
-        ModelNode op = new ModelNode();
-        op.get("operation").set("read-attribute");
-        op.get("name").set("release-version");
-
-        String versionString;
-
+    public String getAppServerVersion() throws Exception {
         try {
-            ModelNode results = client.execute(op);
-            ModelNode version = results.get("result");
-            versionString = version.asString();
-        } catch (Exception e) {
-            versionString = e.toString();
+            String version = getClient().getStringAttribute("release-version", Address.root());
+        return version;
+        } catch (Exception t) {
+            t.printStackTrace();
+            throw t;
         }
-
-        return versionString;
     }
 
     @Override
-    public String getOperatingSystem() {
-        ModelControllerClient client = ManagementService.getClient();
-
-        // create the read operation we want to invoke on the platform MBean operating system resource
-        ModelNode op = new ModelNode();
-        op.get("operation").set("read-attribute");
-        op.get("name").set("name");
-
-        // provide the target address to the platform MBean operating system resource via ModelNode list
-        ModelNode address = op.get("address");
-        address.add("core-service", "platform-mbean");
-        address.add("type", "operating-system");
-
-        String osName;
-
+    public String getOperatingSystem() throws Exception {
         try {
-            ModelNode results = client.execute(op);
-            ModelNode version = results.get("result");
-            osName = version.asString();
-        } catch (Exception e) {
-            osName = e.toString();
-        }
-
+        String[] address = { "core-service", "platform-mbean", "type", "operating-system" };
+            String osName = getClient().getStringAttribute("name", Address.root().add(address));
         return osName;
+        } catch (Exception t) {
+            t.printStackTrace();
+            throw t;
+        }
     }
 
+    private JBossASClient getClient() {
+        ModelControllerClient client = ManagementService.getClient();
+        return new JBossASClient(client);
+    }
 }


commit 21c06c1acf781ba256149d64a9b666ad289b3050
Author: John Mazzitelli <mazz at redhat.com>
Date:   Mon Jul 16 12:59:23 2012 -0400

    show how to get attributes for resources below the root

diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index 914d9ad..decd028 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -27,6 +27,7 @@ import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.IButton;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.layout.VLayout;
 
 import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
 
@@ -41,8 +42,8 @@ public class Installer implements EntryPoint {
     private static final Messages MSG = GWT.create(Messages.class);
 
     public void onModuleLoad() {
-        IButton button = new IButton(MSG.hello_msg());
-        button.addClickHandler(new ClickHandler() {
+        IButton button1 = new IButton(MSG.hello_msg());
+        button1.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
                 rpc.getAppServerVersion(new AsyncCallback<String>() {
@@ -59,7 +60,30 @@ public class Installer implements EntryPoint {
                 });
             }
         });
-        button.draw();
+
+        IButton button2 = new IButton(MSG.hello_msg());
+        button2.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
+                rpc.getOperatingSystem(new AsyncCallback<String>() {
+
+                    @Override
+                    public void onSuccess(String result) {
+                        SC.say("SUCCESS: " + result);
+                    }
+
+                    @Override
+                    public void onFailure(Throwable caught) {
+                        SC.say("FAILURE: " + caught);
+                    }
+                });
+            }
+        });
+
+        VLayout layout = new VLayout(10);
+        layout.addMember(button1);
+        layout.addMember(button2);
+        layout.draw();
 
         // Remove loading image in case we don't completely cover it
         Element loadingPanel = DOM.getElementById("Loading-Panel");
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index c46a15e..97d38a2 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -27,4 +27,5 @@ public interface InstallerGWTService extends RemoteService {
 
     String getAppServerVersion();
 
+    String getOperatingSystem();
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
index e92bec3..add78a6 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.installer.server.service;
 
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
 
 import org.jboss.as.controller.ModelController;
 import org.jboss.as.controller.client.ModelControllerClient;
@@ -73,7 +74,15 @@ public class ManagementService implements ServiceActivator {
 
         @Override
         public void start(StartContext context) throws StartException {
-            ManagementService.executor = Executors.newFixedThreadPool(1);
+            ManagementService.executor = Executors.newFixedThreadPool(5, new ThreadFactory() {
+                @Override
+                public Thread newThread(Runnable r) {
+                    Thread t = new Thread(r);
+                    t.setDaemon(true);
+                    t.setName("ManagementServiceModelControllerClientThread");
+                    return t;
+                }
+            });
             ManagementService.controller = modelControllerValue.getValue();
         }
 
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index 0f1a0f5..21e489e 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -39,6 +39,8 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
     @Override
     public String getAppServerVersion() {
         ModelControllerClient client = ManagementService.getClient();
+
+        // create the read operation we want to invoke on the root AS resource
         ModelNode op = new ModelNode();
         op.get("operation").set("read-attribute");
         op.get("name").set("release-version");
@@ -56,4 +58,31 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
         return versionString;
     }
 
+    @Override
+    public String getOperatingSystem() {
+        ModelControllerClient client = ManagementService.getClient();
+
+        // create the read operation we want to invoke on the platform MBean operating system resource
+        ModelNode op = new ModelNode();
+        op.get("operation").set("read-attribute");
+        op.get("name").set("name");
+
+        // provide the target address to the platform MBean operating system resource via ModelNode list
+        ModelNode address = op.get("address");
+        address.add("core-service", "platform-mbean");
+        address.add("type", "operating-system");
+
+        String osName;
+
+        try {
+            ModelNode results = client.execute(op);
+            ModelNode version = results.get("result");
+            osName = version.asString();
+        } catch (Exception e) {
+            osName = e.toString();
+        }
+
+        return osName;
+    }
+
 }


commit ca085479502bc48e4d8423dd9ce36b1ba27cdd02
Author: John Mazzitelli <mazz at redhat.com>
Date:   Mon Jul 16 12:21:57 2012 -0400

    illustrates how we can use the co-located management client to obtain simple things like the AS7 release-version string.

diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
index 5185578..e32bc78 100644
--- a/modules/enterprise/gui/gwt-installer-war/pom.xml
+++ b/modules/enterprise/gui/gwt-installer-war/pom.xml
@@ -223,7 +223,7 @@
                         </manifest>
                         <manifestEntries>
                             <Build-Number>${buildNumber}</Build-Number>
-                            <Dependencies>org.jboss.msc,org.jboss.dmr,org.jboss.as.controller-client,org.jboss.as.controller,org.jboss.as.server,org.jboss.as.naming</Dependencies>
+                            <Dependencies>org.jboss.msc,org.jboss.as.controller-client,org.jboss.as.controller,org.jboss.as.server</Dependencies>
                         </manifestEntries>
                     </archive>
                     <webResources>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
index dcd1ad9..e92bec3 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
@@ -47,7 +47,7 @@ import org.jboss.msc.value.InjectedValue;
 public class ManagementService implements ServiceActivator {
 
     private static volatile ModelController controller;
-    private static volatile ExecutorService executor = Executors.newFixedThreadPool(1);
+    private static volatile ExecutorService executor;
 
     public static ModelControllerClient getClient() {
         return controller.createClient(executor);
@@ -73,6 +73,7 @@ public class ManagementService implements ServiceActivator {
 
         @Override
         public void start(StartContext context) throws StartException {
+            ManagementService.executor = Executors.newFixedThreadPool(1);
             ManagementService.controller = modelControllerValue.getValue();
         }
 
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
index d232c29..0f1a0f5 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -41,6 +41,7 @@ public class InstallerGWTServiceImpl extends RemoteServiceServlet implements Ins
         ModelControllerClient client = ManagementService.getClient();
         ModelNode op = new ModelNode();
         op.get("operation").set("read-attribute");
+        op.get("name").set("release-version");
 
         String versionString;
 


commit 3361750558b41e3fa00110b6aacf9ae5dadde1bc
Author: John Mazzitelli <mazz at redhat.com>
Date:   Fri Jul 13 18:13:05 2012 -0400

    this illustrates how we can have a war obtain a co-located ModelController management client without going through a remote connector. the getAppServerVersion method doesn't work correctly yet, but that is only because the ModelNode operation is incorrectly formed. But this is showing the ability to successfully send management API requests to the app server.

diff --git a/.classpath b/.classpath
index 96bb406..e541e4f 100644
--- a/.classpath
+++ b/.classpath
@@ -287,6 +287,12 @@
 	<classpathentry exported="true" kind="var" path="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.2.1/diffutils-1.2.1.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/com/google/code/morphia/morphia/0.99/morphia-0.99.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.1.Final/jboss-servlet-api_3.0_spec-1.0.1.Final.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/msc/jboss-msc/1.0.2.GA/jboss-msc-1.0.2.GA.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jboss-dmr/1.1.1.Final/jboss-dmr-1.1.1.Final.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-naming/7.1.1.Final/jboss-as-naming-7.1.1.Final.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-server/7.1.1.Final/jboss-as-server-7.1.1.Final.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-controller/7.1.1.Final/jboss-as-controller-7.1.1.Final.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/as/jboss-as-controller-client/7.1.1.Final/jboss-as-controller-client-7.1.1.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.3.Final/resteasy-links-2.3.3.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.3.Final/resteasy-jaxrs-2.3.3.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.3.Final/resteasy-jackson-provider-2.3.3.Final.jar"/>
diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
index de60430..5185578 100644
--- a/modules/enterprise/gui/gwt-installer-war/pom.xml
+++ b/modules/enterprise/gui/gwt-installer-war/pom.xml
@@ -21,6 +21,9 @@
         <!-- dependency versions -->
         <gwt.version>2.4.0</gwt.version>
         <smartgwt.version>3.0</smartgwt.version>
+        <jboss.as.version>7.1.1.Final</jboss.as.version> <!-- our AS7 container -->
+        <jboss.msc.version>1.0.2.GA</jboss.msc.version> <!-- this ships with our AS7 container -->
+        <jboss.dmr.version>1.1.1.Final</jboss.dmr.version> <!-- this ships with our AS7 container -->
 
         <installerGuiParams />
         <installerGuiRunTarget>'http://localhost:7080/rhq-gwt-installer/index.html${installerGuiParams}'</installerGuiRunTarget>
@@ -34,7 +37,8 @@
         <gwt.draftCompile>false</gwt.draftCompile>
         <gwt.soyc>false</gwt.soyc>
         <gwt.style>PRETTY</gwt.style>
-        <gwt.locale>en,de,ja,pt,zh,ru,cs</gwt.locale>
+        <!-- <gwt.locale>en,de,ja,pt,zh,ru,cs</gwt.locale> -->
+        <gwt.locale>en</gwt.locale>
         <gwt.fallback.locale>en</gwt.fallback.locale>
 
         <enable-tags>true</enable-tags>
@@ -93,6 +97,49 @@
             <scope>provided</scope> <!-- provided by AS7 -->
         </dependency>
 
+        <!-- we need these so we can have our own service to provide a co-located management client -->
+        <dependency>
+            <groupId>org.jboss.msc</groupId>
+            <artifactId>jboss-msc</artifactId>
+            <version>${jboss.msc.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-dmr</artifactId>
+            <version>${jboss.dmr.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-naming</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-server</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-controller-client</artifactId>
+            <version>${jboss.as.version}</version>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -176,6 +223,7 @@
                         </manifest>
                         <manifestEntries>
                             <Build-Number>${buildNumber}</Build-Number>
+                            <Dependencies>org.jboss.msc,org.jboss.dmr,org.jboss.as.controller-client,org.jboss.as.controller,org.jboss.as.server,org.jboss.as.naming</Dependencies>
                         </manifestEntries>
                     </archive>
                     <webResources>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
index 32de38d..914d9ad 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -45,7 +45,7 @@ public class Installer implements EntryPoint {
         button.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
-                rpc.testMe(new AsyncCallback<String>() {
+                rpc.getAppServerVersion(new AsyncCallback<String>() {
 
                     @Override
                     public void onSuccess(String result) {
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
index 10fd864..c46a15e 100644
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -25,6 +25,6 @@ import com.google.gwt.user.client.rpc.RemoteService;
  */
 public interface InstallerGWTService extends RemoteService {
 
-    String testMe();
+    String getAppServerVersion();
 
 }
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java
deleted file mode 100644
index 58acd2f..0000000
--- a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.installer.server;
-
-import javax.servlet.annotation.WebServlet;
-
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
-
-/**
- * @author John Mazzitelli
- */
- at WebServlet(value = "/org.rhq.enterprise.gui.installer.Installer/InstallerGWTService")
-public class InstallerGWTServiceImpl extends RemoteServiceServlet implements InstallerGWTService {
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public String testMe() {
-        return "foo";
-    }
-
-}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
new file mode 100644
index 0000000..dcd1ad9
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/service/ManagementService.java
@@ -0,0 +1,90 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.service;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import org.jboss.as.controller.ModelController;
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.server.Services;
+import org.jboss.msc.service.Service;
+import org.jboss.msc.service.ServiceActivator;
+import org.jboss.msc.service.ServiceActivatorContext;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceRegistryException;
+import org.jboss.msc.service.StartContext;
+import org.jboss.msc.service.StartException;
+import org.jboss.msc.service.StopContext;
+import org.jboss.msc.value.InjectedValue;
+
+/**
+ * This will provide our co-located management service.
+ * This is useful because it helps us avoid performing any management
+ * over a remote connector. Since we know we are running co-located
+ * in the same app server container that we want to manage, this 
+ * service will provide us with a management client that does not go
+ * over a remote connector to talk to our app server container.
+ *
+ * @author John Mazzitelli
+ */
+public class ManagementService implements ServiceActivator {
+
+    private static volatile ModelController controller;
+    private static volatile ExecutorService executor = Executors.newFixedThreadPool(1);
+
+    public static ModelControllerClient getClient() {
+        return controller.createClient(executor);
+    }
+
+    @Override
+    public void activate(ServiceActivatorContext context) throws ServiceRegistryException {
+        final GetModelControllerService service = new GetModelControllerService();
+        context
+            .getServiceTarget()
+            .addService(ServiceName.of("rhq", "installer", "management", "client", "getter"), service)
+            .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.modelControllerValue)
+            .install();
+    }
+
+    private class GetModelControllerService implements Service<Void> {
+        private InjectedValue<ModelController> modelControllerValue = new InjectedValue<ModelController>();
+
+        @Override
+        public Void getValue() throws IllegalStateException, IllegalArgumentException {
+            return null;
+        }
+
+        @Override
+        public void start(StartContext context) throws StartException {
+            ManagementService.controller = modelControllerValue.getValue();
+        }
+
+        @Override
+        public void stop(StopContext context) {
+            try {
+                ManagementService.executor.shutdownNow();
+            } finally {
+                ManagementService.executor = null;
+                ManagementService.controller = null;
+            }
+        }
+
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
new file mode 100644
index 0000000..d232c29
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/servlet/InstallerGWTServiceImpl.java
@@ -0,0 +1,58 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server.servlet;
+
+import javax.servlet.annotation.WebServlet;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.dmr.ModelNode;
+
+import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
+import org.rhq.enterprise.gui.installer.server.service.ManagementService;
+
+/**
+ * @author John Mazzitelli
+ */
+ at WebServlet(value = "/org.rhq.enterprise.gui.installer.Installer/InstallerGWTService")
+public class InstallerGWTServiceImpl extends RemoteServiceServlet implements InstallerGWTService {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getAppServerVersion() {
+        ModelControllerClient client = ManagementService.getClient();
+        ModelNode op = new ModelNode();
+        op.get("operation").set("read-attribute");
+
+        String versionString;
+
+        try {
+            ModelNode results = client.execute(op);
+            ModelNode version = results.get("result");
+            versionString = version.asString();
+        } catch (Exception e) {
+            versionString = e.toString();
+        }
+
+        return versionString;
+    }
+
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
new file mode 100644
index 0000000..c64cc21
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.jboss.msc.service.ServiceActivator
@@ -0,0 +1 @@
+org.rhq.enterprise.gui.installer.server.service.ManagementService
\ No newline at end of file


commit 89b106e3f1d870da035aae22a926e69a0efa22c5
Author: John Mazzitelli <mazz at redhat.com>
Date:   Thu Jul 12 18:14:16 2012 -0400

    the start of a GWT installer. this builds and runs for AS7 only (it uses EE6)

diff --git a/.classpath b/.classpath
index 443abde..96bb406 100644
--- a/.classpath
+++ b/.classpath
@@ -49,6 +49,8 @@
 	<classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/test/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/installer-war/src/main/java"/>
+	<classpathentry kind="src" path="modules/enterprise/gui/gwt-installer-war/src/main/java"/>
+	<classpathentry kind="src" path="modules/enterprise/gui/gwt-installer-war/target/generated-sources/gwt"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/base-perspective-jar/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/gui/content_http-war/src/main/java"/>
 	<classpathentry kind="src" path="modules/enterprise/server/client-api/src/main/java"/>
@@ -284,6 +286,7 @@
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.6.5/mongo-java-driver-2.6.5.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/com/googlecode/java-diff-utils/diffutils/1.2.1/diffutils-1.2.1.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/com/google/code/morphia/morphia/0.99/morphia-0.99.jar"/>
+	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/spec/javax/servlet/jboss-servlet-api_3.0_spec/1.0.1.Final/jboss-servlet-api_3.0_spec-1.0.1.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-links/2.3.3.Final/resteasy-links-2.3.3.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jaxrs/2.3.3.Final/resteasy-jaxrs-2.3.3.Final.jar"/>
 	<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/resteasy/resteasy-jackson-provider/2.3.3.Final/resteasy-jackson-provider-2.3.3.Final.jar"/>
diff --git a/modules/enterprise/gui/gwt-installer-war/pom.xml b/modules/enterprise/gui/gwt-installer-war/pom.xml
new file mode 100644
index 0000000..de60430
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/pom.xml
@@ -0,0 +1,352 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.rhq</groupId>
+        <artifactId>rhq-parent</artifactId>
+        <version>4.5.0-SNAPSHOT</version>
+        <relativePath>../../../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.rhq</groupId>
+    <artifactId>rhq-gwt-installer-war</artifactId>
+    <packaging>war</packaging>
+
+    <name>RHQ Enterprise GWT Installer GUI</name>
+    <description>The RHQ Enterprise GWT Installer GUI webapp</description>
+
+    <properties>
+        <!-- dependency versions -->
+        <gwt.version>2.4.0</gwt.version>
+        <smartgwt.version>3.0</smartgwt.version>
+
+        <installerGuiParams />
+        <installerGuiRunTarget>'http://localhost:7080/rhq-gwt-installer/index.html${installerGuiParams}'</installerGuiRunTarget>
+
+        <!-- If this is too much memory to allocate to your gwt:debug process then
+            override this property in in your settings.xml -->
+        <gwt-plugin.extraJvmArgs>-Xms512M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M</gwt-plugin.extraJvmArgs>
+        <gwt-plugin.localWorkers>4</gwt-plugin.localWorkers>
+
+        <gwt.userAgent>ie8,ie9,gecko1_8,safari,opera</gwt.userAgent>
+        <gwt.draftCompile>false</gwt.draftCompile>
+        <gwt.soyc>false</gwt.soyc>
+        <gwt.style>PRETTY</gwt.style>
+        <gwt.locale>en,de,ja,pt,zh,ru,cs</gwt.locale>
+        <gwt.fallback.locale>en</gwt.fallback.locale>
+
+        <enable-tags>true</enable-tags>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- JBoss distributes a complete set of Java EE 6 APIs. We use this here 
+                so that we always get the correct versions of artifacts.
+				TODO: We should probably move this up to the root pom. -->
+            <dependency>
+                <groupId>org.jboss.spec</groupId>
+                <artifactId>jboss-javaee-6.0</artifactId>
+                <version>3.0.0.Final</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-servlet</artifactId>
+            <version>${gwt.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-user</artifactId>
+            <version>${gwt.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- This is so we can compile custom GWT Generators to be called during
+            gwt compilation. Is is not needed at runtime and so is not included in the
+            WAR. -->
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-dev</artifactId>
+            <version>${gwt.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.smartgwt</groupId>
+            <artifactId>smartgwt</artifactId>
+            <version>${smartgwt.version}</version>
+        </dependency>
+
+        <!-- Import the Servlet API -->
+        <dependency>
+            <groupId>org.jboss.spec.javax.servlet</groupId>
+            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+            <scope>provided</scope> <!-- provided by AS7 -->
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>rhq-gwt-installer</finalName>
+
+        <resources>
+            <resource>
+                <targetPath>${project.build.directory}/generated-sources/gwt</targetPath>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*.gwt.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.java</include>
+                </includes>
+            </resource>
+        </resources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>gwt-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <noServer>true</noServer>
+                    <inplace>false</inplace>
+                    <logLevel>INFO</logLevel>
+                    <runTarget>${installerGuiRunTarget}</runTarget>
+                    <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs>
+                    <localWorkers>${gwt-plugin.localWorkers}</localWorkers>
+                    <draftCompile>${gwt.draftCompile}</draftCompile>
+                    <soyc>${gwt.soyc}</soyc>
+                    <buildOutputDirectory>target/gwtclasses</buildOutputDirectory>
+                    <hostedWebapp>target/hostedWar</hostedWebapp>
+                    <debugSuspend>false</debugSuspend>
+                    <servicePattern>**/gwt/*GWTService.java</servicePattern>
+                    <i18nMessagesBundle>org.rhq.enterprise.gui.installer.client.Messages</i18nMessagesBundle>
+                    <style>${gwt.style}</style>
+                    <strict>true</strict>
+                    <!-- compiles gwt artifacts like symbolMap outside of war so it doesnt
+                        get packaged -->
+                    <deploy>${project.build.directory}/gwt-deploy</deploy>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <id>gwt-goals</id>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>generateAsync</goal>
+                            <goal>i18n</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <!-- This id is what does the trick, don't change it. For this to work
+                            maven 2.2.0 and later is needed. -->
+                        <id>default-cli</id>
+                        <goals>
+                            <goal>debug</goal>
+                        </goals>
+                        <configuration>
+                            <module>org.rhq.enterprise.gui.installer.Installer</module>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Build-Number>${buildNumber}</Build-Number>
+                        </manifestEntries>
+                    </archive>
+                    <webResources>
+                        <resource>
+                            <filtering>false</filtering>
+                            <directory>${basedir}/src/main/webapp</directory>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>add-gwt-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/gwt</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+    </build>
+
+    <profiles>
+        <profile>
+            <id>dev</id>
+
+            <properties>
+                <rhq.rootDir>../../../..</rhq.rootDir>
+                <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+                <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName>
+                <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir>
+            </properties>
+
+            <build>
+                <plugins>
+
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+
+                            <execution>
+                                <id>deploy-classes</id>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to ${deployment.dir}${file.separator}...</echo>
+                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
+                                            <fileset dir="${basedir}/src/main/webapp" />
+                                        </copy>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>deploy</id>
+                                <phase>package</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Copying updated files from target${file.separator}${project.build.finalName}${file.separator} to ${deployment.dir}${file.separator}...</echo>
+                                        <copy todir="${deployment.dir}" verbose="${rhq.verbose}">
+                                            <fileset dir="${basedir}/target/${project.build.finalName}" />
+                                        </copy>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>undeploy</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <target>
+                                        <property name="deployment.dir" location="${rhq.deploymentDir}" />
+                                        <echo>*** Deleting ${deployment.dir}${file.separator}...</echo>
+                                        <delete dir="${deployment.dir}" />
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+
+        <!-- Change the installerGuiRunTarget to not have single quotes. The quotes
+            work for linux but not win -->
+        <profile>
+            <id>windows</id>
+            <activation>
+                <os>
+                    <family>Windows</family>
+                </os>
+            </activation>
+            <properties>
+                <installerGuiRunTarget>http://localhost:7080//rhq-gwt-installer/index.html${installerGuiParams}</installerGuiRunTarget>
+            </properties>
+        </profile>
+
+        <profile>
+            <id>msg</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <includes>
+                                <include>org/rhq/enterprise/gui/installer/client/Messages*.java</include>
+                            </includes>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>disable-tags</id>
+            <activation>
+                <property>
+                    <name>brew</name>
+                </property>
+            </activation>
+            <properties>
+                <enable.tags>false</enable.tags>
+            </properties>
+        </profile>
+
+    </profiles>
+
+
+    <repositories>
+        <repository>
+            <id>smartgwt</id>
+            <name>SmartGWT Releases</name>
+            <url>http://www.smartclient.com/maven2/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+
+        <repository>
+            <id>codehaus</id>
+            <name>Codehaus Releases</name>
+            <url>http://repository.codehaus.org/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+
+    </repositories>
+
+</project>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
new file mode 100644
index 0000000..32de38d
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/Installer.java
@@ -0,0 +1,68 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+
+import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTServiceAsync;
+
+/**
+ * The GWT {@link EntryPoint entry point} to the RHQ Installer GUI.
+ *
+ * @author John Mazzitelli
+ */
+public class Installer implements EntryPoint {
+
+    // This must come first to ensure proper I18N class loading for dev mode
+    private static final Messages MSG = GWT.create(Messages.class);
+
+    public void onModuleLoad() {
+        IButton button = new IButton(MSG.hello_msg());
+        button.addClickHandler(new ClickHandler() {
+            public void onClick(ClickEvent event) {
+                InstallerGWTServiceAsync rpc = InstallerGWTServiceAsync.Util.getInstance();
+                rpc.testMe(new AsyncCallback<String>() {
+
+                    @Override
+                    public void onSuccess(String result) {
+                        SC.say("SUCCESS: " + result);
+                    }
+
+                    @Override
+                    public void onFailure(Throwable caught) {
+                        SC.say("FAILURE: " + caught);
+                    }
+                });
+            }
+        });
+        button.draw();
+
+        // Remove loading image in case we don't completely cover it
+        Element loadingPanel = DOM.getElementById("Loading-Panel");
+        loadingPanel.removeFromParent();
+    }
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
new file mode 100644
index 0000000..10fd864
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/client/gwt/InstallerGWTService.java
@@ -0,0 +1,30 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.client.gwt;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+/**
+ * @author John Mazzitelli
+ */
+public interface InstallerGWTService extends RemoteService {
+
+    String testMe();
+
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java
new file mode 100644
index 0000000..58acd2f
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/java/org/rhq/enterprise/gui/installer/server/InstallerGWTServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.installer.server;
+
+import javax.servlet.annotation.WebServlet;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+import org.rhq.enterprise.gui.installer.client.gwt.InstallerGWTService;
+
+/**
+ * @author John Mazzitelli
+ */
+ at WebServlet(value = "/org.rhq.enterprise.gui.installer.Installer/InstallerGWTService")
+public class InstallerGWTServiceImpl extends RemoteServiceServlet implements InstallerGWTService {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String testMe() {
+        return "foo";
+    }
+
+}
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
new file mode 100644
index 0000000..164e94a
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/Installer.gwt.xml
@@ -0,0 +1,35 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.4.0//EN"
+    "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
+
+<module>
+
+    <inherits name='com.google.gwt.user.User'/>
+    <inherits name='com.google.gwt.i18n.I18N'/>
+    <inherits name="com.google.gwt.logging.Logging"/>
+
+    <inherits name='com.smartgwt.SmartGwt' />
+    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
+
+    <!-- ============================ gwt logging ============================= -->
+    <set-property name="gwt.logging.enabled" value="TRUE"/>
+    <!-- FINE ~= DEBUG in gwt-log -->
+    <set-property name="gwt.logging.logLevel" value="FINE"/>
+    <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
+    <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
+    <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
+    <set-property name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
+    <set-property name="gwt.logging.popupHandler" value="DISABLED" />
+    <set-property name="gwt.logging.systemHandler" value="ENABLED" />
+    <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
+
+    <set-property name="user.agent" value="${gwt.userAgent}"/>
+    <extend-property name="locale" values="${gwt.locale}" />
+
+    <set-configuration-property name="locale.usemeta" value="Y"/>
+    <set-configuration-property name="locale.useragent" value="Y"/>
+    <set-configuration-property name="locale.searchorder" value="queryparam,meta,useragent,cookie"/>
+    <set-property-fallback name="locale" value="${gwt.fallback.locale}"/>
+
+    <entry-point class='org.rhq.enterprise.gui.installer.client.Installer'/>
+
+</module>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
new file mode 100644
index 0000000..e83bff5
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/resources/org/rhq/enterprise/gui/installer/client/Messages.properties
@@ -0,0 +1 @@
+hello.msg=Hello from the installer
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..b970eb3
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>
diff --git a/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
new file mode 100644
index 0000000..944e61e
--- /dev/null
+++ b/modules/enterprise/gui/gwt-installer-war/src/main/webapp/index.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+    <!-- this forces us to emulate IE8 "quirks" mode regardless of IE browser version.  It:
+         1) Follows the SmartGWT recommendation of not declaring a DOCTYPE and instead using these meta elements.
+            http://forums.smartclient.com/showthread.php?t=15973
+         2) solves initial app load issues that we experienced on some XP and Vista/Windows7  flavors.
+    -->
+    <meta http-equiv="X-UA-Compatible" content="IE=8" />
+
+    <!-- support internationalized characters -->
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+
+    <script>
+        var search = location.search;
+        // only do this if you have not specified locale as query param
+        if(search.indexOf("locale") == -1){
+            // IE uses browserLanguage
+            var lang = navigator.language!=null ? navigator.language : navigator.browserLanguage;
+            var lang = lang.replace("-", "_");
+            document.write("<meta name='gwt:property' content='locale="+lang +"'>");
+        }
+    </script>
+
+    <title>RHQ Installer</title>
+
+    <script type="text/javascript">
+        var isomorphicDir = "org.rhq.enterprise.gui.installer.Installer/sc/";
+    </script>
+
+</head>
+<body>
+
+    <script type="text/javascript" language="javascript"
+            src="org.rhq.enterprise.gui.installer.Installer/org.rhq.enterprise.gui.installer.Installer.nocache.js"></script>
+
+    <div id="Loading-Panel" style="width: 214px; height: 90px; margin-top: 300px; margin-left: 40%; margin-right: 40%;">
+        <div style="text-align: center; border: 3px solid lightgray;">
+            Loading RHQ Installer...
+        </div>
+    </div>
+
+    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+</body>
+</html>




More information about the rhq-commits mailing list