[rhq] Branch 'rhq-on-as7' - 19 commits - modules/core modules/enterprise modules/plugins pom.xml

Jay Shaughnessy jshaughn at fedoraproject.org
Fri Aug 24 20:45:00 UTC 2012


 modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/drift/DriftServerService.java                                             |    5 
 modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java                                                           |    6 
 modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/sync/DriftSyncManager.java                                                  |   12 
 modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java                                               |   11 
 modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh                                                                                         |   40 +
 modules/enterprise/binding/pom.xml                                                                                                            |    7 
 modules/enterprise/binding/src/main/java/org/rhq/bindings/client/ResourceClientProxy.java                                                     |   28 -
 modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptEngineTest.java                                                               |   58 +-
 modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptedTestBase.java                                                               |  220 ++++++++
 modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java                                                          |  269 +++++++---
 modules/enterprise/gui/coregui/pom.xml                                                                                                        |    4 
 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java                                          |   33 -
 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java                                |   11 
 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java |   35 -
 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java          |   50 +
 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java     |   15 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml                                              |   12 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties                                   |    7 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties                                |    1 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties                                |    7 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties                                |    1 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties                                |    7 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties                                |    1 
 modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties                                |    7 
 modules/enterprise/remoting/cli/pom.xml                                                                                                       |   27 +
 modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml                                                                         |    9 
 modules/enterprise/scripting/javascript/pom.xml                                                                                               |    2 
 modules/enterprise/scripting/pom.xml                                                                                                          |    5 
 modules/enterprise/scripting/python/pom.xml                                                                                                   |    2 
 modules/enterprise/server/ear/pom.xml                                                                                                         |   19 
 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerServiceImpl.java                                       |   20 
 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java                                       |   13 
 modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/group/test/LargeGroupCriteriaTest.java                         |   55 ++
 modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceManagerBeanTest.java                              |  139 ++---
 modules/plugins/jboss-as-7/pom.xml                                                                                                            |    1 
 modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java                                             |    2 
 pom.xml                                                                                                                                       |   19 
 37 files changed, 885 insertions(+), 275 deletions(-)

New commits:
commit b3ad72fb230a6a7f8612e1ea5271ed438bd84034
Merge: 58a6937 b8a6a49
Author: Jay Shaughnessy <jshaughn at jshaughn.csb>
Date:   Fri Aug 24 16:02:57 2012 -0400

    Merge branch 'master' into rhq-on-as7
    
    Conflicts:
    	modules/enterprise/server/ear/pom.xml

diff --cc modules/enterprise/server/ear/pom.xml
index 900df43,0bed079..ec8cea9
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@@ -488,435 -733,212 +488,454 @@@
                                  </artifactItem>
  
                                  <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-sshd-plugin</artifactId>
 -                                  <version>${project.version}</version>
 +                                    <groupId>${project.groupId}</groupId>
 +                                    <artifactId>packagetype-cli</artifactId>
 +                                    <version>${project.version}</version>
                                  </artifactItem>
 -<!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement
  
                                  <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-virt-plugin</artifactId>
 -                                  <version>${project.version}</version>
 +                                    <groupId>${project.groupId}</groupId>
 +                                    <artifactId>rhq-serverplugin-drift</artifactId>
 +                                    <version>${project.version}</version>
                                  </artifactItem>
  
 +                                <!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement
                                  <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-kickstart-plugin</artifactId>
 -                                  <version>${project.version}</version>
 +                                    <groupId>${project.groupId}</groupId>
 +                                    <artifactId>alert-scriptlang</artifactId>
 +                                    <version>${project.version}</version>
                                  </artifactItem>
 +                                -->
  
 --->
 -                             </artifactItems>
 -                             <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory>
 -                          </configuration>
 -                       </execution>
 +                            </artifactItems>
 +                            <outputDirectory>${earDirectory}/rhq-serverplugins</outputDirectory>
 +                        </configuration>
 +                    </execution>
  
 -                    </executions>
 -                 </plugin>
 -              </plugins>
 -           </build>
 +                </executions>
 +            </plugin>
 +        </plugins>
 +    </build>
  
 +    <profiles>
++        <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
++        <profile>
++           <id>bundle-additional-script-languages</id>
++           <activation>
++              <property>
++                 <!-- we want this always active but activeByDefault doesn't work -->
++                 <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
++                 <name>java.home</name> 
++              </property>
++           </activation>
++           
++           <dependencies>
++              <dependency>
++                 <groupId>org.rhq</groupId>
++                 <artifactId>rhq-scripting-python</artifactId>
++                 <version>${project.version}</version>
++              </dependency>                     
++           </dependencies>
+         </profile>
  
          <profile>
 -            <id>misc-plugins</id>
 -             <activation>
 +            <id>jboss-plugins</id>
 +            <activation>
                  <property>
 -                   <name>java.home</name>
 +                    <name>java.home</name>
                  </property>
 -             </activation>
 -
 -             <build>
 -               <plugins>
 -                 <plugin>
 -                    <artifactId>maven-dependency-plugin</artifactId>
 -                    <executions>
 -
 -                       <execution>
 -                          <id>copy-misc-plugins</id>
 -                          <phase>process-resources</phase>
 -                          <goals>
 -                             <goal>copy</goal>
 -                          </goals>
 -                          <configuration>
 -                             <artifactItems>
 -
 -                                <artifactItem>
 -                                   <groupId>org.rhq</groupId>
 -                                   <artifactId>rhq-hudson-plugin</artifactId>
 -                                   <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                   <groupId>org.rhq</groupId>
 -                                   <artifactId>rhq-iis-plugin</artifactId>
 -                                   <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-database-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-postgres-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-mysql-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-oracle-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-perftest-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-snmptrapd-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-twitter-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                                <artifactItem>
 -                                  <groupId>org.rhq</groupId>
 -                                  <artifactId>rhq-filetemplate-bundle-plugin</artifactId>
 -                                  <version>${project.version}</version>
 -                                </artifactItem>
 -
 -                             </artifactItems>
 -                             <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory>
 -                          </configuration>
 -                       </execution>
 -
 -                    </executions>
 -                 </plugin>
 -              </plugins>
 -           </build>
 +            </activation>
  
 +            <build>
 +                <plugins>
 +                    <plugin>
 +                        <artifactId>maven-dependency-plugin</artifactId>
 +                        <executions>
 +
 +                            <execution>
 +                                <id>copy-jboss-plugins</id>
 +                                <phase>process-resources</phase>
 +                                <goals>
 +                                    <goal>copy</goal>
 +                                </goals>
 +                                <configuration>
 +                                    <artifactItems>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-augeas-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-apache-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-tomcat-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-jboss-as-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-hibernate-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-rhq-server-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-jboss-cache-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-jboss-as-5-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>org.jboss.on</groupId>
 +                                            <artifactId>jopr-jboss-cache-v3-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>modcluster-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-jboss-as-7-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +                                    </artifactItems>
 +                                    <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory>
 +                                </configuration>
 +                            </execution>
 +
 +                        </executions>
 +                    </plugin>
 +                </plugins>
 +            </build>
          </profile>
  
 -      <profile>
 -         <id>dev</id>
 -
 -         <properties>
 -            <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>
 -         </properties>
 +        <profile>
 +            <id>linux-plugins</id>
 +            <activation>
 +                <property>
 +                    <name>java.home</name>
 +                </property>
 +            </activation>
  
 -         <build>
 -            <plugins>
 +            <build>
 +                <plugins>
 +                    <plugin>
 +                        <artifactId>maven-dependency-plugin</artifactId>
 +                        <executions>
 +
 +                            <execution>
 +                                <id>copy-linux-plugins</id>
 +                                <phase>process-resources</phase>
 +                                <goals>
 +                                    <goal>copy</goal>
 +                                </goals>
 +                                <configuration>
 +                                    <artifactItems>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-augeas-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-cron-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-script-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-grub-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-hosts-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-cobbler-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-sudoers-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-netservices-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-samba-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-postfix-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-aliases-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-sshd-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-script2-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-virt-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-kickstart-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +                                        -->
 +                                    </artifactItems>
 +                                    <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory>
 +                                </configuration>
 +                            </execution>
 +
 +                        </executions>
 +                    </plugin>
 +                </plugins>
 +            </build>
 +        </profile>
  
 -               <plugin>
 -                  <artifactId>maven-antrun-plugin</artifactId>
 -                  <executions>
 +        <profile>
 +            <id>misc-plugins</id>
 +            <activation>
 +                <property>
 +                    <name>java.home</name>
 +                </property>
 +            </activation>
  
 -                     <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>
 -                              <property name="deployment.descriptor.file" location="${deployment.dir}/META-INF/application.xml" />
 -                              <echo>*** Touching ${deployment.descriptor.file} to force redeployment of
 -                                 ${rhq.deploymentName}...</echo>
 -                              <touch file="${deployment.descriptor.file}" />
 -                           </target>
 -                        </configuration>
 -                        <goals>
 -                           <goal>run</goal>
 -                        </goals>
 -                     </execution>
 +            <build>
 +                <plugins>
 +                    <plugin>
 +                        <artifactId>maven-dependency-plugin</artifactId>
 +                        <executions>
 +
 +                            <execution>
 +                                <id>copy-misc-plugins</id>
 +                                <phase>process-resources</phase>
 +                                <goals>
 +                                    <goal>copy</goal>
 +                                </goals>
 +                                <configuration>
 +                                    <artifactItems>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-hudson-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-iis-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-database-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-postgres-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-mysql-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-oracle-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-perftest-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-snmptrapd-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-twitter-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                        <artifactItem>
 +                                            <groupId>${project.groupId}</groupId>
 +                                            <artifactId>rhq-filetemplate-bundle-plugin</artifactId>
 +                                            <version>${project.version}</version>
 +                                        </artifactItem>
 +
 +                                    </artifactItems>
 +                                    <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory>
 +                                </configuration>
 +                            </execution>
 +
 +                        </executions>
 +                    </plugin>
 +                </plugins>
 +            </build>
 +        </profile>
  
 -                     <execution>
 -                        <id>deploy-ear-meta-inf</id>
 -                        <phase>package</phase>
 -                        <configuration>
 -                           <target>
 -                              <unjar src="${project.build.directory}/${project.build.finalName}.ear" dest="${rhq.deploymentDir}">
 -                                 <patternset>
 -                                    <include name="META-INF/**" />
 -                                 </patternset>
 -                              </unjar>
 -                           </target>
 -                        </configuration>
 -                        <goals>
 -                           <goal>run</goal>
 -                        </goals>
 -                     </execution>
 +        <profile>
 +            <id>dev</id>
  
 -                     <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>
 +            <properties>
 +                <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/standalone/deployments/${rhq.deploymentName}</rhq.deploymentDir>
 +                    </properties>
  
 -                  </executions>
 -               </plugin>
 +            <build>
 +                <plugins>
  
 -            </plugins>
 -         </build>
 -      </profile>
 +                    <plugin>
 +                        <artifactId>maven-antrun-plugin</artifactId>
 +                        <executions>
 +
 +                            <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>
 +                                        <property name="dodeploy.file" location="${deployment.dir}.dodeploy" />
 +                                        <echo>*** Touching ${dodeploy.file} to force redeployment of ${rhq.deploymentName}</echo>
 +                                        <touch file="${dodeploy.file}" />
 +                                    </target>
 +                                </configuration>
 +                                <goals>
 +                                    <goal>run</goal>
 +                                </goals>
 +                            </execution>
 +
 +                            <execution>
 +                                <id>deploy-ear-meta-inf</id>
 +                                <phase>package</phase>
 +                                <configuration>
 +                                    <target>
 +                                        <unjar src="${project.build.directory}/${project.build.finalName}.ear"
 +                                               dest="${rhq.deploymentDir}">
 +                                            <patternset>
 +                                                <include name="META-INF/**" />
 +                                            </patternset>
 +                                        </unjar>
 +                                    </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}" />
 +                                        <property name="dodeploy.file" location="${deployment.dir}.dodeploy" />
 +                                        <delete file="${dodeploy.file}" />
 +                                    </target>
 +                                </configuration>
 +                                <goals>
 +                                    <goal>run</goal>
 +                                </goals>
 +                            </execution>
 +
 +                        </executions>
 +                    </plugin>
 +                </plugins>
 +            </build>
 +        </profile>
  
 -   </profiles>
 +    </profiles>
  
  </project>
  


commit b8a6a496d40915abb22fdd87753aec0c131ed95d
Author: Stefan Negrea <snegrea at redhat.com>
Date:   Fri Aug 24 10:21:20 2012 -0500

    [BZ 849964] Increase the operation timeout to 30 seconds to avoid cases where the host is under heavy load thus making all managed server operations take longer than the default 10 seconds.

diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
index d26f54e..e7fcd5b 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
@@ -271,7 +271,7 @@ public class ManagedASComponent extends BaseComponent<HostControllerComponent<?>
            }
         }
 
-        Result res = getASConnection().execute(op);
+        Result res = getASConnection().execute(op, 30);
 
         OperationResult opRes;
         if (res.isSuccess()) {


commit 97867e2b4b241fa5ea33d0f439b1026914def5be
Author: Jirka Kremser <jkremser at redhat.com>
Date:   Thu Aug 23 16:55:00 2012 +0200

    [BZ 851239 - Globally uncaught exception on clicking the link Bundles->Repositories->JBoss Patches] Defensive programming - check for null/empty list -> exception is not thrown

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
index 6eaa263..1f2f660 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
@@ -42,7 +42,11 @@ import org.rhq.core.domain.bundle.Bundle;
 import org.rhq.core.domain.criteria.BundleCriteria;
 import org.rhq.core.domain.tagging.Tag;
 import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.coregui.client.*;
+import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.ViewId;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
 import org.rhq.enterprise.gui.coregui.client.bundle.BundleTopView;
 import org.rhq.enterprise.gui.coregui.client.bundle.deploy.BundleDeployWizard;
 import org.rhq.enterprise.gui.coregui.client.bundle.deployment.BundleDeploymentView;
@@ -286,6 +290,11 @@ public class BundleView extends LocatableVLayout implements BookmarkableView {
                         }
 
                         public void onSuccess(PageList<Bundle> result) {
+                            if (result == null || result.isEmpty()) {
+                                CoreGUI.getMessageCenter().notify(
+                                    new Message(MSG.view_bundle_list_error4(), Message.Severity.Error));
+                                return;
+                            }
                             Bundle bundle = result.get(0);
                             viewBundle(bundle, viewPath.getCurrent());
                         }
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index cfa1f6d..9681ea1 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -413,10 +413,10 @@ filter_from_date = From
 filter_to_date = To
 group_tree_groupOfResourceType = Group of [{0}]
 group_tree_partialClusterTooltip = {0} out of {1} group members have a ''{2}'' resource
-search_invalid_search_expression = Invalid search expression.
-search_failed_to_save_search = Failed to Save Search: {0}
 search_failed_to_retrieve_saved_search = Failed to retrieve saved search
 search_failed_to_retrieve_search_suggestion = Failed to retrieve search suggestion
+search_failed_to_save_search = Failed to Save Search: {0}
+search_invalid_search_expression = Invalid search expression.
 search_name_your_search = name you search
 search_successfully_saved_search = Successfully Saved Search: {0}
 util_ancestry_parentAncestry = Parent Ancestry for:
@@ -1127,6 +1127,7 @@ view_bundle_list_destinationsCount = Destinations Count
 view_bundle_list_error1 = Failed to load bundle to deploy [{0}]
 view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]
 view_bundle_list_error3 = Failed to load bundle
+view_bundle_list_error4 = No bundles found in this repository
 view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]
 view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data
 view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]
@@ -1182,7 +1183,7 @@ view_configEdit_error_3 = Cannot add property named [{0}]. The property name is
 view_configEdit_files = Files
 view_configEdit_hideAll = Hide All
 view_configEdit_jumpToSection = Jump to Section
-view_configEdit_maxBoundsExceeded =  Cannot add another entry because the maximum size bounds has been met: {0}
+view_configEdit_maxBoundsExceeded = Cannot add another entry because the maximum size bounds has been met: {0}
 view_configEdit_minBoundsExceeded = Cannot delete this entry as the minimum has been set to: {0}
 view_configEdit_msg_1 = Added property [{0}] to the set.
 view_configEdit_msg_2 = Removed properties from the set.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index 5be0d57..b2a842d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -1146,6 +1146,7 @@ view_bundle_list_destinationsCount = Počet cílů
 view_bundle_list_error1 = Nepodařilo se načíst balík k nasazení [{0}]
 view_bundle_list_error2 = Nepodařilo se získat 1 balík k nasazení [{0}]
 view_bundle_list_error3 = Nepodařilo se získat balík
+view_bundle_list_error3 = V tomto repozitáři nejsou žádné balíky
 view_bundle_list_loadFailure = Nepodařilo se získat balík k nasazení [{0}]
 view_bundle_list_loadWithLatestFailure = Nepodařilo se získat balík s poslední verzí
 view_bundle_list_singleLoadFailure = Nepodařilo se získat 1 balík k nasazení [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index d39f16a..4fe89d0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -397,10 +397,10 @@ filter_from_date = Von
 filter_to_date = Bis
 ##group_tree_groupOfResourceType = Group of [{0}]
 group_tree_partialClusterTooltip = {0} der {1} Gruppenmitglieder haben eine ''{2}'' Ressource
-##search_invalid_search_expression = Invalid search expression.
-##search_failed_to_save_search = Failed to Save Search: {0}
 ##search_failed_to_retrieve_saved_search = Failed to retrieve saved search
 ##search_failed_to_retrieve_search_suggestion = Failed to retrieve search suggestion
+##search_failed_to_save_search = Failed to Save Search: {0}
+##search_invalid_search_expression = Invalid search expression.
 ##search_name_your_search = name you search
 ##search_successfully_saved_search = Successfully Saved Search: {0}
 util_disambiguationReportDecorator_pluginSuffix = ({0} Plugin)
@@ -1013,6 +1013,7 @@ view_bundle_list_destinationsCount = Anzahl Ziele
 ##view_bundle_list_error1 = Failed to load bundle to deploy [{0}]
 ##view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]
 view_bundle_list_error3 = Konnte das Bundle nicht laden
+##view_bundle_list_error4 = No bundles found in this repository
 ##view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]
 ##view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data
 ##view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]
@@ -1066,7 +1067,7 @@ view_configEdit_confirm_2 = Sind Sie sicher dass sie diese Zeile löschen wollen
 view_configEdit_files = Dateien
 view_configEdit_hideAll = Alle verbergen
 view_configEdit_jumpToSection = Zum Abschnitt springen
-##view_configEdit_maxBoundsExceeded =  Cannot add another entry because the maximum size bounds has been met: {0}
+##view_configEdit_maxBoundsExceeded = Cannot add another entry because the maximum size bounds has been met: {0}
 ##view_configEdit_minBoundsExceeded = Cannot delete this entry as the minimum has been set to: {0}
 view_configEdit_msg_1 = Eigentschaft [{0}] zur Menge hinzugefügt
 ##view_configEdit_msg_2 = Removed properties from the set.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6c2044a..e2e25e8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1123,6 +1123,7 @@ view_bundle_list_destinationsCount = 宛先数
 view_bundle_list_error1 = [{0}] をデプロイするためのバンドルのロードに失敗しました
 view_bundle_list_error2 = [{0}] をデプロイするための単一バンドルの取得に失敗しました
 view_bundle_list_error3 = バンドルのロードに失敗しました
+##view_bundle_list_error4 = No bundles found in this repository
 view_bundle_list_loadFailure = デプロイされるバンドル [{0}] のロードに失敗しました
 view_bundle_list_loadWithLatestFailure = 最新バージョンデータを持つバンドルのロードに失敗しました
 view_bundle_list_singleLoadFailure = デプロイされる単一バンドル [{0}] の取得に失敗しました
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 9f00c55..e3f044f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -416,10 +416,10 @@ favorites_resources = Recursos Favoritos
 ##filter_to_date = To
 ##group_tree_groupOfResourceType = Group of [{0}]
 group_tree_partialClusterTooltip = {0} out of {1} group members have a ''{2}'' resource
-##search_invalid_search_expression = Invalid search expression.
-##search_failed_to_save_search = Failed to Save Search: {0}
 ##search_failed_to_retrieve_saved_search = Failed to retrieve saved search
 ##search_failed_to_retrieve_search_suggestion = Failed to retrieve search suggestion
+##search_failed_to_save_search = Failed to Save Search: {0}
+##search_invalid_search_expression = Invalid search expression.
 ##search_name_your_search = name you search
 ##search_successfully_saved_search = Successfully Saved Search: {0}
 util_ancestry_parentAncestry = Ancestral para:
@@ -1133,6 +1133,7 @@ view_bundle_list_destinationsCount = Soma das Destina\u00E7\u00F5es
 view_bundle_list_error1 = Falha ao carregar bundle [{0}] para implantar
 view_bundle_list_error2 = Falha ao obter um \u00FAnico bundle [{0}] para deploy
 view_bundle_list_error3 = Falha ao carregar o bundle
+##view_bundle_list_error4 = No bundles found in this repository
 view_bundle_list_loadFailure = Falha ao carregar o bundle [{0}] para ser implantado
 view_bundle_list_loadWithLatestFailure = Falha ao carregar o bundle com os dados da \u00FAltima vers\u00E3o
 view_bundle_list_singleLoadFailure = Falha ao obter um \u00FAnico bundle [{0}] para ser implantado
@@ -1188,7 +1189,7 @@ view_configEdit_error_3 = N\u00E3o f\u00F3 poss\u00EDvel adicionar a propriedade
 view_configEdit_files = Arquivos
 view_configEdit_hideAll = Ocultar todos
 view_configEdit_jumpToSection = Ir direto para a Sele\u00E7\u00E3o
-##view_configEdit_maxBoundsExceeded =  Cannot add another entry because the maximum size bounds has been met: {0}
+##view_configEdit_maxBoundsExceeded = Cannot add another entry because the maximum size bounds has been met: {0}
 ##view_configEdit_minBoundsExceeded = Cannot delete this entry as the minimum has been set to: {0}
 view_configEdit_msg_1 = Propriedade [{0}]  adicionada ao conjunto.
 view_configEdit_msg_2 = Propriedades removidas do conjunto.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 25671e1..e27ce16 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2464,6 +2464,7 @@ view_admin_downloads_cli_version = Версия CLI
 ##view_admin_downloads_connectors_none = No connectors are available for download
 ##view_alert_details_field_resource_ancestry = Resource Ancestry
 ##view_alert_details_field_watched_resource = Watched Resource
+##view_bundle_list_error4 = No bundles found in this repository
 ##view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From] {0} [REVERT To] {1}
 ##view_configEdit_property = Property
 ##view_configEdit_unset = Unset?
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 827e01b..2de43cc 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -405,10 +405,10 @@ favorites_resources = \u8d44\u6e90\u6536\u85cf\u5939
 ##filter_to_date = To
 ##group_tree_groupOfResourceType = Group of [{0}]
 group_tree_partialClusterTooltip = \u9664\u53bb {1},{0}\u7684\u7ec4\u6210\u5458\u62e5\u6709 \u4e00\u4e2a''{2}''\u8d44\u6e90
-##search_invalid_search_expression = Invalid search expression.
-##search_failed_to_save_search = Failed to Save Search: {0}
 ##search_failed_to_retrieve_saved_search = Failed to retrieve saved search
 ##search_failed_to_retrieve_search_suggestion = Failed to retrieve search suggestion
+##search_failed_to_save_search = Failed to Save Search: {0}
+##search_invalid_search_expression = Invalid search expression.
 ##search_name_your_search = name you search
 ##search_successfully_saved_search = Successfully Saved Search: {0}
 util_ancestry_parentAncestry = Parent Ancestry for:
@@ -1117,6 +1117,7 @@ view_bundle_list_destinationsCount = \u76ee\u7684\u5730\u6570
 view_bundle_list_error1 = Failed to load bundle to deploy [{0}]
 view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]
 view_bundle_list_error3 = \u52a0\u8f7dbundle\u5931\u8d25
+##view_bundle_list_error4 = No bundles found in this repository
 view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]
 view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data
 view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]
@@ -1172,7 +1173,7 @@ view_configEdit_error_3 = \u65e0\u6cd5\u6dfb\u52a0\u540d\u4e3a[{0}]\u7684\u5c5e\
 view_configEdit_files = \u6587\u4ef6
 view_configEdit_hideAll = \u9690\u85cf\u6240\u6709
 view_configEdit_jumpToSection = \u8df3\u81f3\u6a21\u5757
-##view_configEdit_maxBoundsExceeded =  Cannot add another entry because the maximum size bounds has been met: {0}
+##view_configEdit_maxBoundsExceeded = Cannot add another entry because the maximum size bounds has been met: {0}
 ##view_configEdit_minBoundsExceeded = Cannot delete this entry as the minimum has been set to: {0}
 view_configEdit_msg_1 = \u589e\u52a0\u5c5e\u6027 [{0}]\u5230\u96c6\u5408.
 view_configEdit_msg_2 = \u79fb\u9664\u96c6\u5408\u5185\u6240\u6709\u7684\u5c5e\u6027.


