geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r755280 - /geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java
Date Tue, 17 Mar 2009 15:27:32 GMT
Author: gawor
Date: Tue Mar 17 15:27:31 2009
New Revision: 755280

URL: http://svn.apache.org/viewvc?rev=755280&view=rev
Log:
Relax schema to support monitoring of multiple servers running on the same host. Patch from
Ashish Jain (GERONIMO-4588)

Modified:
    geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java?rev=755280&r1=755279&r2=755280&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/util/DBManager.java
Tue Mar 17 15:27:31 2009
@@ -112,14 +112,16 @@
                                 + "server_id   INTEGER PRIMARY KEY NOT NULL GENERATED ALWAYS
AS IDENTITY (START WITH 0, INCREMENT BY 1),"
                                 + "enabled     SMALLINT DEFAULT 1 NOT NULL,"
                                 + "name        VARCHAR(128) DEFAULT NULL,"
-                                + "ip          VARCHAR(128) UNIQUE NOT NULL,"
+                                + "ip          VARCHAR(128) NOT NULL,"
                                 + "port        INTEGER NOT NULL,"
                                 + "protocol    INTEGER DEFAULT 1 NOT NULL,"
                                 + "username    VARCHAR(128) NOT NULL,"
                                 + "password    VARCHAR(1024) NOT NULL,"
                                 + "added       TIMESTAMP NOT NULL,"
                                 + "modified    TIMESTAMP NOT NULL,"
-                                + "last_seen   TIMESTAMP NOT NULL" + ")");
+                                + "last_seen   TIMESTAMP NOT NULL,"
+                                + "CONSTRAINT  UNQ_IP_PORT UNIQUE(ip,port)"
+                                + ")");
                 pStmt.executeUpdate();
             }
 //            pStmt = con



Mime
View raw message