geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akulshresh...@apache.org
Subject svn commit: r603235 - /geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java
Date Tue, 11 Dec 2007 13:18:58 GMT
Author: akulshreshtha
Date: Tue Dec 11 05:18:57 2007
New Revision: 603235

URL: http://svn.apache.org/viewvc?rev=603235&view=rev
Log:
GERONIMO-3687 Remove default data from Monitoring console database MonitoringClientDB.

Modified:
    geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java?rev=603235&r1=603234&r2=603235&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java
(original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/util/DBManager.java
Tue Dec 11 05:18:57 2007
@@ -27,8 +27,6 @@
 import javax.naming.NamingException;
 import javax.sql.DataSource;
 
-import org.apache.geronimo.util.EncryptionManager;
-
 public class DBManager
 {
     private static Connection con         = null;
@@ -160,91 +158,6 @@
             pStmt = con.prepareStatement("CREATE TABLE views_graphs("
                     + "view_id     INTEGER NOT NULL,"
                     + "graph_id     INTEGER NOT NULL)");
-            pStmt.executeUpdate();
-            String password = EncryptionManager.encrypt("manager");
-            pStmt = con
-                    .prepareStatement("INSERT INTO servers VALUES(DEFAULT, DEFAULT, 'Local
host', '127.0.0.1', 'system', '"+password+"', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO graphs VALUES("
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "'TomcatWebBytesSentSecond60Min',"
-                            + "'KiloBytes sent per second from the Tomcat Web Connector',"
-                            + "DEFAULT,"
-                            + "'geronimo:J2EEServer=geronimo,ServiceModule=org.apache.geronimo.configs/tomcat6/2.1-SNAPSHOT/car,j2eeType=GBean,name=TomcatWebConnector',"
-                            + "'D'," + "'Bytes Sent'," + "'/1024/'," + "'D',"
-                            + "'time'," + "'Tomcat Web KBytes/Sec Sent',"
-                            + "'KBps'," + "500.0," + "1024.0," + "DEFAULT,"
-                            + "DEFAULT," + "CURRENT_TIMESTAMP,"
-                            + "CURRENT_TIMESTAMP,0," + "CURRENT_TIMESTAMP" + ")");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO graphs VALUES("
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "'TomcatWebBytesReceivedSecond60Min',"
-                            + "'KiloBytes received per second from the Tomcat Web Connector',"
-                            + "DEFAULT,"
-                            + "'geronimo:J2EEServer=geronimo,ServiceModule=org.apache.geronimo.configs/tomcat6/2.1-SNAPSHOT/car,j2eeType=GBean,name=TomcatWebConnector',"
-                            + "'D'," + "'Bytes Received'," + "'/1024/',"
-                            + "'D'," + "'time',"
-                            + "'Tomcat Web KBytes/Sec Received'," + "'KBps',"
-                            + "500.0," + "1024.0," + "DEFAULT," + "DEFAULT,"
-                            + "CURRENT_TIMESTAMP," + "CURRENT_TIMESTAMP,0,"
-                            + "CURRENT_TIMESTAMP" + ")");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO graphs VALUES("
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "'TomcatWebRequestTimeSecond60Min',"
-                            + "'Request processing time over time from the Tomcat Web Connector',"
-                            + "DEFAULT,"
-                            + "'geronimo:J2EEServer=geronimo,ServiceModule=org.apache.geronimo.configs/tomcat6/2.1-SNAPSHOT/car,j2eeType=GBean,name=TomcatWebConnector',"
-                            + "'D'," + "'Request Time CurrentTime'," + "'/',"
-                            + "'D'," + "'time',"
-                            + "'Tomcat Request Time/Second',"
-                            + "'RequestTime'," + "500.0," + "1024.0,"
-                            + "DEFAULT," + "DEFAULT," + "CURRENT_TIMESTAMP,"
-                            + "CURRENT_TIMESTAMP,0," + "CURRENT_TIMESTAMP" + ")");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO graphs VALUES("
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "DEFAULT,"
-                            + "'TomcatWebErrorCountSecond60Min',"
-                            + "'Error count over time from the Tomcat Web Connector',"
-                            + "DEFAULT,"
-                            + "'geronimo:J2EEServer=geronimo,ServiceModule=org.apache.geronimo.configs/tomcat6/2.1-SNAPSHOT/car,j2eeType=GBean,name=TomcatWebConnector',"
-                            + "'D'," + "'Error Count'," + "'/'," + "'D',"
-                            + "'time'," + "'Error Count/Sec'," + "'Errors',"
-                            + "500.0," + "1024.0," + "DEFAULT," + "DEFAULT,"
-                            + "CURRENT_TIMESTAMP," + "CURRENT_TIMESTAMP,0,"
-                            + "CURRENT_TIMESTAMP" + ")");
-            pStmt.executeUpdate();
-            pStmt = con.prepareStatement("INSERT INTO views VALUES("
-                    + "DEFAULT," + "DEFAULT,"
-                    + "'Tomcat Web Connector 60 mins',"
-                    + "'Tomcat Web Connector 60 minute graphs'," + "4,"
-                    + "CURRENT_TIMESTAMP," + "CURRENT_TIMESTAMP)");
-
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO views_graphs VALUES(0,0)");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO views_graphs VALUES(0,1)");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO views_graphs VALUES(0,2)");
-            pStmt.executeUpdate();
-            pStmt = con
-                    .prepareStatement("INSERT INTO views_graphs VALUES(0,3)");
             pStmt.executeUpdate();
             success = true;
         }



Mime
View raw message