commit 8fb35be5c92397b282a582c754c6b71b8b277a60
Author: Lukas Krejci <lkrejci at redhat.com>
Date:   Thu Aug 23 12:08:11 2012 +0200

    Duplicating all the tests that use scripting language to have both javascript and python versions.

diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 7d37053..37959d2 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -45,6 +45,13 @@
         </dependency>
         
         <dependency>
+           <groupId>${project.groupId}</groupId>
+           <artifactId>rhq-scripting-python</artifactId>
+           <version>${project.version}</version>
+           <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>rhq-core-domain</artifactId>
             <version>${project.version}</version>
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptEngineTest.java b/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptEngineTest.java
index c3d5450..cf93afb 100644
--- a/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptEngineTest.java
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptEngineTest.java
@@ -40,19 +40,24 @@ import org.rhq.bindings.util.PackageFinder;
  *
  * @author Lukas Krejci
  */
- at Test
-public class ScriptEngineTest {
+public class ScriptEngineTest extends ScriptedTestBase {
 
     private static StandardBindings EMPTY_BINDINGS = new StandardBindings(new PrintWriter(System.out), new FakeRhqFacade());
         
     @Test
-    public void testFactory() throws ScriptException, IOException {
+    public void testFactory_javascript() throws ScriptException, IOException {
         ScriptEngine engine = getScriptEngine();
         assertNotNull(engine);
     }
     
     @Test
-    public void testSandbox() throws ScriptException, IOException {
+    public void testFactory_python() throws ScriptException, IOException {
+        ScriptEngine engine = getScriptEngine();
+        assertNotNull(engine);
+    }
+    
+    @Test
+    public void testSandbox_javascript() throws ScriptException, IOException {
         ScriptEngine sandbox = getSecuredScriptEngine();
         
         try {
@@ -76,7 +81,44 @@ public class ScriptEngineTest {
     }
     
     @Test
-    public void testStandardBindings() throws ScriptException, IOException {
+    public void testSandbox_python() throws Exception {
+        ScriptEngine sandbox = getSecuredScriptEngine();
+        
+        try {
+            sandbox.eval("import java.lang as foo\nfoo.System.exit(1)");
+        } catch (Exception e) {
+            assertSecurityExceptionPresent(e);
+        }
+        
+        try {            
+            //try hard to get to the System.exit()
+            sandbox.eval(
+                "import java.lang as l\n" +
+                "import java.lang.reflect as r\n" +
+                "import java.beans as b\n" + 
+                "cls = l.Class.forName('java.lang.System')\n" +
+                "params = r.Array.newInstance(l.Class.forName('java.lang.Object'), 1)\n" +
+                "params[0] = l.Integer.valueOf('1')\n" +
+                "st = b.Statement(cls, 'exit', params)\n" +
+                "st.execute()");
+            
+        } catch (Exception e) {
+            assertSecurityExceptionPresent(e);
+        }
+    }
+    
+    @Test
+    public void testStandardBindings_javascript() throws ScriptException, IOException {
+        ScriptEngine scriptEngine = getScriptEngine();
+        
+        for(String var : EMPTY_BINDINGS.keySet()) {
+            boolean hasVar = scriptEngine.getBindings(ScriptContext.ENGINE_SCOPE).containsKey(var);
+            assertTrue(hasVar, "The variable '" + var + "' is not present in the script context but should be.");
+        }
+    }
+    
+    @Test
+    public void testStandardBindings_python() throws Exception {        
         ScriptEngine scriptEngine = getScriptEngine();
         
         for(String var : EMPTY_BINDINGS.keySet()) {
@@ -86,13 +128,11 @@ public class ScriptEngineTest {
     }
     
     private ScriptEngine getScriptEngine() throws ScriptException, IOException {
-        return ScriptEngineFactory.getScriptEngine("javascript", new PackageFinder(Collections.<File> emptyList()),
-            EMPTY_BINDINGS);
+        return getScriptEngine(new PackageFinder(Collections.<File> emptyList()), EMPTY_BINDINGS);
     }
     
     private ScriptEngine getSecuredScriptEngine() throws ScriptException, IOException {
-        return ScriptEngineFactory.getSecuredScriptEngine("javascript",
-            new PackageFinder(Collections.<File> emptyList()), EMPTY_BINDINGS, new StandardScriptPermissions());
+        return getSecuredScriptEngine(new PackageFinder(Collections.<File> emptyList()), EMPTY_BINDINGS, new StandardScriptPermissions());
     }
     
     private void assertSecurityExceptionPresent(Throwable t) {
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptedTestBase.java b/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptedTestBase.java
new file mode 100644
index 0000000..9bf09b5
--- /dev/null
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/ScriptedTestBase.java
@@ -0,0 +1,220 @@
+/*
+ * 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.bindings;
+
+import static org.testng.Assert.fail;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.security.PermissionCollection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+
+import org.testng.IHookCallBack;
+import org.testng.IHookable;
+import org.testng.ITestContext;
+import org.testng.ITestNGMethod;
+import org.testng.ITestResult;
+import org.testng.annotations.AfterClass;
+
+import org.rhq.bindings.util.PackageFinder;
+
+/**
+ * This is a base class for tests that need to test the some functionality using
+ * the scripting languages.
+ * <p>
+ * It enforces the naming convention for the tests:
+ * <code>
+ * @Test
+ * public void myTestMethod_language() ...
+ * </code>
+ * The language is to be replaced with the name of the scripting language that the test method
+ * uses (e.g. javacript, python). This class then makes sure that each test exists for all 
+ * the scripting languages that are present on the classpath.
+ * <p>
+ * This class also provides the {@link #getScriptEngine(PackageFinder, StandardBindings)} and
+ * {@link #getSecuredScriptEngine(PackageFinder, StandardBindings, PermissionCollection)} methods
+ * that, if invoked from within a test method call-chain, will return the script engine for the
+ * correct language under test (determined by the test method name suffix).
+ * 
+ * @author Lukas Krejci
+ */
+public abstract class ScriptedTestBase implements IHookable {
+
+    private String currentLanguage;
+
+    @AfterClass
+    public void checkTestImplsForEachLanguage(ITestContext ctx) {
+        Set<Method> methods = getAllTestMethods(getClass(), ctx);
+
+        Set<String> supportedLanguages = ScriptEngineFactory.getSupportedLanguages();
+
+        Map<String, Set<String>> methodBaseNamesByLanguage = new HashMap<String, Set<String>>();
+
+        for (String lang : supportedLanguages) {
+            methodBaseNamesByLanguage.put(lang, new HashSet<String>());
+        }
+
+        Set<Method> invalidTestMethods = new HashSet<Method>();
+
+        for (Method m : methods) {
+            //check that the method name ends with one of the supported language names  
+            boolean valid = false;
+            for (String lang : supportedLanguages) {
+                String suffix = "_" + lang;
+
+                if (!m.getName().endsWith(suffix)) {
+                    continue;
+                }
+
+                //now put the method "basename" into our mapping array
+                String baseName = m.getName().substring(0, m.getName().lastIndexOf("_"));
+                methodBaseNamesByLanguage.get(lang).add(baseName);
+
+                valid = true;
+                break;
+            }
+
+            if (!valid) {
+                invalidTestMethods.add(m);
+            }
+        }
+
+        Set<String> missingTests = new HashSet<String>();
+
+        //now check that all languages have all test methods
+        for (Map.Entry<String, Set<String>> a : methodBaseNamesByLanguage.entrySet()) {
+            for (Map.Entry<String, Set<String>> b : methodBaseNamesByLanguage.entrySet()) {
+                String alang = a.getKey();
+                String blang = b.getKey();
+                Set<String> amethods = a.getValue();
+                Set<String> bmethods = b.getValue();
+
+                if (alang.equals(blang)) {
+                    continue;
+                }
+
+                addMissing(amethods, bmethods, alang, missingTests);
+                addMissing(bmethods, amethods, blang, missingTests);
+            }
+        }
+
+        if (!invalidTestMethods.isEmpty() || !missingTests.isEmpty()) {
+            StringBuilder msg = new StringBuilder("Scripted test " + getClass() + " is invalid:\n");
+
+            if (!invalidTestMethods.isEmpty()) {
+                msg.append("Invalid method names:\n");
+                for (Method m : invalidTestMethods) {
+                    msg.append(m.getName()).append("\n");
+                }
+            }
+
+            if (!missingTests.isEmpty()) {
+                msg.append("\nMissing tests for languages:\n");
+                for (String m : missingTests) {
+                    msg.append(m).append("\n");
+                }
+            }
+
+            fail(msg.toString());
+        }
+    }
+
+    @Override
+    public final void run(IHookCallBack callBack, ITestResult testResult) {
+        String methodName = testResult.getMethod().getMethodName();
+        int underScoreIdx = methodName.lastIndexOf('_');
+        if (underScoreIdx >= 0 && underScoreIdx < methodName.length() - 1) {
+            currentLanguage = methodName.substring(underScoreIdx + 1);
+        } else {
+            currentLanguage = null;
+        }
+        
+        callBack.runTestMethod(testResult);
+        
+        currentLanguage = null;
+    }
+
+    /**
+     * Returns a new script engine implementation for the current test method.
+     * <p>
+     * The script engine implementation is determined based on the test method's name
+     * suffix.
+     * <p>
+     * E.g. if the test method ends with "_javascript", this method will return the javascript
+     * script engine.
+     * <p>
+     * This method is calling {@link ScriptEngineFactory#getScriptEngine(String, PackageFinder, StandardBindings)}
+     * but determines the "language" parameter for you.
+     * 
+     * @param packageFinder the package finder to use for the script engine initialization
+     * @param bindings the bindings to use in the script engine
+     * @return the script engine
+     * @throws ScriptException
+     * @throws IOException
+     */
+    protected ScriptEngine getScriptEngine(PackageFinder packageFinder, StandardBindings bindings)
+        throws ScriptException, IOException {
+
+        return ScriptEngineFactory.getScriptEngine(currentLanguage, packageFinder, bindings);
+    }
+
+    /**
+     * Similar to {@link #getScriptEngine(PackageFinder, StandardBindings)} but returns the 
+     * secured version of the script engine.
+     *  
+     * @param packageFinder the package finder to use for the script engine initialization
+     * @param bindings the bindings to use in the script engine
+     * @param perms the permissions to run the scripts with
+     * @return the script engine
+     * @throws ScriptException
+     * @throws IOException
+     */
+    protected ScriptEngine getSecuredScriptEngine(PackageFinder packageFinder, StandardBindings bindings,
+        PermissionCollection perms) throws ScriptException, IOException {
+
+        return ScriptEngineFactory.getSecuredScriptEngine(currentLanguage, packageFinder, bindings, perms);
+    }
+
+    private static Set<Method> getAllTestMethods(Class<?> cls, ITestContext ctx) {
+        HashSet<Method> ret = new HashSet<Method>();
+        for (ITestNGMethod m : ctx.getAllTestMethods()) {
+            if (m.getTestClass().getRealClass().equals(cls)) {
+                ret.add(m.getConstructorOrMethod().getMethod());
+            }
+        }
+
+        return ret;
+    }
+
+    private static void addMissing(Set<String> methods, Set<String> referenceMethods, String lang, Set<String> missing) {
+        for (String m : referenceMethods) {
+            if (!methods.contains(m)) {
+                String fullName = m + "_" + lang;
+                missing.add(fullName);
+            }
+        }
+    }
+}
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java b/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
index 1d7f657..97753e3 100644
--- a/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
@@ -26,118 +26,247 @@ package org.rhq.bindings.util;
 import static org.testng.Assert.fail;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.Collections;
 
 import javax.script.ScriptEngine;
 import javax.script.ScriptException;
 
-import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
 import org.rhq.bindings.FakeRhqFacade;
-import org.rhq.bindings.ScriptEngineFactory;
+import org.rhq.bindings.ScriptedTestBase;
 import org.rhq.bindings.StandardBindings;
 
-public class ScriptAssertTest {
+public class ScriptAssertTest extends ScriptedTestBase {
 
-    private ScriptEngine engine;
+    private ScriptEngine getScriptEngine() {
+        try {
+            return getScriptEngine(new PackageFinder(Collections.<File> emptyList()), new StandardBindings(
+                new PrintWriter(System.out), new FakeRhqFacade()));
+        } catch (ScriptException e) {
+            fail("Could not get the script engine.", e);
+            return null;
+        } catch (IOException e) {
+            fail("Could not get the script engine.", e);
+            return null;
+        }
+    }
 
-    @BeforeTest
-    public void verifyScriptEngineIsAvailable() throws Exception {
-        StandardBindings bindings = new StandardBindings(new PrintWriter(System.out), new FakeRhqFacade());
-        engine = ScriptEngineFactory.getScriptEngine("javascript", new PackageFinder(Collections.<File> emptyList()),
-                bindings);
+    @Test
+    public void testAssertExists_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "var a = 1; assertExists('a');", "assertExists should succeed for a defined variable.");
+        testThrowsAssertion(engine, "assertExists('foo')", "assertExists should fail for an undefined variable.");
+        testWorks(engine, "function func() { return 42 }; assertExists('func');",
+            "assertExists should succeed for a defined function.");
     }
 
     @Test
-    public void testAssertExists() {
-        testWorks("var a = 1; assertExists('a');", "assertExists should succeed for a defined variable.");
-        testThrowsAssertion("assertExists('foo')", "assertExists should fail for an undefined variable.");
-        testWorks("function func() { return 42 }; assertExists('func');",
+    public void testAssertExists_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "a = 1\n" + "assertExists('a')", "assertExists should succeed for a defined variable.");
+        testThrowsAssertion(engine, "assertExists('foo')", "assertExists should fail for an undefined variable.");
+        testWorks(engine, "def func():\n" + " return 42\n" + "assertExists('func')",
             "assertExists should succeed for a defined function.");
     }
 
     @Test
-    public void testAssertTrue() {
-        testWorks("var a = true; assertTrue(a);", "assertTrue of a true variable should succeed");
-        testWorks("assertTrue(1 == 1)", "assertTrue on a true boolean expression should succeed");
-        testThrowsAssertion("var a = false; assertTrue(a)", "assertTrue should fail on a false variable");
-        testThrowsAssertion("assertTrue(1 == 2)", "assertTrue should fail on a false boolean expression");
+    public void testAssertTrue_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "var a = true; assertTrue(a);", "assertTrue of a true variable should succeed");
+        testWorks(engine, "assertTrue(1 == 1)", "assertTrue on a true boolean expression should succeed");
+        testThrowsAssertion(engine, "var a = false; assertTrue(a)", "assertTrue should fail on a false variable");
+        testThrowsAssertion(engine, "assertTrue(1 == 2)", "assertTrue should fail on a false boolean expression");
+    }
+
+    @Test
+    public void testAssertTrue_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "a = True\n" + "assertTrue(a)", "assertTrue of a true variable should succeed");
+        testWorks(engine, "assertTrue(1 == 1)", "assertTrue on a true boolean expression should succeed");
+        testThrowsAssertion(engine, "a = False\n" + "assertTrue(a)", "assertTrue should fail on a false variable");
+        testThrowsAssertion(engine, "assertTrue(1 == 2)", "assertTrue should fail on a false boolean expression");
+    }
+
+    @Test
+    public void testAssertFalse_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "var a = false; assertFalse(a)", "assertFalse of a false variable should succeed");
+        testWorks(engine, "assertFalse(1 == 2)", "assertFalse on a false boolean expression should succeed");
+        testThrowsAssertion(engine, "var a = true; assertFalse(a)", "assertFalse should fail on a true variable");
+        testThrowsAssertion(engine, "assertFalse(1 == 1)", "assertFalse should fail on a true boolean expression");
     }
-    
+
     @Test
-    public void testAssertFalse() {
-        testWorks("var a = false; assertFalse(a);", "assertFalse of a false variable should succeed");
-        testWorks("assertFalse(1 == 2)", "assertFalse on a false boolean expression should succeed");
-        testThrowsAssertion("var a = true; assertFalse(a)", "assertFalse should fail on a true variable");
-        testThrowsAssertion("assertFalse(1 == 1)", "assertFalse should fail on a true boolean expression");
+    public void testAssertFalse_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "a = False\n" + "assertFalse(a)", "assertFalse of a false variable should succeed");
+        testWorks(engine, "assertFalse(1 == 2)", "assertFalse on a false boolean expression should succeed");
+        testThrowsAssertion(engine, "a = True\n" + "assertFalse(a)", "assertFalse should fail on a true variable");
+        testThrowsAssertion(engine, "assertFalse(1 == 1)", "assertFalse should fail on a true boolean expression");
     }
-    
+
     @Test
-    public void testAssertNull() {
-        testWorks("assertNull(foo)", "assertNull should succeed on an undefined variable");
-        testWorks("var foo = null; assertNull(foo);", "assertNull should succeed on a null variable");
-        testWorks("assertNull(null)", "assertNull should succeed on a null literal");
-        testThrowsAssertion("assertNull(1)", "assertNull should fail on a number");
-        testThrowsAssertion("var foo = '1'; assertNull(foo)", "assertNull should fail on a non-null variable");
+    public void testAssertNull_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "var foo = null; assertNull(foo);", "assertNull should succeed on a null variable");
+        testWorks(engine, "assertNull(null)", "assertNull should succeed on a null literal");
+        testThrowsAssertion(engine, "assertNull(1)", "assertNull should fail on a number");
+        testThrowsAssertion(engine, "var foo = '1'; assertNull(foo)", "assertNull should fail on a non-null variable");
     }
-    
+
     @Test
-    public void testAssertNotNull() {
-        testWorks("assertNotNull(1)", "assertNotNull should succeed on a number");
-        testWorks("var foo = '1'; assertNotNull(foo)", "assertNotNull should succeed on a non-null variable");
-        testThrowsAssertion("assertNotNull(foo)", "assertNotNull should fail on an undefined variable");
-        testThrowsAssertion("var foo = null; assertNotNull(foo);", "assertNotNull should fail on a null variable");
-        testThrowsAssertion("assertNotNull(null)", "assertNotNull should fail on a null literal");
+    public void testAssertNull_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "foo = None\n" + "assertNull(foo)", "assertNull should succeed on a null variable");
+        testWorks(engine, "assertNull(None)", "assertNull should succeed on a null literal");
+        testThrowsAssertion(engine, "assertNull(1)", "assertNull should fail on a number");
+        testThrowsAssertion(engine, "foo = '1'\n" + "assertNull(foo)", "assertNull should fail on a non-null variable");
     }
-    
+
     @Test
-    public void testAssertEquals_Numbers() {
-        testWorks("assertEquals(1, 1)", "1 == 1");
-        testWorks("assertEquals(1.0, 1)", "1.0 == 1");
-        testWorks("assertEquals(1.0, 1.0)", "1.0 == 1.0");
-        testThrowsAssertion("assertEquals(1, 2)", "1 == 2");
+    public void testAssertNotNull_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertNotNull(1)", "assertNotNull should succeed on a number");
+        testWorks(engine, "var foo = '1'; assertNotNull(foo)", "assertNotNull should succeed on a non-null variable");
+        testThrowsAssertion(engine, "assertNotNull(foo)", "assertNotNull should fail on an undefined variable");
+        testThrowsAssertion(engine, "var foo = null; assertNotNull(foo);",
+            "assertNotNull should fail on a null variable");
+        testThrowsAssertion(engine, "assertNotNull(null)", "assertNotNull should fail on a null literal");
     }
-    
+
     @Test
-    public void testAssertEquals_Arrays() {
-        testWorks("assertEquals(['a', 'b'], ['a', 'b'])", "native array comparison");
-        testThrowsAssertion("assertEquals(['a', 'b'], ['c', 'd'])", "native array comparison with difference");
+    public void testAssertNotNull_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertNotNull(1)", "assertNotNull should succeed on a number");
+        testWorks(engine, "foo = '1'\n" + "assertNotNull(foo)", "assertNotNull should succeed on a non-null variable");
+        testThrowsAssertion(engine, "assertNotNull(foo)", "assertNotNull should fail on an undefined variable");
+        testThrowsAssertion(engine, "foo = None\n" + "assertNotNull(foo);",
+            "assertNotNull should fail on a null variable");
+        testThrowsAssertion(engine, "assertNotNull(None)", "assertNotNull should fail on a null literal");
     }
 
     @Test
-    public void testAssertEquals_Collections() {
-        testWorks("a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); " + "b.add('a'); "
-            + "assertEquals(a, b)", "ArrayList comparison");
-        testThrowsAssertion("a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); "
+    public void testAssertEquals_Numbers_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEquals(1, 1)", "1 == 1");
+        testWorks(engine, "assertEquals(1.0, 1)", "1.0 == 1");
+        testWorks(engine, "assertEquals(1.0, 1.0)", "1.0 == 1.0");
+        testThrowsAssertion(engine, "assertEquals(1, 2)", "1 == 2");
+    }
+
+    @Test
+    public void testAssertEquals_Numbers_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEquals(1, 1)", "1 == 1");
+        //Python distinguishes between ints and floats, so this
+        //won't work (even though "1.0 == 1" returns true in pure python)
+        //testWorks(engine, "assertEquals(1.0, 1)", "1.0 == 1");
+        testWorks(engine, "assertEquals(1.0, 1.0)", "1.0 == 1.0");
+        testThrowsAssertion(engine, "assertEquals(1, 2)", "1 == 2");
+    }
+
+    @Test
+    public void testAssertEquals_Arrays_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEquals(['a', 'b'], ['a', 'b'])", "native array comparison");
+        testThrowsAssertion(engine, "assertEquals(['a', 'b'], ['c', 'd'])", "native array comparison with difference");
+    }
+
+    @Test
+    public void testAssertEquals_Arrays_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEquals(['a', 'b'], ['a', 'b'])", "native array comparison");
+        testThrowsAssertion(engine, "assertEquals(['a', 'b'], ['c', 'd'])", "native array comparison with difference");
+    }
+
+    @Test
+    public void testAssertEquals_Collections_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); "
+            + "b.add('a'); " + "assertEquals(a, b)", "ArrayList comparison");
+        testThrowsAssertion(engine, "a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); "
             + "b.add('b'); " + "assertEquals(a, b)", "ArrayList comparison with difference");
     }
 
     @Test
