You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/11/23 19:32:02 UTC
svn commit: r720024 [1/5] - in /geronimo/server/trunk: ./
plugingroups/javaee5-jetty/ plugingroups/javaee5-jetty/src/main/history/
plugingroups/javaee5-tomcat/ plugingroups/javaee5-tomcat/src/main/history/
plugins/monitoring/ plugins/monitoring/agent-c...
Author: djencks
Date: Sun Nov 23 10:32:00 2008
New Revision: 720024
URL: http://svn.apache.org/viewvc?rev=720024&view=rev
Log:
GERONIMO-4415 use jpa for data access in monitoring console
Added:
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/main/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/main/resources/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/org/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/org/apache/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/org/apache/geronimo/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/org/apache/geronimo/monitoring/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/java/org/apache/geronimo/monitoring/console/
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/src/test/resources/
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/PopUpGraphServlet.java (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Node.java (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/View.java (with props)
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/classes/
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/classes/META-INF/
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml (with props)
Modified:
geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml
geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml
geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml
geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/monitoring/agent-car-jmx/pom.xml
geronimo/server/trunk/plugins/monitoring/agent-ds/pom.xml
geronimo/server/trunk/plugins/monitoring/agent/pom.xml
geronimo/server/trunk/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml
geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/pom.xml
geronimo/server/trunk/plugins/monitoring/mconsole-jetty/pom.xml
geronimo/server/trunk/plugins/monitoring/mconsole-jetty/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/pom.xml
geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/monitoring/mconsole-war/pom.xml
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/web.xml
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
geronimo/server/trunk/plugins/monitoring/pom.xml
geronimo/server/trunk/pom.xml
Modified: geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml Sun Nov 23 10:32:00 2008
@@ -162,14 +162,14 @@
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-jetty</artifactId>
<version>${version}</version>
<type>car</type>
Modified: geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml Sun Nov 23 10:32:00 2008
@@ -42,6 +42,11 @@
<type>car</type>
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>agent</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.plugins</groupId>
<artifactId>debugviews-console-jetty</artifactId>
<type>car</type>
@@ -57,6 +62,11 @@
<type>car</type>
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>mconsole-jetty</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>jmx-security</artifactId>
<type>car</type>
@@ -107,23 +117,13 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>ejb</artifactId>
- <type>car</type>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>mconsole-jetty</artifactId>
- <type>car</type>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>agent</artifactId>
+ <artifactId>openejb-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>openejb-console-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>ejb</artifactId>
<type>car</type>
</dependency>
</plugin-artifact>
Modified: geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml Sun Nov 23 10:32:00 2008
@@ -154,14 +154,14 @@
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-tomcat</artifactId>
<version>${version}</version>
<type>car</type>
Modified: geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml Sun Nov 23 10:32:00 2008
@@ -47,6 +47,11 @@
<type>car</type>
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>agent</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
<artifactId>web-tomcat</artifactId>
<type>car</type>
@@ -87,6 +92,11 @@
<type>car</type>
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>openejb-console-tomcat</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.configs</groupId>
<artifactId>javamail</artifactId>
<type>car</type>
@@ -97,7 +107,7 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-tomcat</artifactId>
<type>car</type>
</dependency>
@@ -116,14 +126,4 @@
<artifactId>welcome-tomcat</artifactId>
<type>car</type>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>agent</artifactId>
- <type>car</type>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>openejb-console-tomcat</artifactId>
- <type>car</type>
- </dependency>
</plugin-artifact>
Modified: geronimo/server/trunk/plugins/monitoring/agent-car-jmx/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/agent-car-jmx/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/agent-car-jmx/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/agent-car-jmx/pom.xml Sun Nov 23 10:32:00 2008
@@ -36,21 +36,21 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-jmx</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-jar</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-ds</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>car</type>
</dependency>
</dependencies>
Modified: geronimo/server/trunk/plugins/monitoring/agent-ds/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/agent-ds/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/agent-ds/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/agent-ds/pom.xml Sun Nov 23 10:32:00 2008
@@ -67,7 +67,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-sql</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
</dependency>
</dependencies>
Modified: geronimo/server/trunk/plugins/monitoring/agent/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/agent/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/agent/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/agent/pom.xml Sun Nov 23 10:32:00 2008
@@ -46,14 +46,14 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-ds</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-ejb</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-jar</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
</dependency>
</dependencies>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml Sun Nov 23 10:32:00 2008
@@ -38,6 +38,20 @@
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
+ <connectiondefinition-instance>
+ <name>NoTxMonitoringClientDS</name>
+ <config-property-setting name="CreateDatabase">true</config-property-setting>
+ <config-property-setting name="UserName">app</config-property-setting>
+ <config-property-setting name="DatabaseName">MonitoringClientDB</config-property-setting>
+ <connectionmanager>
+ <no-transaction/>
+ <single-pool>
+ <max-size>10</max-size>
+ <min-size>0</min-size>
+ <match-one/>
+ </single-pool>
+ </connectionmanager>
+ </connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
Added: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt?rev=720024&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt (added)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt Sun Nov 23 10:32:00 2008
@@ -0,0 +1 @@
+clean install
\ No newline at end of file
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/goals.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml?rev=720024&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml (added)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml Sun Nov 23 10:32:00 2008
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>monitoring</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.geronimo.plugins.monitoring.itest</groupId>
+ <artifactId>mconsole-itest-simple</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2-SNAPSHOT</version>
+ <name>mconsole-itest-simple</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.testsupport</groupId>
+ <artifactId>testsupport-selenium</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ <systemProperties>
+ <property>
+ <name>geronimoVersion</name>
+ <value>${version}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.geronimo.buildsupport</groupId>
+ <artifactId>testsuite-maven-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>generate-surefire-xml</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java?rev=720024&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java (added)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java Sun Nov 23 10:32:00 2008
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.geronimo.monitoring.console;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class GeneralSTest extends SeleneseTestCase {
+ public void setUp() throws Exception {
+ setUp("http://localhost:8080/console/portal/welcome", "*chrome");
+ }
+ public void testNew() throws Exception {
+ selenium.open("http://localhost:8080/console/portal/welcome");
+ selenium.type("<portlet:namespace/>j_username", "system");
+ selenium.type("<portlet:namespace/>j_password", "manager");
+ selenium.click("submit");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Monitoring");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Add Server");
+ selenium.waitForPageToLoad("30000");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_name", "foo");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_ip", "localhost");
+ selenium.click("Pluto__monitoring_monitoring_126896788_0_protocol1");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_username", "system");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_password", "manager");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_password2", "manager");
+ selenium.click("//input[@value='Add']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Enable Query");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Edit");
+ selenium.waitForPageToLoad("30000");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_snapshot", "60");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_retention", "5");
+ selenium.click("//input[@value='Save']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Home");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Add Graph");
+ selenium.waitForPageToLoad("30000");
+ selenium.select("Pluto__monitoring_monitoring_126896788_0_server_id", "label=foo - localhost");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_name", "foo");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_description", "foo");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_xlabel", "x");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_ylabel", "y");
+ selenium.select("Pluto__monitoring_monitoring_126896788_0_mbean", "label=JettyWebConnector");
+ selenium.select("Pluto__monitoring_monitoring_126896788_0_dataname1", "label=Connections Request Current");
+ selenium.click("//input[@value='Add']");
+ assertEquals("Timeframe needs to be at least 120", selenium.getAlert());
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_timeframe", "120");
+ selenium.click("//input[@value='Add']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//div[@id='/monitoring.monitoring!126896788|0']/div[2]/table[3]/tbody/tr[2]/td[5]/a");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//input[@value='Save']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Home");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Create View");
+ selenium.waitForPageToLoad("30000");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_name", "foo");
+ selenium.type("Pluto__monitoring_monitoring_126896788_0_description", "foo");
+ selenium.click("graph_ids");
+ selenium.click("//input[@value='Save']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=foo");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Home");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Edit");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//input[@value='Save']");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Home");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=foo");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Home");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Edit");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Delete this view");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//div[@id='/monitoring.monitoring!126896788|0']/div[2]/table[3]/tbody/tr[2]/td[5]/a");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Delete this graph");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Disable Query");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Edit");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("link=Delete this server");
+ selenium.waitForPageToLoad("30000");
+ selenium.click("//img[@alt='Logout']");
+ selenium.waitForPageToLoad("30000");
+ }
+}
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/java/org/apache/geronimo/monitoring/console/GeneralSTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml?rev=720024&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml (added)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml Sun Nov 23 10:32:00 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+
+<suite name="Suite1" verbose="1">
+ <test name="mconsole-testsuite">
+ <packages>
+ <package name="org.apache.geronimo.monitoring.console"/>
+ </packages>
+ </test>
+</suite>
+
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/mconsole-itest-simple/src/test/resources/testng.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty-server/pom.xml Sun Nov 23 10:32:00 2008
@@ -34,6 +34,23 @@
<packaging>server-assembly</packaging>
<name>Simple Monitoring Console Server on Jetty</name>
+ <properties>
+ <!--
+ NOTE: The default assembly is jetty, so exclude any tomcat tests by
+ default. Profiles below will set this based on the assemblyId.
+ -->
+ <shittyTestExcludes>**/*tomcat*/pom.xml</shittyTestExcludes>
+
+ <!--
+ NOTE: Override the following on the cmdline to only run specific
+ testsuite buckets. To only run console-testsuite/advanced -
+ mvn -DshittyTestIncludes=console-testsuite/advanced/pom.xml
+ or
+ mvn install -Dtests=console-testsuite/advanced
+ -->
+ <shittyTestIncludes>*/pom.xml</shittyTestIncludes>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
@@ -59,15 +76,75 @@
<version>${pom.version}</version>
<type>car</type>
</dependency>
+
+
+ <!--<dependency>-->
+ <!--<groupId>org.apache.geronimo.plugins</groupId>-->
+ <!--<artifactId>sysdb-console-jetty</artifactId>-->
+ <!--<version>${pom.version}</version>-->
+ <!--<type>car</type>-->
+ <!--</dependency>-->
+
+
+
</dependencies>
<build>
<pluginManagement>
<plugins>
+ <!--<plugin>-->
+ <!--<groupId>org.apache.geronimo.buildsupport</groupId>-->
+ <!--<artifactId>car-maven-plugin</artifactId>-->
+ <!--<extensions>true</extensions>-->
+ <!--</plugin>-->
+ <!--
+ NOTE: This horrible looking configuration sets up the surefire plugin to
+ not run tests durring the 'test' phase, but instead during the
+ 'integration-test' phase.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>integration</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <suiteXmlFiles>
+ <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.geronimo.buildsupport</groupId>
- <artifactId>car-maven-plugin</artifactId>
- <extensions>true</extensions>
+ <artifactId>geronimo-maven-plugin</artifactId>
+ <configuration>
+ <reporters>
+ <reporter implementation="org.apache.geronimo.mavenplugins.geronimo.reporting.SurefireReporter">
+ <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+ </reporter>
+ </reporters>
+ </configuration>
</plugin>
</plugins>
</pluginManagement>
@@ -106,6 +183,136 @@
</servers>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <logOutput>true</logOutput>
+ <background>true</background>
+ <systemProperties>
+ <property>
+ <name>browser</name>
+ <value>${browser}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop-server</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.geronimo.buildsupport</groupId>
+ <artifactId>geronimo-maven-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <assemblyArchive>${project.build.directory}/${pom.artifactId}-${pom.version}-bin.zip</assemblyArchive>
+ <optionSets>
+ <optionSet>
+ <id>morememory</id>
+ <options>
+ <option>-Xmx512m</option>
+ <option>-XX:MaxPermSize=128m</option>
+ </options>
+ </optionSet>
+
+ <optionSet>
+ <id>debug</id>
+ <options>
+ <option>-Xdebug</option>
+ <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
+ </options>
+ </optionSet>
+ </optionSets>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <logOutput>true</logOutput>
+ <background>true</background>
+ <verifyTimeout>300</verifyTimeout>
+ <refresh>true</refresh>
+ <optionSets>
+ <optionSet>
+ <id>default</id>
+ <options>
+ <option>-XX:MaxPermSize=128m</option>
+ </options>
+ </optionSet>
+ </optionSets>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>install</phase>
+ <goals>
+ <goal>stop-server</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>shitty-maven-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <projects>
+ <fileset>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>${shittyTestIncludes}</include>
+ </includes>
+ <excludes>
+ <exclude>${shittyTestExcludes}</exclude>
+ </excludes>
+ </fileset>
+ </projects>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>clean</goal>
+ <goal>install</goal>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.geronimo.buildsupport</groupId>
+ <artifactId>testsuite-maven-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>summarize</id>
+ <phase>post-site</phase>
+ <goals>
+ <goal>summarize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty/pom.xml Sun Nov 23 10:32:00 2008
@@ -63,9 +63,17 @@
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>persistence-jpa10-deployer</artifactId>
+ <version>${version}</version>
+ <type>car</type>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-ds</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>car</type>
</dependency>
@@ -79,7 +87,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-war</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
@@ -91,12 +99,21 @@
<type>car</type>
</dependency>
+ <!-- see if openejb-client can be used -->
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
<artifactId>openejb</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${version}</version>
+ <type>car</type>
+ </dependency>
+
</dependencies>
<build>
@@ -111,11 +128,12 @@
<deploymentConfig>${jasperDeployer}</deploymentConfig>
<deploymentConfig>${jettyDeployer}</deploymentConfig>
<deploymentConfig>${connectorDeployer}</deploymentConfig>
+ <deploymentConfig>${jpaDeployer}</deploymentConfig>
</deploymentConfigs>
<module>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-war</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>war</type>
</module>
<category>Administration Monitoring</category>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-jetty/src/main/history/dependencies.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-jetty/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-jetty/src/main/history/dependencies.xml Sun Nov 23 10:32:00 2008
@@ -18,6 +18,11 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>openjpa</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
<artifactId>openejb</artifactId>
<type>car</type>
</dependency>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/pom.xml Sun Nov 23 10:32:00 2008
@@ -63,9 +63,17 @@
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>persistence-jpa10-deployer</artifactId>
+ <version>${version}</version>
+ <type>car</type>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-ds</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>car</type>
</dependency>
@@ -79,7 +87,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-war</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
@@ -105,6 +113,14 @@
<version>${version}</version>
<type>car</type>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${version}</version>
+ <type>car</type>
+ </dependency>
+
</dependencies>
<build>
@@ -119,11 +135,12 @@
<deploymentConfig>${jasperDeployer}</deploymentConfig>
<deploymentConfig>${tomcatDeployer}</deploymentConfig>
<deploymentConfig>${connectorDeployer}</deploymentConfig>
+ <deploymentConfig>${jpaDeployer}</deploymentConfig>
</deploymentConfigs>
<module>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>mconsole-war</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>war</type>
</module>
<category>Administration Monitoring</category>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/src/main/history/dependencies.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-tomcat/src/main/history/dependencies.xml Sun Nov 23 10:32:00 2008
@@ -23,6 +23,11 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>openjpa</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
<artifactId>openejb</artifactId>
<type>car</type>
</dependency>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/pom.xml?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/pom.xml Sun Nov 23 10:32:00 2008
@@ -65,7 +65,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins.monitoring</groupId>
<artifactId>agent-ejb</artifactId>
- <version>${monitoringConsoleVersion}</version>
+ <version>${pom.version}</version>
<type>jar</type>
</dependency>
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java Sun Nov 23 10:32:00 2008
@@ -16,226 +16,127 @@
*/
package org.apache.geronimo.monitoring.console;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.Statement;
import java.text.DecimalFormat;
-import java.text.Format;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
+import java.util.List;
import java.util.TreeMap;
-import org.apache.geronimo.monitoring.console.util.DBManager;
import org.apache.geronimo.monitoring.console.data.Graph;
+import org.apache.geronimo.monitoring.console.data.Node;
public class GraphsBuilder {
+ private static final long ONE_MINUTE_MS = 60000;
// constructor
public GraphsBuilder() {
}
- public StatsGraph buildOneDB(int graph_id) throws Exception {
- Connection con = (new DBManager()).getConnection();
+ public StatsGraph getStatsGraph(Graph graph) throws Exception {
StatsGraph statsGraph = null;
- PreparedStatement pStmt;
- ResultSet rsServer;
- pStmt = con
- .prepareStatement("SELECT * from graphs WHERE enabled=1 AND graph_id="
- + graph_id);
- ResultSet rs = pStmt.executeQuery();
- if (rs.next()) {
- String mBeanName = rs.getString("mbean");
- String dataName1 = rs.getString("dataname1");
- String dataName2 = rs.getString("dataname2");
- String graphName1 = rs.getString("dataname1");
- String graphName2 = rs.getString("dataname2");
- int timeFrame = rs.getInt("timeframe");
- String server_id = rs.getString("server_id");
- String xlabel = rs.getString("xlabel");
- String ylabel = rs.getString("ylabel");
- String data1operation = rs.getString("data1operation");
- String data2operation = rs.getString("data2operation");
- String operation = rs.getString("operation");
- String color = rs.getString("color");
- float warninglevel1 = rs.getFloat("warninglevel1");
- String description = rs.getString("description");
- boolean showArchive = rs.getInt("archive") == 1;
-
- Graph graph = new Graph();
- graph.setId(graph_id);
- graph.setDescription(description);
- graph.setXlabel(xlabel);
- graph.setYlabel(ylabel);
- graph.setData1operation(data1operation.charAt(0));
- graph.setOperation(operation);
- graph.setData2operation(data2operation.charAt(0));
- graph.setTimeFrame(timeFrame);
- graph.setColor(color);
- graph.setWarninglevel1(warninglevel1);
-
- pStmt = con
- .prepareStatement("SELECT * from servers WHERE enabled=1 AND server_id="
- + server_id);
- rsServer = pStmt.executeQuery();
- if (rsServer.next()) {
- String ip = rsServer.getString("ip");
- String username = rsServer.getString("username");
- String password = rsServer.getString("password");
- int port = rsServer.getInt("port");
- int protocol = rsServer.getInt("protocol");
- // close the connection before calling the MRCConnector because
- // it opens another
- // connection to the db to update the SERVERS.last_seen
- // attribute
- con.close();
- MRCConnector mrc = new MRCConnector(ip, username, password, port, protocol);
- HashMap<String, ArrayList<Long>> dataList = new HashMap<String, ArrayList<Long>>();
-
- dataList.put(graphName1, new ArrayList<Long>());
- if ((dataName2 != null) && !dataName2.equals("time")
- && !dataName2.equals("null") && !dataName2.equals("")) {
- dataList.put(graphName2, new ArrayList<Long>());
- }
- int snapCount;
- if ((timeFrame / 1440 >= 30))
- snapCount = 17;
- else {
- if ((timeFrame / 1440) == 7) {
- snapCount = 16;
- } else if ((int) ((timeFrame / (mrc.getSnapshotDuration() / 60000))) <= 12)
- snapCount = (int) ((timeFrame / (mrc
- .getSnapshotDuration() / 60000)));
- else
- snapCount = 12;
- }
-
- ArrayList<Long> snapshot_time = new ArrayList<Long>();
+ Node node = graph.getNode();
+ if (node != null) {
+ String ip = node.getHost();
+ String username = node.getUserName();
+ String password = node.getPassword();
+ int port = node.getPort();
+ String protocol = node.getProtocol();
+ MRCConnector mrc = new MRCConnector(ip, username, password, port, protocol);
+ Long snapshotDurationMS = mrc.getSnapshotDuration();
+
+ List<Long> dataList1 = new ArrayList<Long>();
+ List<Long> dataList2 = new ArrayList<Long>();
+
+ boolean hasSecondSeries = (graph.getDataName2() != null) && !graph.getDataName2().equals("time")
+ && !graph.getDataName2().equals("null") && !graph.getDataName2().equals("");
+
+ int snapCount;
+ int timeFrame = graph.getTimeFrame();
+ if ((timeFrame / 1440 >= 30)) {
+ snapCount = 17;
+ } else {
+ if ((timeFrame / 1440) == 7) {
+ snapCount = 16;
+ } else if ((int) ((timeFrame / (snapshotDurationMS / ONE_MINUTE_MS))) <= 12)
+ snapCount = (int) ((timeFrame / (snapshotDurationMS / ONE_MINUTE_MS)));
+ else
+ snapCount = 12;
+ }
- ArrayList<Long> prettyTime = new ArrayList<Long>();
+ List<Long> snapshot_time = new ArrayList<Long>();
- String prettyTimeFrame;
- DecimalFormat fmt = new DecimalFormat("0.##");
- if (timeFrame / 60 > 24) {
- prettyTimeFrame = fmt.format((float) (timeFrame / 1440))
- + " day";
+ String prettyTimeFrame;
+ DecimalFormat fmt = new DecimalFormat("0.##");
+ if (timeFrame / 60 > 24) {
+ prettyTimeFrame = fmt.format((float) (timeFrame / 1440)) + " day";
+ } else {
+ if (timeFrame > 60) {
+ prettyTimeFrame = fmt.format((float) timeFrame / 60) + " hour";
} else {
- if (timeFrame > 60) {
- prettyTimeFrame = fmt.format((float) timeFrame / 60)
- + " hour";
- } else {
- prettyTimeFrame = fmt.format(timeFrame) + " minute";
- }
+ prettyTimeFrame = fmt.format(timeFrame) + " minute";
}
+ }
- int skipCount = (int) ((timeFrame / (mrc.getSnapshotDuration() / 60000)))
- / (snapCount);
+ int skipCount = (int) ((timeFrame / (snapshotDurationMS / ONE_MINUTE_MS))) / (snapCount);
- snapCount = snapCount + 2;
- TreeMap<Long, Long> snapshotList1 = mrc
- .getSpecificStatistics(mBeanName, dataName1, snapCount,
- skipCount, showArchive);
- TreeMap<Long, Long> snapshotList2 = new TreeMap<Long, Long>();
- if ((dataName2 != null) && !dataName2.equals("time")
- && !dataName2.equals("null") && !dataName2.equals("")) {
- snapshotList2 = mrc.getSpecificStatistics(mBeanName,
- dataName2, snapCount, skipCount, showArchive);
- }
- // Check if snapshotList is empty
- if (snapshotList1.size() == 0) {
- snapshotList1.put(System.currentTimeMillis(), (long) 0);
- /*
- * If there are not enough snapshots available to fill the
- * requested number, insert some with values of 0 and the
- * proper times.
- */
- while (snapshotList1.size() < snapCount) {
- // Temporary, always is first element (oldest)
- Long timeFix = snapshotList1.firstKey();
- // Calculate appropriate time, add it to the submap,
- // then
- // add
- // that to the tempMap
- snapshotList1
- .put(
- (timeFix - (mrc.getSnapshotDuration() * skipCount)),
- (long) 0);
- }
- }
- if (snapshotList2.size() == 0) {
- snapshotList2.put(System.currentTimeMillis(), (long) 0);
- while (snapshotList2.size() < snapCount) {
- // Temporary, always is first element (oldest)
- Long timeFix = snapshotList2.firstKey();
- snapshotList2
- .put(
- (timeFix - (mrc.getSnapshotDuration() * skipCount)),
- (long) 0);
- }
+ snapCount = snapCount + 2;
+ TreeMap<Long, Long> snapshotList1 = mrc.getSpecificStatistics(graph.getMBeanName(), graph.getDataName1(), snapCount, skipCount, graph.isShowArchive());
+ TreeMap<Long, Long> snapshotList2 = new TreeMap<Long, Long>();
+ if (hasSecondSeries) {
+ snapshotList2 = mrc.getSpecificStatistics(graph.getMBeanName(), graph.getDataName2(), snapCount, skipCount, graph.isShowArchive());
+ }
+ // Check if snapshotList is empty
+ if (snapshotList1.size() == 0) {
+ snapshotList1.put(System.currentTimeMillis(), (long) 0);
+ /*
+ * If there are not enough snapshots available to fill the
+ * requested number, insert some with values of 0 and the
+ * proper times.
+ */
+ while (snapshotList1.size() < snapCount) {
+ // Temporary, always is first element (oldest)
+ Long timeFix = snapshotList1.firstKey();
+ // Calculate appropriate time, add it to the submap,
+ // then
+ // add
+ // that to the tempMap
+ snapshotList1.put((timeFix - (snapshotDurationMS * skipCount)), (long) 0);
}
-
- for (Long current : snapshotList1.keySet()) {
- snapshot_time.add(current);
- ArrayList<Long> ArrayListTemp = dataList.get(graphName1);
- ArrayListTemp.add(snapshotList1.get(current));
- if ((dataName2 != null) && !dataName2.equals("time")
- && !dataName2.equals("null")
- && !dataName2.equals("")) {
- ArrayList<Long> ArrayListTemp2 = dataList.get(graphName2);
- ArrayListTemp2.add(snapshotList2.get(current));
- }
- prettyTime.add(current / 1000);
+ }
+ if (snapshotList2.size() == 0) {
+ snapshotList2.put(System.currentTimeMillis(), (long) 0);
+ while (snapshotList2.size() < snapCount) {
+ // Temporary, always is first element (oldest)
+ Long timeFix = snapshotList2.firstKey();
+ snapshotList2.put((timeFix - (snapshotDurationMS * skipCount)), (long) 0);
}
+ }
- if (dataName2.equals("time")) {
- statsGraph = new StatsGraph(graph,
- ip + " - " + xlabel + " - " + prettyTimeFrame,
- dataList.get(graphName1),
- prettyTime,
- snapshot_time,
- (int) (mrc.getSnapshotDuration() / 1000)
- );
- } else if (!dataName2.equals("time") && (dataName2 != null)
- && !dataName2.equals("null") && !dataName2.equals("")) {
- statsGraph = new StatsGraph(graph,
- ip + " - " + xlabel + " - " + prettyTimeFrame,
- dataList.get(graphName1),
- dataList.get(graphName2),
- snapshot_time,
- (int) (mrc.getSnapshotDuration() / 1000)
- );
- } else if (dataName2 == null || dataName2.equals("null")
- || dataName2.equals("")) {
- statsGraph = new StatsGraph(graph,
- ip + " - " + xlabel + " - " + prettyTimeFrame,
- dataList.get(graphName1),
- snapshot_time,
- (int) (mrc.getSnapshotDuration() / 1000)
- );
- } else {
- System.out.println("Using Null call.");
- statsGraph = new StatsGraph();
+ for (Long current : snapshotList1.keySet()) {
+ snapshot_time.add(current);
+ dataList1.add(snapshotList1.get(current));
+ if (hasSecondSeries) {
+ dataList2.add(snapshotList2.get(current));
}
}
- }
- // check to see if graph was successfully populated
- if (statsGraph != null) {
- // get the current date
- Format formatter;
- formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- Date date = new Date(System.currentTimeMillis());
- String currentTime = formatter.format(date);
- // the graph was successfully operated on,
- // so update the last_seen attribute
- DBManager dbManager = new DBManager();
- Connection conn = dbManager.getConnection();
- Statement stmt = conn.createStatement();
- stmt.executeUpdate("UPDATE GRAPHS SET LAST_SEEN='" + currentTime
- + "' WHERE GRAPH_ID=" + graph_id);
- conn.close();
+ String prettyGraphName = ip + " - " + graph.getXlabel() + " - " + prettyTimeFrame;
+ int snapshotDurationSeconds = (int) (snapshotDurationMS / 1000);
+ if (hasSecondSeries) {
+ statsGraph = new StatsGraph(graph,
+ prettyGraphName,
+ dataList1,
+ dataList2,
+ snapshot_time,
+ snapshotDurationSeconds
+ );
+ } else {
+ statsGraph = new StatsGraph(graph,
+ prettyGraphName,
+ dataList1,
+ snapshot_time,
+ snapshotDurationSeconds
+ );
+ }
}
return statsGraph;
}
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java?rev=720024&r1=720023&r2=720024&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MRCConnector.java Sun Nov 23 10:32:00 2008
@@ -16,8 +16,6 @@
*/
package org.apache.geronimo.monitoring.console;
-import java.sql.Connection;
-import java.sql.Statement;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -35,26 +33,28 @@
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
-
import javax.naming.Context;
import javax.naming.InitialContext;
-import org.apache.geronimo.monitoring.MasterRemoteControlRemote;
-import org.apache.geronimo.monitoring.console.util.DBManager;
-
import org.apache.geronimo.crypto.EncryptionManager;
+import org.apache.geronimo.monitoring.MasterRemoteControlRemote;
+import org.apache.geronimo.monitoring.console.data.Node;
public class MRCConnector {
private static String PATH = null;
private static MBeanServerConnection mbServerConn;
private MasterRemoteControlRemote mrc = null;
- private int Protocol = 0;
+ private String protocol = "EJB";
MRCConnector() {
}
+ public MRCConnector(Node node) throws Exception {
+ this(node.getHost(), node.getUserName(), node.getPassword(), node.getPort(), node.getProtocol());
+ }
+
/**
* @param ip -
* IP address of mrc-server to connect to
@@ -66,12 +66,12 @@
* If the connection to mrc-server fails
*/
public MRCConnector(String ip, String userName, String password, int port,
- int protocol) throws Exception {
+ String protocol) throws Exception {
// decrypt the password
password = (String) EncryptionManager.decrypt(password);
- Protocol = protocol;
+ this.protocol = protocol;
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
try {
Properties props = new Properties();
@@ -132,27 +132,31 @@
// when the code has reach this point, a connection was successfully
// established
// so we need to update the last_seen attribute for the server
- Format formatter = null;
- formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- Date date = new Date(System.currentTimeMillis());
- String currentTime = formatter.format(date);
-
- Connection conn = DBManager.createConnection();
- try {
- Statement stmt = conn.createStatement();
- stmt.executeUpdate("UPDATE SERVERS SET LAST_SEEN = '" + currentTime
- + "' WHERE IP='" + ip + "'");
- } catch (Exception e) {
- throw e;
- } finally {
- try {
- if (conn != null) {
- conn.close();
- }
- } catch (Exception e) {
+// Format formatter = null;
+// formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+// Date date = new Date(System.currentTimeMillis());
+// String currentTime = formatter.format(date);
+
+// Connection conn = DBManager.createConnection();
+// try {
+// Statement stmt = conn.createStatement();
+// stmt.executeUpdate("UPDATE SERVERS SET LAST_SEEN = '" + currentTime
+// + "' WHERE IP='" + ip + "'");
+// } catch (Exception e) {
+// throw e;
+// } finally {
+// try {
+// if (conn != null) {
+// conn.close();
+// }
+// } catch (Exception e) {
+//
+// }
+// }
+ }
- }
- }
+ private boolean isEjbProtocol() {
+ return "EJB".equals(protocol);
}
/**
@@ -162,7 +166,7 @@
* If the connection to the MRC-Server fails
*/
public Long getSnapshotDuration() throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getSnapshotDuration();
@@ -185,7 +189,7 @@
HashMap<String, ArrayList<String>> DataNameList = new HashMap<String, ArrayList<String>>();
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
try {
DataNameList = mrc.getAllSnapshotStatAttributes();
@@ -227,7 +231,7 @@
public ArrayList<HashMap<String, HashMap<String, Object>>> getSnapshots(
int snapCount, int skipCount) throws Exception {
ArrayList<HashMap<String, HashMap<String, Object>>> snapshotList = null;
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
snapshotList = mrc.fetchSnapshotData(snapCount, skipCount);
@@ -376,7 +380,7 @@
String statsName, int snapCount, int skipCount, boolean showArchive)
throws Exception {
TreeMap<Long, Long> snapshotList = null;
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
snapshotList = mrc.getSpecificStatistics(mbeanName, statsName,
snapCount, skipCount, showArchive);
@@ -440,7 +444,7 @@
int snapCount = 1;
int skipCount = 1;
ArrayList<HashMap<String, HashMap<String, Object>>> snapshotList = null;
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
snapshotList = mrc.fetchSnapshotData(snapCount, skipCount);
@@ -464,7 +468,7 @@
* If the connection to the MRC-Server fails
*/
public boolean stopSnapshotThread() throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.stopSnapshot();
@@ -480,7 +484,7 @@
* If the connection to the MRC-Server fails
*/
public boolean startSnapshotThread(long time) throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.startSnapshot(time);
@@ -493,7 +497,7 @@
public int isSnapshotRunning() {
Integer running = 0;
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
try {
if (mrc.isSnapshotRunning())
@@ -516,7 +520,7 @@
@SuppressWarnings("unchecked")
public Set<String> getAllMbeanNames() throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getAllMBeanNames();
@@ -528,7 +532,7 @@
@SuppressWarnings("unchecked")
public Set<String> getStatisticsProviderBeanNames() throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getStatisticsProviderMBeanNames();
@@ -542,7 +546,7 @@
@SuppressWarnings("unchecked")
public HashMap<String, ArrayList<String>> getAllSnapshotStatAttributes()
throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getAllSnapshotStatAttributes();
@@ -555,7 +559,7 @@
@SuppressWarnings("unchecked")
public Set<String> getTrackedBeans() throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getTrackedMBeans();
@@ -718,7 +722,7 @@
@SuppressWarnings("unchecked")
public boolean stopTrackingMbean(String MBean) throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
mrc.removeMBeanForSnapshot(MBean);
@@ -734,7 +738,7 @@
@SuppressWarnings("unchecked")
public boolean startTrackingMbean(String MBean) throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
mrc.addMBeanForSnapshot(MBean);
@@ -749,7 +753,7 @@
@SuppressWarnings("unchecked")
public HashMap<String, Long> getStats(String MBean) throws Exception {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return mrc.getStats(MBean);
@@ -761,7 +765,7 @@
}
public void setSnapshotDuration(long duration) {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
mrc.setSnapshotDuration(new Long(duration));
@@ -779,7 +783,7 @@
}
public int getSnapshotRetention() {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
return Integer.parseInt(mrc.getSnapshotRetention());
@@ -796,7 +800,7 @@
}
public void setSnapshotRetention(int duration) {
- if (Protocol == 1) {
+ if (isEjbProtocol()) {
mrc.setSnapshotRetention(duration);