-    public void testAssertEqualsNoOrder() {
-        testWorks("assertEqualsNoOrder(['a', 'b'], ['b', 'a'])", "native array comparison");
+    public void testAssertEquals_Collections_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "import java.util as u\n" + "a = u.ArrayList()\n" + "b = u.ArrayList()\n" + "a.add('a')\n"
+            + "b.add('a')\n" + "assertEquals(a, b)", "ArrayList comparison");
+        testThrowsAssertion(engine, "import java.util as u\n" + "a = u.ArrayList()\n" + "b = u.ArrayList()\n" + "a.add('a')\n"
+            + "b.add('b')\n" + "assertEquals(a, b)", "ArrayList comparison with difference");
     }
 
     @Test
-    public void testAssertSame() {
-        testWorks("var a = '1'; assertSame(a, a)", "assertSame should succeed comparing one variable");
-        testWorks("var a = '1'; b = a; assertSame(a, b)", "asserSame should succeed comparing 2 references of the same object");
-        testWorks("assertSame(null, null);", "assertSame should succeed on null values");
-        testThrowsAssertion("var a = '1'; b = '2'; assertSame(a, b)", "assertSame should fail comparing 2 different variables");
-        testThrowsAssertion("var a = 1; assertSame(a, null)", "assertSame should fail comparing non-null variable with a null value");
+    public void testAssertEqualsNoOrder_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEqualsNoOrder(['a', 'b'], ['b', 'a'])", "native array comparison");
     }
-    
+
+    @Test
+    public void testAssertEqualsNoOrder_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "assertEqualsNoOrder(['a', 'b'], ['b', 'a'])", "native array comparison");
+    }
+
     @Test
-    public void testAssertNotSame() {
-        testThrowsAssertion("var a = '1'; assertNotSame(a, a)", "assertNotSame should fail comparing one variable");
-        testThrowsAssertion("var a = '1'; b = a; assertNotSame(a, b)", "asserNotSame should fail comparing 2 references of the same object");
-        testThrowsAssertion("assertNotSame(null, null);", "assertNotSame should fail on null values");
-        testWorks("var a = '1'; b = '2'; assertNotSame(a, b)", "assertNotSame should succeed comparing 2 different variables");
-        testWorks("var a = 1; assertNotSame(a, null)", "assertNotSame should succeed comparing non-null variable with a null value");
+    public void testAssertSame_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "var a = '1'; assertSame(a, a)", "assertSame should succeed comparing one variable");
+        testWorks(engine, "var a = '1'; b = a; assertSame(a, b)",
+            "asserSame should succeed comparing 2 references of the same object");
+        testWorks(engine, "assertSame(null, null);", "assertSame should succeed on null values");
+        testThrowsAssertion(engine, "var a = '1'; b = '2'; assertSame(a, b)",
+            "assertSame should fail comparing 2 different variables");
+        testThrowsAssertion(engine, "var a = 1; assertSame(a, null)",
+            "assertSame should fail comparing non-null variable with a null value");
     }
-    
-    private void testWorks(String script, String message) {
+
+    @Test
+    public void testAssertSame_python() {
+        ScriptEngine engine = getScriptEngine();
+        testWorks(engine, "a = '1'\n" + "assertSame(a, a)", "assertSame should succeed comparing one variable");
+        testWorks(engine, "a = '1'\n" + "b = a\n" + "assertSame(a, b)",
+            "asserSame should succeed comparing 2 references of the same object");
+        testWorks(engine, "assertSame(None, None)", "assertSame should succeed on null values");
+        testThrowsAssertion(engine, "a = '1'\n" + "b = '2'\n" + "assertSame(a, b)",
+            "assertSame should fail comparing 2 different variables");
+        testThrowsAssertion(engine, "a = 1\n" + "assertSame(a, None)",
+            "assertSame should fail comparing non-null variable with a null value");
+    }
+
+    @Test
+    public void testAssertNotSame_javascript() {
+        ScriptEngine engine = getScriptEngine();
+        testThrowsAssertion(engine, "var a = '1'; assertNotSame(a, a)",
+            "assertNotSame should fail comparing one variable");
+        testThrowsAssertion(engine, "var a = '1'; b = a; assertNotSame(a, b)",
+            "asserNotSame should fail comparing 2 references of the same object");
+        testThrowsAssertion(engine, "assertNotSame(null, null);", "assertNotSame should fail on null values");
+        testWorks(engine, "var a = '1'; b = '2'; assertNotSame(a, b)",
+            "assertNotSame should succeed comparing 2 different variables");
+        testWorks(engine, "var a = 1; assertNotSame(a, null)",
+            "assertNotSame should succeed comparing non-null variable with a null value");
+    }
+
+    @Test
+    public void testAssertNotSame_python() {
+        ScriptEngine engine = getScriptEngine();
+        testThrowsAssertion(engine, "a = '1'\n" + "assertNotSame(a, a)",
+            "assertNotSame should fail comparing one variable");
+        testThrowsAssertion(engine, "a = '1'\n" + "b = a\n" + "assertNotSame(a, b)",
+            "asserNotSame should fail comparing 2 references of the same object");
+        testThrowsAssertion(engine, "assertNotSame(None, None)", "assertNotSame should fail on null values");
+        testWorks(engine, "a = '1'\n" + "b = '2'\n" + "assertNotSame(a, b)",
+            "assertNotSame should succeed comparing 2 different variables");
+        testWorks(engine, "a = 1\n" + "assertNotSame(a, None)",
+            "assertNotSame should succeed comparing non-null variable with a null value");
+    }
+
+    private void testWorks(ScriptEngine engine, String script, String message) {
         try {
             engine.eval(script);
         } catch (ScriptException e) {
@@ -145,7 +274,7 @@ public class ScriptAssertTest {
         }
     }
 
-    private void testThrowsAssertion(String script, String message) {
+    private void testThrowsAssertion(ScriptEngine engine, String script, String message) {
         try {
             engine.eval(script);
         } catch (ScriptException e) {


commit e21a7eb14096c4b23b638ff9028eb04857710e64
Author: John Sanda <jsanda at Johns-MacBook-Pro.local>
Date:   Wed Aug 22 15:22:43 2012 -0400

    [BZ 802796] Do not report entire stack trace for display in UI
    
    After some discussion it has been decied to *not* display the entire stack trace in the
    resource creation error message. Instead we will display the new, detailed error message
    along with the more brief exception message that reports the plugin component method in
    which the time out occurred. The full stack trace can still however be obtained from the
    agent logs with DEBUG logging enabled.

diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
index b3c65bd..8d34e9f 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/CreateResourceRunner.java
@@ -163,8 +163,15 @@ public class CreateResourceRunner implements Callable, Runnable {
             status = CreateResourceStatus.TIMED_OUT;
             errorMessage = "The time out has been exceeded; however, the deployment may have been successful. You " +
                 "may want to run a discovery scan to see if the deployment did complete successfully. Also consider " +
-                "using a higher time out value for future deployments.\n\nRoot Cause:\n";
-            errorMessage += ThrowableUtil.getStackAsString(e);
+                "using a higher time out value for future deployments.";
+
+            if (log.isDebugEnabled()) {
+                log.debug("Failed to create resource for " + report + ". " + errorMessage, e);
+            } else {
+                log.info("Failed to create resource for " + report + ". " + errorMessage, e);
+            }
+
+            errorMessage += "\n\nRoot Cause:\n" + e.getMessage();
         } catch (Throwable t) {
             status = CreateResourceStatus.FAILURE;
             errorMessage = ThrowableUtil.getStackAsString(t);


commit 5ffd6e1eb155bf0208690cce526fb18b832ba344
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Tue Aug 21 16:04:42 2012 -0400

    Make drift def sync more efficient, and possibly avoid an NPE that was
    seen intermittently.
    - DriftServerServiceImpl.getDriftDefinitions() now only generates
      Map entries for resources with drift definitions, avoiding unnecessary
      list creation and subsequent processing.
    - Added jdoc to that effect
    - Changed private DriftSyncManager.syncConfigs() to syncDriftDefinitions
      for clarity.

diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/drift/DriftServerService.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/drift/DriftServerService.java
index a6df831..1b2d048 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/drift/DriftServerService.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/drift/DriftServerService.java
@@ -121,6 +121,11 @@ public interface DriftServerService {
     @Asynchronous
     void repeatChangeSet(int resourceId, String driftDefName, int version);
 
+    /**
+     * @param resourceIds The resourceIds for which to fetch definitions.
+     * @return A Map from resourceId to its list of DriftDefinitions.  Resources without DriftDefinitions are not included
+     * in the Map.
+     */
     Map<Integer, List<DriftDefinition>> getDriftDefinitions(Set<Integer> resourceIds);
 
     DriftSnapshot getCurrentSnapshot(int driftDefinitionId);
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/sync/DriftSyncManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/sync/DriftSyncManager.java
index b24849b..5f4ec36 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/sync/DriftSyncManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/sync/DriftSyncManager.java
@@ -111,11 +111,11 @@ public class DriftSyncManager {
             synchronizer = synchronizerFactory.getRuntimeSynchronizer(driftMgr);
         }
 
-        syncConfigs(synchronizer, resourceIds);
+        syncDriftDefinitions(synchronizer, resourceIds);
         syncContent(synchronizer);
     }
 
-    private void syncConfigs(DriftSynchronizer synchronizer, Set<Integer> resourceIds) {
+    private void syncDriftDefinitions(DriftSynchronizer synchronizer, Set<Integer> resourceIds) {
         log.info("Starting server sync for drift definitions...");
         long startTime = System.currentTimeMillis();
 
@@ -127,15 +127,15 @@ public class DriftSyncManager {
         int totalAdded = 0;
 
         for (Integer resourceId : driftDefs.keySet()) {
-            Set<DriftDefinition> resourceConfigsOnServer = new TreeSet<DriftDefinition>(comparator);
-            resourceConfigsOnServer.addAll(driftDefs.get(resourceId));
+            Set<DriftDefinition> driftDefinitionsOnServer = new TreeSet<DriftDefinition>(comparator);
+            driftDefinitionsOnServer.addAll(driftDefs.get(resourceId));
 
             List<DriftDefinition> deletedDefs = synchronizer.getDeletedDefinitions(resourceId,
-                resourceConfigsOnServer);
+                driftDefinitionsOnServer);
             totalDeleted += deletedDefs.size();
             synchronizer.purgeFromLocalInventory(resourceId, deletedDefs);
 
-            List<DriftDefinition> addedDefs = synchronizer.getAddedDefinitions(resourceId, resourceConfigsOnServer);
+            List<DriftDefinition> addedDefs = synchronizer.getAddedDefinitions(resourceId, driftDefinitionsOnServer);
             totalAdded += addedDefs.size();
             synchronizer.addToLocalInventory(resourceId, addedDefs);
         }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerServiceImpl.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerServiceImpl.java
index b22caa7..b206b54 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerServiceImpl.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerServiceImpl.java
@@ -84,17 +84,19 @@ public class DriftServerServiceImpl implements DriftServerService {
         Subject overlord = getSubjectManager().getOverlord();
         PageList<DriftDefinition> definitions = getDriftManager().findDriftDefinitionsByCriteria(overlord, criteria);
 
-        Map<Integer, List<DriftDefinition>> map = new HashMap<Integer, List<DriftDefinition>>();
-        for (Integer resourceId : resourceIds) {
-            map.put(resourceId, new ArrayList<DriftDefinition>());
-        }
-        for (DriftDefinition c : definitions) {
-            List<DriftDefinition> list = map.get(c.getResource().getId());
-            list.add(c);
-            map.put(c.getResource().getId(), list);
+        Map<Integer, List<DriftDefinition>> result = new HashMap<Integer, List<DriftDefinition>>();
+
+        for (DriftDefinition driftDef : definitions) {
+            Integer resourceId = driftDef.getResource().getId();
+            List<DriftDefinition> list = result.get(resourceId);
+            if (null == list) {
+                list = new ArrayList<DriftDefinition>();
+                result.put(resourceId, list);
+            }
+            list.add(driftDef);
         }
 
-        return map;
+        return result;
     }
 
     @Override


commit 1b9503fa343a8ae8add7a65757a7e21a96186a5b
Author: John Sanda <jsanda at redhat.com>
Date:   Tue Aug 21 14:03:14 2012 -0400

    Delete any old copy of AS 7 zip file to force download

diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index a640c0541..ecd2295 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -303,6 +303,7 @@
                     </condition>
                     <property name="as7.zipfile"
                               location="${java.io.tmpdir}/jboss-${as7.product}-${as7.version}.zip"/>
+                    <delete file="${as7.zipfile}"/>
                     <get src="${as7.url}" dest="${as7.zipfile}" usetimestamp="true" verbose="true"/>
                     <unzip src="${as7.zipfile}" dest="${java.io.tmpdir}"/>
                     <delete dir="${jboss7.home}" verbose="true"/>


commit d5ddeaababea5b8ba7573d4dc752c1636ae52f65
Author: Mike Thompson <mithomps at redhat.com>
Date:   Tue Aug 21 09:38:38 2012 -0700

    Remove Opera browser support from GWT compile. Will speed up compile times from elimination of 7 language permutations.

diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index a4b08b0..82292eb 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -43,17 +43,15 @@
 
            ie9: IE9 (although for smartgwt we fallback to IE8)
            ie8: IE8
-           gecko: FF1 (NOTE: Support for this was dropped in GWT 2.1.)
            gecko1_8: FF2 and later
            safari: Safari/Chrome
-           opera: Opera
 
          *NOTE*: Since we specify the meta "X-UA-Compatible: IE=IE8" HTTP header in CoreGUI.html, IE9 and later
                  will emulate IE8.
          Multiple agents can be specified as a comma-delimited list, as demonstrated by the default
          value below.
         -->
-    <gwt.userAgent>ie8,ie9,gecko1_8,safari,opera</gwt.userAgent>
+    <gwt.userAgent>ie8,ie9,gecko1_8,safari</gwt.userAgent>
 
         <!-- Change this to "true" via the mvn command line or your ~/.m2/settings.xml to speed
              up gwt compilation. -->
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index c5c4391..f797482 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -11,11 +11,6 @@
     <inherits name='com.smartgwt.SmartGwt' />
     <inherits name="com.smartgwt.tools.SmartGwtTools"/>
 
-    <!-- TODO: Consider uncommenting this instead of enabling compression in Tomcat's server.xml once we upgrade to GWT
-               2.1 or later. -->
-    <!-- precompress .html, .js, and .css files -->
-    <!--<inherits name="com.google.gwt.precompress.Precompress"/>-->
-
 
     <inherits name='ca.nanometrics.gflot.GFlot'/>
 
@@ -66,7 +61,6 @@
            ie9: IE9 (new support for IE9 with GWT 2.3.0+)
            gecko1_8: FF2 and later
            safari: Safari/Chrome
-           opera: Opera
 
          *NOTE*: Since we specify the meta "X-UA-Compatible: IE=IE8" HTTP header in CoreGUI.html, IE9 and later
                  will emulate IE8 (although the gwt IE9 js libs will still get loaded).


commit 963a082f73dd9cc4656998029bac99317b648424
Author: Jirka Kremser <jkremser at redhat.com>
Date:   Tue Aug 21 15:21:55 2012 +0200

    [BZ 818083 - [IE 8.0] GUI components not aligned properly on monitoring tab] Added invisible form item on the right side

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java
index 8bad3dd..9b39faa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java
@@ -24,10 +24,12 @@ import java.util.Date;
 import java.util.LinkedHashMap;
 import java.util.List;
 
+import com.smartgwt.client.types.Alignment;
 import com.smartgwt.client.widgets.form.fields.ButtonItem;
 import com.smartgwt.client.widgets.form.fields.CheckboxItem;
 import com.smartgwt.client.widgets.form.fields.DateTimeItem;
 import com.smartgwt.client.widgets.form.fields.SelectItem;
+import com.smartgwt.client.widgets.form.fields.SpacerItem;
 import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
 import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
 import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
@@ -62,6 +64,7 @@ public abstract class AbstractMeasurementRangeEditor extends LocatableDynamicFor
     private boolean displayEnableButton = false;
     private boolean displayRangeItemGrouping = false;
     protected CheckboxItem enableRangeItem;
+    private SpacerItem space;
 
     private ButtonItem setButton;
     public static String ENABLE_RANGE_ITEM = "ENABLE_RANGE_ITEM";
@@ -83,8 +86,9 @@ public abstract class AbstractMeasurementRangeEditor extends LocatableDynamicFor
 
     public AbstractMeasurementRangeEditor(String locatorId) {
         super(locatorId);
-        setNumCols(12);
+        setNumCols(10);
         setWrapItemTitles(false);
+        setAlign(Alignment.LEFT);
     }
 
     /**
@@ -106,7 +110,6 @@ public abstract class AbstractMeasurementRangeEditor extends LocatableDynamicFor
             setGroupTitle("Filter by: Time");
         }
         enableRangeItem = new CheckboxItem(ENABLE_RANGE_ITEM, "");
-        enableRangeItem.setStartRow(true);
         enableRangeItem.setShowTitle(false);
         enableRangeItem.setShowLabel(false);
         enableRangeItem.addChangeHandler(new ChangeHandler() {
@@ -119,35 +122,24 @@ public abstract class AbstractMeasurementRangeEditor extends LocatableDynamicFor
 
         //combobox of last items
         simpleLastValuesItem = new SelectItem(SIMPLE_VALUE_ITEM, MSG.view_measureRange_last());
-        simpleLastValuesItem.setStartRow(false);
-        simpleLastValuesItem.setEndRow(false);
         simpleLastValuesItem.setValueMap(lastValues);
-        simpleLastValuesItem.setWidth("*");
-        simpleLastValuesItem.setRedrawOnChange(true);
+        simpleLastValuesItem.setTitleAlign(Alignment.LEFT);
 
         //combobox of units of time
         simpleLastUnitsItem = new SelectItem(SIMPLE_UNIT_ITEM);
-        simpleLastUnitsItem.setStartRow(false);
-        simpleLastUnitsItem.setEndRow(false);
         simpleLastUnitsItem.setValueMap(lastUnits);
         simpleLastUnitsItem.setShowTitle(false);
-        simpleLastUnitsItem.setWidth("*");
-        simpleLastUnitsItem.setRedrawOnChange(true);
 
         //time range start from
         advancedStartItem = new DateTimeItem(ADVANCED_START_ITEM, MSG.view_measureRange_start());
-        advancedStartItem.setStartRow(false);
-        advancedStartItem.setEndRow(false);
+        advancedStartItem.setTitleAlign(Alignment.LEFT);
 
         //time range end
         advancedEndItem = new DateTimeItem(ADVANCED_END_ITEM, MSG.common_title_end());
-        advancedEndItem.setStartRow(false);
-        advancedEndItem.setEndRow(false);
 
         setButton = new ButtonItem(SET_ITEM, MSG.common_button_set());
         setButton.setStartRow(false);
         setButton.setEndRow(false);
-        setButton.setShowTitle(false);
         setButton.addClickHandler(new ClickHandler() {
             @Override
             public void onClick(ClickEvent event) {
@@ -167,30 +159,31 @@ public abstract class AbstractMeasurementRangeEditor extends LocatableDynamicFor
         advancedSimpleButton = new ButtonItem(ADVANCED_BUTTON_ITEM, MSG.common_button_advanced());
         advancedSimpleButton.setStartRow(false);
         advancedSimpleButton.setEndRow(false);
-        advancedSimpleButton.setShowTitle(false);
         advancedSimpleButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent clickEvent) {
                 advanced = !advanced;
                 update();
             }
         });
+        
+        space = new SpacerItem();
+        space.setWidth(300);
 
         MetricRangePreferences metricRangePrefs = getMetricRangePreferences();
         if (metricRangePrefs != null) {
             advanced = (metricRangePrefs.explicitBeginEnd);
         }
-
+        
         if (displaySetButton) {
             setItems(simpleLastValuesItem, simpleLastUnitsItem, advancedStartItem, advancedEndItem, setButton,
-                advancedSimpleButton);
+                advancedSimpleButton, space);
         } else {//not displaying Set button
             if (displayEnableButton) {
                 setItems(enableRangeItem, simpleLastValuesItem, simpleLastUnitsItem, advancedStartItem,
-                    advancedEndItem, advancedSimpleButton);
-                setNumCols(9);//extend to encompass expanded
+                    advancedEndItem, advancedSimpleButton, space);
             } else {
                 setItems(simpleLastValuesItem, simpleLastUnitsItem, advancedStartItem, advancedEndItem,
-                    advancedSimpleButton);
+                    advancedSimpleButton, space);
             }
         }
         update();


commit 2f1ce1944b3307fa790225f91889fc642abfcc0e
Author: Lukas Krejci <lkrejci at redhat.com>
Date:   Tue Aug 21 10:57:28 2012 +0200

    [BZ 840662] - Python scripting is now bundled by default with RHQ.
    It can be excluded by explicitely switching off the "bundle-additional-script-languages" profile.
    E.g. mvn clean install -P '!bundle-additional-script-languages'

diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 3924ff0..e0e4243 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -34,6 +34,13 @@
       </dependency>
       
       <dependency>
+         <groupId>${project.groupId}</groupId>
+         <artifactId>rhq-scripting-javascript</artifactId>
+         <version>${project.version}</version>
+         <scope>runtime</scope>
+      </dependency>
+            
+      <dependency>
           <groupId>${project.groupId}</groupId>
           <artifactId>rhq-core-domain</artifactId>
           <version>${project.version}</version>
@@ -131,6 +138,7 @@
                            <property name="persistence-api.version" value="${persistence-api.version}" />
                            <property name="rhq.client.build.exclude.cli.jar" value="${rhq.client.build.exclude.cli.jar}" />
                            <property name="rhq.client.build.include.client.jar" value="${rhq.client.build.include.client.jar}" />
+                           <property name="rhq.bundle-additional-script-languages" value="${rhq.bundle-additional-script-languages}"/>
                         </ant>
                      </target>
                   </configuration>
@@ -220,6 +228,25 @@
 
    <profiles>
 
+      <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
+      <profile>
+         <id>bundle-additional-script-languages</id>
+         <activation>
+            <property>
+               <name>java.home</name>
+            </property>
+         </activation>
+
+         <dependencies>
+            <dependency>
+               <groupId>${project.groupId}</groupId>
+               <artifactId>rhq-scripting-python</artifactId>
+               <version>${project.version}</version>
+               <scope>runtime</scope>
+            </dependency>
+         </dependencies>
+      </profile>
+
       <!-- Unlike most of RHQ, this module requires JDK6, so replace the Java 5 bootclasspath that was added to the compiler args by the root POM with a bootclasspath based on the java.home sysprop (which should be Java 6 or later if the enforcer plugin did its job). -->
       <profile>
          <id>check-java-api</id>
diff --git a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
index 808bd82..715bd9b 100644
--- a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
+++ b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
@@ -70,6 +70,15 @@
 
       <copy file="${settings.localRepository}/org/rhq/rhq-scripting-api/${project.version}/rhq-scripting-api-${project.version}.jar" tofile="${lib.home}/rhq-scripting-api-${project.version}.jar" verbose="true" />
       <copy file="${settings.localRepository}/org/rhq/rhq-scripting-javascript/${project.version}/rhq-scripting-javascript-${project.version}.jar" tofile="${lib.home}/rhq-scripting-javascript-${project.version}.jar" verbose="true" />
+   	
+      <echo>*** Including additional script languages: ${rhq.bundle-additional-script-languages}</echo>
+      <!-- Copy all the additional script language support jars if we are told to do so -->
+      <copy todir="${lib.home}" verbose="true">
+         <fileset dir="${settings.localRepository}/org/rhq">
+            <include if="${rhq.bundle-additional-script-languages}" name="**/rhq-scripting-python-${project.version}.jar"/>
+         </fileset>
+         <mapper type="flatten" />
+      </copy>
    </target>
 
    <target name="prepare-samples-dir">
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index 38ead44..adbe85a 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -22,6 +22,8 @@
          <groupId>org.mozilla</groupId>
          <artifactId>rhino</artifactId>
          <version>1.7R4</version>
+         <!-- we actually repackage Rhino inside our jar -->
+         <scope>provided</scope> 
       </dependency>
    </dependencies>
 
diff --git a/modules/enterprise/scripting/pom.xml b/modules/enterprise/scripting/pom.xml
index c786cdc..f439f11 100644
--- a/modules/enterprise/scripting/pom.xml
+++ b/modules/enterprise/scripting/pom.xml
@@ -17,11 +17,12 @@
    </modules>
    
    <profiles>
+      <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
       <profile>
-         <id>experimental</id>
+         <id>bundle-additional-script-languages</id>
          <activation>
             <property>
-               <name>experimental-script-languages</name>
+               <name>java.home</name>
             </property>
          </activation>
          
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index 39d3895..4b34699 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -21,6 +21,8 @@
           <groupId>org.python</groupId>
           <artifactId>jython-standalone</artifactId>
           <version>2.5.2</version>
+         <!-- we actually repackage jython inside our jar -->
+         <scope>provided</scope>           
        </dependency>       
     </dependencies>
     
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 10b613e..0bed079 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -447,6 +447,26 @@
 
    <profiles>
 
+        <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
+        <profile>
+           <id>bundle-additional-script-languages</id>
+           <activation>
+              <property>
+                 <!-- we want this always active but activeByDefault doesn't work -->
+                 <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
+                 <name>java.home</name> 
+              </property>
+           </activation>
+           
+           <dependencies>
+              <dependency>
+                 <groupId>org.rhq</groupId>
+                 <artifactId>rhq-scripting-python</artifactId>
+                 <version>${project.version}</version>
+              </dependency>                     
+           </dependencies>
+        </profile>
+        
         <profile>
             <id>bundle-plugins</id>
             <activation>
diff --git a/pom.xml b/pom.xml
index 36b9c62..f6bd80d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1171,6 +1171,25 @@
 
   <profiles>
 
+    <!-- NOTE: This profile is extended upon in several other submodules.
+         If you need to change its activation policy, make sure to do that in
+         *ALL* the modules that define this profile. -->
+    <profile>
+        <id>bundle-additional-script-languages</id>
+        <activation>
+           <property>
+              <!-- we want this always active but activeByDefault doesn't work -->
+              <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
+              <name>java.home</name> 
+           </property>
+        </activation>
+        
+        <!-- Can be used to pass a flag down to deployment composing ANT scripts and somesuch -->
+        <properties>
+           <rhq.bundle-additional-script-languages>true</rhq.bundle-additional-script-languages>
+        </properties>            
+    </profile>
+    
     <profile>
         <id>ojdbc-driver</id>
         <activation>


commit 851461ab89dac1da41b9c85ae1d87eac54de2ef3
Author: Stefan Negrea <snegrea at redhat.com>
Date:   Mon Aug 20 14:42:06 2012 -0500

    [BZ 830841] Added a descriptive error message for cases where content is not available for a resource. The user is asked to try again in a few minutes if content was deployed recently since the deploy and discovery process might still be running.

diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/ResourceClientProxy.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/ResourceClientProxy.java
index 0199c77..7361fe8 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/ResourceClientProxy.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/ResourceClientProxy.java
@@ -576,19 +576,25 @@ public class ResourceClientProxy {
 
             InstalledPackage installedPackage = getBackingContent();
 
-            if (fileName == null )
-                fileName = installedPackage.getPackageVersion().getFileName();
-            
-            File file = new File(fileName);
+            if (installedPackage != null) {
+                if (fileName == null) {
+                    fileName = installedPackage.getPackageVersion().getFileName();
+                }
 
-            byte[] data = remoteClient.getProxy(ContentManagerRemote.class).getPackageBytes(
-                            remoteClient.getSubject(), resourceClientProxy.resourceId, installedPackage.getId());
+                File file = new File(fileName);
 
-            FileOutputStream fos = new FileOutputStream(file);
-            try {
-                fos.write(data);
-            } finally {
-                fos.close();
+                byte[] data = remoteClient.getProxy(ContentManagerRemote.class).getPackageBytes(
+                    remoteClient.getSubject(), resourceClientProxy.resourceId, installedPackage.getId());
+
+                FileOutputStream fos = new FileOutputStream(file);
+                try {
+                    fos.write(data);
+                } finally {
+                    fos.close();
+                }
+            } else {
+                throw new RuntimeException(
+                    "Content not available in the content repository. If you recently deployed content to this resource, then the content repository has not yet received the content or content information. The content for a resource is available only after the deployment and discovery process completes. Please try again in a few minutes.");
             }
         }
 


commit 414ccdf3fd964dc6d64abe511ec02f4e9170aa40
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Mon Aug 20 14:59:13 2012 -0400

    [Bug 849751 - RFE: protect resource tree from direct navigation to a resource with many siblings]
    Apply the new ResourceManager.findResourcesByCriteriaBounded() method
    to getResourceLineageAndSiblings() in order to similarly bound the initial
    tree building fetch.  Currently getResourceLineageAndSiblings() will use
    the defaults applied to findResourcesByCriteriaBounded(), although we may
    find that providing separate overrides will be useful.

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 0fe906a..a016f8e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -113,6 +113,7 @@ import org.rhq.core.domain.resource.group.composite.AutoGroupComposite;
 import org.rhq.core.domain.server.PersistenceUtility;
 import org.rhq.core.domain.util.PageControl;
 import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
 import org.rhq.core.util.IntExtractor;
 import org.rhq.core.util.collection.ArrayUtils;
 import org.rhq.enterprise.server.RHQConstants;
@@ -796,14 +797,16 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
 
             // If the ancestor is not locked, include viewable children.
             if (!ancestor.isLocked() || ancestor.getResource() == parent) {
-                // Get all viewable committed children.
-                PageList<Resource> children = findChildResourcesByCategoryAndInventoryStatus(subject,
-                    ancestor.getResource(), null, InventoryStatus.COMMITTED, PageControl.getUnlimitedInstance());
+                // Get viewable committed children, but bounded to ensure it's not an overwhelming return set
+                ResourceCriteria criteria = new ResourceCriteria();
+                criteria.addFilterParentResourceId(ancestor.getResource().getId());
+                criteria.addSortName(PageOrdering.ASC);
+                List<Resource> children = findResourcesByCriteriaBounded(subject, criteria, 0, 0);
                 // Remove any that are in the lineage to avoid repeated handling.
                 children.removeAll(rawResourceLineage);
                 for (Resource child : children) {
-                    // Ensure the parentResource field is fetched.
-                    //noinspection ConstantConditions
+                    // Ensure the parentResource field is fetched. (do this here and not via criteria.fetchParentResource
+                    // because that option would require inventory manager perm)
                     child.getParentResource().getId();
                     // The query only returned viewable children, so the composite should not be locked.
                     boolean isLocked = false;


commit 722b5c83eac64fd145863a154147f9bb0e1cf67a
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Mon Aug 20 14:24:29 2012 -0400

    trivial - fix some DriftManager logging

diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 0924288..8b54320 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -479,7 +479,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
 
     @Override
     public void updateDriftDetection(int resourceId, DriftDefinition driftDefinition) {
-        log.info("Recived request to update schedule for " + toString(resourceId, driftDefinition));
+        log.info("Received request to update schedule for " + toString(resourceId, driftDefinition));
 
         DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftDefinition);
         if (updatedSchedule == null) {
@@ -696,7 +696,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
         case pluginConfiguration: {
             baseLocation = resource.getPluginConfiguration().getSimpleValue(baseDirValueName, null);
             if (baseLocation == null) {
-                throw new IllegalArgumentException("Cannot determine the bundle base deployment location - "
+                throw new IllegalArgumentException("Cannot determine the base directory - "
                     + "there is no plugin configuration setting for [" + baseDirValueName + "]");
             }
             break;
@@ -704,7 +704,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
         case resourceConfiguration: {
             baseLocation = resource.getResourceConfiguration().getSimpleValue(baseDirValueName, null);
             if (baseLocation == null) {
-                throw new IllegalArgumentException("Cannot determine the bundle base deployment location - "
+                throw new IllegalArgumentException("Cannot determine the base directory - "
                     + "there is no resource configuration setting for [" + baseDirValueName + "]");
             }
             break;


commit 155c66f5fa5ac816de6ce8693875cc746f80096d
Author: Mike Thompson <mithomps at redhat.com>
Date:   Mon Aug 20 09:31:13 2012 -0700

    [BZ 848529 - Creating a domain deployment spins and never uploads the WAR on IE8]. IE8 had issues registering the listener when the upload was complete. This was a regression caused by smartgwt3.0 upgrade.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
new file mode 100644
index 0000000..89c1615
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.upload;
+
+import com.google.gwt.dom.client.Element;
+
+/**
+ * Implementation class used by {@link com.google.gwt.user.client.ui.FormPanel}.
+ */
+public class DynamicCallbackFormImplIE8  extends DynamicCallbackFormImpl {
+
+    @Override
+    public native void hookEvents(Element iframe,
+                                  DynamicCallbackFormImplHost listener) /*-{
+        if (iframe) {
+            iframe.onreadystatechange = function() {
+                // If there is no __formAction yet, this is a spurious onreadystatechange
+                // generated when the iframe is first added to the DOM.
+                if (!iframe.__formAction)
+                    return;
+
+                if (iframe.readyState == 'complete') {
+                    // If the iframe's contentWindow has not navigated to the expected action
+                    // url, then it must be an error, so we ignore it.
+                    listener. at org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplHost::onFrameLoad()();
+                }
+            };
+        }
+    }-*/;
+
+    @Override
+    public native void unhookEvents(Element iframe) /*-{
+        if (iframe)
+            iframe.onreadystatechange = null;
+    }-*/;
+
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 78db5af..c5c4391 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -39,6 +39,12 @@
         <when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
     </replace-with>
 
+    <!-- Special case for IE8 where upload onsubmit handlers need special registration code from other browsers -->
+    <replace-with class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplIE8">
+        <when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
+        <when-property-is name="user.agent" value="ie8"/>
+    </replace-with>
+
 
     <generate-with class="org.rhq.enterprise.gui.coregui.user.rebind.rpc.TrackingServiceInterfaceProxyGenerator">
         <when-type-assignable class="com.google.gwt.user.client.rpc.RemoteService"/>


commit dc966bdbe0ef18915cba3a1cdd69c4167f5bd4c1
Author: Mike Thompson <mithomps at redhat.com>
Date:   Fri Aug 10 15:29:53 2012 -0700

    Removed unused methods from ImageManager.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
index e50fe14..a15857e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
@@ -403,9 +403,6 @@ public class ImageManager {
         return "subsystems/availability/availability_yellow_16.png";
     }
 
-    public static String getAvailabilityYellowLargeIcon() {
-        return "subsystems/availability/availability_yellow_24.png";
-    }
 
     public static String getAvailBarImagePath(AvailabilityType availType) {
 
@@ -437,13 +434,6 @@ public class ImageManager {
         return "subsystems/alert/Flag_blue_16.png";
     }
 
-    public static String getAlertLargeIcon() {
-        return "subsystems/alert/Flag_blue_24.png";
-    }
-
-    public static String getAlertEditIcon() {
-        return "subsystems/alert/Edit_Alert.png";
-    }
 
     public static String getMetricEditIcon() {
         return "subsystems/monitor/Edit_Metric.png";
@@ -551,9 +541,6 @@ public class ImageManager {
         return "subsystems/event/" + severity.name() + "_16.png";
     }
 
-    public static String getEventLargeIcon() {
-        return "subsystems/event/Events_24.png";
-    }
 
     public static String getEventIcon() {
         return "subsystems/event/Events_16.png";
@@ -563,45 +550,25 @@ public class ImageManager {
         return "subsystems/monitor/Monitor_16.png";
     }
 
-    public static String getMonitorLargeIcon() {
-        return "subsystems/monitor/Monitor_24.png";
-    }
 
     public static String getMonitorFailedIcon() {
         return "subsystems/monitor/Monitor_failed_16.png";
     }
 
-    public static String getMonitorFailedLargeIcon() {
-        return "subsystems/monitor/Monitor_failed_24.png";
-    }
-
-    public static String getOperationLargeIcon() {
-        return "subsystems/control/Operation_24.png";
-    }
-
     public static String getOperationIcon() {
         return "subsystems/control/Operation_16.png";
     }
 
-    public static String getActivityPackageLargeIcon() {
-        return "subsystems/content/Package_24.png";
-    }
 
     public static String getActivityPackageIcon() {
         return "subsystems/content/Package_16.png";
     }
 
-    public static String getBundleLargeIcon() {
-        return "subsystems/content/Content_24.png";
-    }
 
     public static String getBundleIcon() {
         return "subsystems/content/Content_16.png";
     }
 
-    public static String getConfigureLargeIcon() {
-        return "subsystems/configure/Configure_24.png";
-    }
 
     public static String getConfigureIcon() {
         return "subsystems/configure/Configure_16.png";


commit 8732f82745b97897372ce0d00a9b3ac0773fedea
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Mon Aug 20 11:46:10 2012 -0400

    Add unit test for new ResourceManager.findResourcesByCriteriaBounded().

diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/group/test/LargeGroupCriteriaTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/group/test/LargeGroupCriteriaTest.java
index 93bb887..323cf5c 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/group/test/LargeGroupCriteriaTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/group/test/LargeGroupCriteriaTest.java
@@ -21,17 +21,21 @@ package org.rhq.enterprise.server.resource.group.test;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.List;
 
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
 import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.criteria.ResourceCriteria;
 import org.rhq.core.domain.criteria.ResourceGroupCriteria;
 import org.rhq.core.domain.resource.InventoryStatus;
 import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
+import org.rhq.core.domain.util.PageControl;
 import org.rhq.core.domain.util.PageList;
 import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
 import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
 import org.rhq.enterprise.server.test.LargeGroupTestBase;
 import org.rhq.enterprise.server.test.TestServerCommunicationsService;
@@ -189,6 +193,57 @@ public class LargeGroupCriteriaTest extends LargeGroupTestBase {
         testGroupQueries(gacs);
     }
 
+    // test findResourcesByCriteriaBounded here instead of ResourceGroupManagerBeanTest because we want
+    // to work with a decent # or resources.
+    @Test(enabled = TEST_ENABLED)
+    public void testResourceCriteriaBounded() throws Exception {
+        ArrayList<GroupAvailCounts> gacs = new ArrayList<LargeGroupCriteriaTest.GroupAvailCounts>();
+        gacs.add(new GroupAvailCounts(1100, 0, 0, 0)); // purposefully over 1,000, avails don't really matter
+
+        ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
+        AuthorizationManagerLocal authManager = LookupUtil.getAuthorizationManager();
+
+        env = new ArrayList<LargeGroupEnvironment>(gacs.size());
+
+        LargeGroupEnvironment lgeWithTypes = null;
+        for (GroupAvailCounts gac : gacs) {
+            env.add(createLargeGroupWithNormalUserRoleAccessWithInventoryStatus(lgeWithTypes, gac.total, gac.down,
+                gac.unknown, gac.disabled, gac.uncommitted, Permission.CONFIGURE_READ));
+            lgeWithTypes = env.get(0);
+        }
+
+        ResourceCriteria criteria = new ResourceCriteria();
+        List<Resource> result;
+
+        SessionTestHelper.simulateLogin(env.get(0).normalSubject);
+
+        criteria.addFilterParentResourceId(lgeWithTypes.platformResource.getId());
+        criteria.setPageControl(PageControl.getUnlimitedInstance());
+        result = resourceManager.findResourcesByCriteria(env.get(0).normalSubject, criteria);
+        assert null != result;
+        assert result.size() == 1100 : "Expected unbounded query to return all 1100 resources";
+
+        result = resourceManager.findResourcesByCriteriaBounded(env.get(0).normalSubject, criteria, 2000, 100);
+        assert null != result;
+        assert result.size() == 1100 : "Expected 2000/100 bounded query to return all 1100 resources";
+
+        result = resourceManager.findResourcesByCriteriaBounded(env.get(0).normalSubject, criteria, 1100, 100);
+        assert null != result;
+        assert result.size() == 1100 : "Expected 1100/100 bounded query to return all 1100 resources";
+
+        result = resourceManager.findResourcesByCriteriaBounded(env.get(0).normalSubject, criteria, 0, 0);
+        assert null != result;
+        assert result.size() == 200 : "Expected default (1000/200) bounded query to return 200 resources";
+
+        result = resourceManager.findResourcesByCriteriaBounded(env.get(0).normalSubject, criteria, 0, 500);
+        assert null != result;
+        assert result.size() == 500 : "Expected default (1000)/500) bounded query to return 500 resources";
+
+        result = resourceManager.findResourcesByCriteriaBounded(env.get(0).normalSubject, criteria, 100, 200);
+        assert null != result;
+        assert result.size() == 100 : "Expected 100/200 bounded query to return 100 resources";
+    }
+
     private PageList<ResourceGroupComposite> testGroupQueriesWithSearchBar(GroupAvailCounts gac, String searchExpression)
         throws Exception {
         ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();


commit 8cd529eb7b04e785ded5c7a3fb6e633e6bc90cc4
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Mon Aug 20 10:25:47 2012 -0400

    Reformat only!

diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceManagerBeanTest.java
index f0fe5b7..deac357 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceManagerBeanTest.java
@@ -113,102 +113,89 @@ public class ResourceManagerBeanTest extends UpdatePluginMetadataTestBase {
         assert errors.size() == 0;
     }
 
-
     public void testResourceLineage() throws Exception {
-       // given a resource id for the leaf resource in a resource hierarchy
-       int leafResourceId = givenASampleResourceHierarchy();
+        // given a resource id for the leaf resource in a resource hierarchy
+        int leafResourceId = givenASampleResourceHierarchy();
 
-    	// when
-    	List<Resource> resourceLineage = resourceManager.getResourceLineage(leafResourceId);
+        // when
+        List<Resource> resourceLineage = resourceManager.getResourceLineage(leafResourceId);
 
         assertEquals(resourceLineage.size(), 4);
-        
-    	// then
-    	StringBuilder stringBuilder = new StringBuilder();
-    	for (Resource resource : resourceLineage) {
-			stringBuilder.append(resource.getName());
-			if (resourceLineage.indexOf(resource) != resourceLineage.size() - 1) {
-				stringBuilder.append("::");
-			}
-		}
-    	System.err.println(stringBuilder.toString());
+
+        // then
+        StringBuilder stringBuilder = new StringBuilder();
+        for (Resource resource : resourceLineage) {
+            stringBuilder.append(resource.getName());
+            if (resourceLineage.indexOf(resource) != resourceLineage.size() - 1) {
+                stringBuilder.append("::");
+            }
+        }
+        System.err.println(stringBuilder.toString());
 
         // cleanup the DB
-        for (int i = resourceLineage.size() - 1; i >=0; i--) {
+        for (int i = resourceLineage.size() - 1; i >= 0; i--) {
             deleteNewResourceAgentResourceType(resourceLineage.get(i));
         }
     }
 
-	private int givenASampleResourceHierarchy() throws NotSupportedException,
-			SystemException {
-		getTransactionManager().begin();
-    	EntityManager em = getEntityManager();
-    	int leafResourceId = 0;
-    	try {
-			ResourceType platformType = createResourceType(em, "platform"
-					+ System.currentTimeMillis(), "test", null,
-					ResourceCategory.PLATFORM);
-			ResourceType appserverType = createResourceType(em, "jboss AS 5"
-					+ System.currentTimeMillis(), "jbossas5", platformType,
-					ResourceCategory.SERVER);
-			ResourceType jvmType = createResourceType(em,
-					"JVM" + System.currentTimeMillis(), "jbossas5",
-					appserverType, ResourceCategory.SERVICE);
-			ResourceType memType = createResourceType(em, "Memory Subsystem"
-					+ System.currentTimeMillis(), "jbossas5", jvmType,
-					ResourceCategory.SERVICE);
-			Agent agent = new Agent("agent" + System.currentTimeMillis(), "host" + System.currentTimeMillis(), 1, "",
+    private int givenASampleResourceHierarchy() throws NotSupportedException, SystemException {
+        getTransactionManager().begin();
+        EntityManager em = getEntityManager();
+        int leafResourceId = 0;
+        try {
+            ResourceType platformType = createResourceType(em, "platform" + System.currentTimeMillis(), "test", null,
+                ResourceCategory.PLATFORM);
+            ResourceType appserverType = createResourceType(em, "jboss AS 5" + System.currentTimeMillis(), "jbossas5",
+                platformType, ResourceCategory.SERVER);
+            ResourceType jvmType = createResourceType(em, "JVM" + System.currentTimeMillis(), "jbossas5",
+                appserverType, ResourceCategory.SERVICE);
+            ResourceType memType = createResourceType(em, "Memory Subsystem" + System.currentTimeMillis(), "jbossas5",
+                jvmType, ResourceCategory.SERVICE);
+            Agent agent = new Agent("agent" + System.currentTimeMillis(), "host" + System.currentTimeMillis(), 1, "",
                 "token" + System.currentTimeMillis());
-			em.persist(agent);
-			em.flush();
-
-			Resource platform = createResource(em, platformType, agent,
-					"platformKey" + System.currentTimeMillis(),
-					"host.dev.corp", null);
-			Resource appserver = createResource(em, appserverType, agent,
-					"JEAP" + System.currentTimeMillis(), "JBOSS EAP 5.1.1",
-					platform);
-			Resource jvm = createResource(em, jvmType, agent, "jvm"
-					+ System.currentTimeMillis(), "JBoss AS JVM", appserver);
-			Resource memSubystem = createResource(em, memType, agent,
-					"mem" + System.currentTimeMillis(), "Memory Subsystem", jvm);
-			leafResourceId = memSubystem.getId();
-
-			getTransactionManager().commit();
-		} catch (Exception e) {
-			try {
+            em.persist(agent);
+            em.flush();
+
+            Resource platform = createResource(em, platformType, agent, "platformKey" + System.currentTimeMillis(),
+                "host.dev.corp", null);
+            Resource appserver = createResource(em, appserverType, agent, "JEAP" + System.currentTimeMillis(),
+                "JBOSS EAP 5.1.1", platform);
+            Resource jvm = createResource(em, jvmType, agent, "jvm" + System.currentTimeMillis(), "JBoss AS JVM",
+                appserver);
+            Resource memSubystem = createResource(em, memType, agent, "mem" + System.currentTimeMillis(),
+                "Memory Subsystem", jvm);
+            leafResourceId = memSubystem.getId();
+
+            getTransactionManager().commit();
+        } catch (Exception e) {
+            try {
                 System.out.println("CANNOT Prepare TEST: Cause: " + e);
                 getTransactionManager().rollback();
             } catch (Exception ignore) {
             }
-		} finally {
-			em.close();
-		}
-		return leafResourceId;
-	}
-
-	private Resource createResource(EntityManager em, ResourceType platformType,
-			Agent agent, String resourceKey, String resourceName,
-			Resource parent) {
-		Resource resource = new Resource(resourceKey, resourceName, platformType);
+        } finally {
+            em.close();
+        }
+        return leafResourceId;
+    }
+
+    private Resource createResource(EntityManager em, ResourceType platformType, Agent agent, String resourceKey,
+        String resourceName, Resource parent) {
+        Resource resource = new Resource(resourceKey, resourceName, platformType);
         resource.setUuid(UUID.randomUUID().toString());
         resource.setAgent(agent);
         resource.setParentResource(parent);
         em.persist(resource);
         return resource;
-	}
-
-
-	private ResourceType createResourceType(EntityManager em, String name,
-			String pluginName, ResourceType parentResourceType,
-			ResourceCategory resourceCategory) {
-		ResourceType platformType = new ResourceType(name, pluginName,
-    			resourceCategory, parentResourceType);
-    	ResourceType resourceType = platformType;
-    	em.persist(resourceType);
-		return resourceType;
-	}
+    }
 
+    private ResourceType createResourceType(EntityManager em, String name, String pluginName,
+        ResourceType parentResourceType, ResourceCategory resourceCategory) {
+        ResourceType platformType = new ResourceType(name, pluginName, resourceCategory, parentResourceType);
+        ResourceType resourceType = platformType;
+        em.persist(resourceType);
+        return resourceType;
+    }
 
     private Resource createNewResourceWithNewType() throws Exception {
         getTransactionManager().begin();
@@ -257,7 +244,7 @@ public class ResourceManagerBeanTest extends UpdatePluginMetadataTestBase {
                     resourceManager.uninventoryResourceAsyncWork(superuser, deletedResourceId);
                 }
                 em.flush();
-                
+
                 ResourceType type = em.find(ResourceType.class, resource.getResourceType().getId());
                 System.out.println("Removing " + type + "...");
                 em.remove(type);


commit 5d472dceb665ec2e4b8b8c528c59c8c8b354d40d
Author: John Sanda <jsanda at redhat.com>
Date:   Mon Aug 20 11:39:51 2012 -0400

    [BZ 848893] Only hide empty groups for availability queries/searches
    
    This regression was introduced during the work for BZ 826493. While
    testing the changes for this commit, I came across another, related
    issue where an empty compatible group does not show up in the compatible
    groups view. It does however show up in the mixed groups view. An empty
    mixed group appears in the mixed group view. This issue is already
    logged under BZ 708929.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
index e269475..a799311 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
@@ -50,7 +50,6 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
 import org.rhq.enterprise.gui.coregui.client.Messages;
 import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
 import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.util.Log;
 import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
 import org.rhq.enterprise.gui.coregui.client.util.message.Message;
 
@@ -125,12 +124,16 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
                     processResponse(request.getRequestId(), response);
                 }
                 
-                private PageList<ResourceGroupComposite> filterEmptyMemberGroups(PageList<ResourceGroupComposite> result){
+                private PageList<ResourceGroupComposite> applyAvailabilitySearchFilter(
+                    PageList<ResourceGroupComposite> result){
 
+                    if (!isAvailabilitySearch(criteria)) {
+                        return result;
+                    }
                     PageList<ResourceGroupComposite> pageList = new PageList<ResourceGroupComposite>(result.getPageControl());
 
                     for (ResourceGroupComposite rgc : result) {
-                        if (rgc.getExplicitCount() > 0 ){
+                        if (rgc.getExplicitCount() > 0) {
                             pageList.add(rgc);
                         }
                     }
@@ -139,7 +142,7 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
                 }
 
                 public void onSuccess(PageList<ResourceGroupComposite> result) {
-                    PageList<ResourceGroupComposite> filteredResult =    filterEmptyMemberGroups(result);
+                    PageList<ResourceGroupComposite> filteredResult = applyAvailabilitySearchFilter(result);
                     response.setData(buildRecords(filteredResult));
                     response.setTotalRows(filteredResult.getTotalSize()); // for paging to work we have to specify size of full result set
                     processResponse(request.getRequestId(), response);
@@ -147,6 +150,10 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
             });
     }
 
+    private boolean isAvailabilitySearch(ResourceGroupCriteria criteria) {
+        return criteria.getSearchExpression() != null && criteria.getSearchExpression().startsWith("availability");
+    }
+
     @Override
     protected ResourceGroupCriteria getFetchCriteria(final DSRequest request) {
         ResourceGroupCriteria criteria = new ResourceGroupCriteria();


commit c62b143dd5f065b54caf6692d3c04929d8b4539f
Author: Stefan Negrea <snegrea at redhat.com>
Date:   Fri Aug 17 14:30:35 2012 -0500

    [BZ 841684] Add config option to the wrapper script.

diff --git a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh
index 68d1856..f03c83a 100755
--- a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh
+++ b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh
@@ -246,6 +246,44 @@ case "$1" in
         fi
         ;;
 
+'config')
+        prepare_pid_dir
+
+        if [ "$_RUNNING" = "1" ]; then
+           echo "Cannot run config - please stop the agent before running config"
+           echo $_STATUS
+           exit 0
+        fi
+
+        echo "Configure RHQ Agent..."
+
+        # Determine the command to execute when starting the agent
+        if [ -z "$RHQ_AGENT_START_COMMAND" ]; then
+           # Find out where the agent start script is located
+           _START_SCRIPT="${RHQ_AGENT_HOME}/bin/rhq-agent.sh"
+
+           if [ ! -f "$_START_SCRIPT" ]; then
+              echo "ERROR! Cannot find the RHQ Agent start script"
+              echo "Not found: $_START_SCRIPT"
+              exit 1
+           fi
+           debug_wrapper_msg "Start script found here: $_START_SCRIPT"
+
+           RHQ_AGENT_START_COMMAND="${_START_SCRIPT}"
+        fi
+
+        RHQ_AGENT_CMDLINE_OPTS="--cleanconfig --nostart --daemon --setup --advanced"
+        export RHQ_AGENT_CMDLINE_OPTS
+
+        # start the agent now!
+        if [ -n "$RHQ_AGENT_DEBUG" ] && [ "$RHQ_AGENT_DEBUG" != "false" ]; then
+           debug_wrapper_msg "Executing agent with command: ${RHQ_AGENT_START_COMMAND} ${RHQ_AGENT_CMDLINE_OPTS}"
+        fi
+
+        . $RHQ_AGENT_START_COMMAND
+
+        ;;
+
 'stop')
         prepare_pid_dir
 
@@ -326,7 +364,7 @@ case "$1" in
         exit $? 
         ;;
 *)
-        echo "Usage: $0 { start | stop | kill | restart | status }"
+        echo "Usage: $0 { start | stop | kill | restart | status | config }"
         exit 1
         ;;
 esac




More information about the rhq-commits mailing list