|
From: <jma...@rh...> - 2009-01-29 23:51:28
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [2835] [RHQ-1436] - report current raw table, next rotatoin time, and some database metadata on the admin>server configuration section; </title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>2835</dd> <dt>Author</dt> <dd>jmarques</dd> <dt>Date</dt> <dd>2009-01-29 17:51:24 -0600 (Thu, 29 Jan 2009)</dd> </dl> <h3>Log Message</h3> <pre>[RHQ-1436] - report current raw table, next rotatoin time, and some database metadata on the admin>server configuration section; </pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappadminAdminHomejsp">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/AdminHome.jsp</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappadminconfigEditServerConfigFormjsp">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/config/EditServerConfigForm.jsp</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappfilteredWEBINFclassesApplicationResourcesproperties">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseservermeasurementutilMeasurementDataManagerUtilityjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/util/MeasurementDataManagerUtility.java</a></li> </ul> <h3>Added Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverutilSystemInformationjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/SystemInformation.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappadminAdminHomejsp"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/AdminHome.jsp (2834 => 2835)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/AdminHome.jsp 2009-01-29 20:35:47 UTC (rev 2834) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/AdminHome.jsp 2009-01-29 23:51:24 UTC (rev 2835) </span><span class="lines">@@ -22,7 +22,6 @@ </span><span class="cx"> <tr> <td width="20%" class="BlockLabel"><fmt:message key="admin.home.Users"/></td> <td width="30%" class="BlockContent"><html:link page="/admin/user/UserAdmin.do?mode=list"><fmt:message key="admin.home.ListUsers"/></html:link></td> </span><span class="rem">- </span><span class="cx"> <td width="20%" class="BlockLabel"><fmt:message key="admin.home.Roles"/></td> <td width="30%" class="BlockContent"><html:link page="/admin/role/RoleAdmin.do?mode=list"><fmt:message key="admin.home.ListRoles"/></html:link></td> </tr> </span><span class="lines">@@ -32,9 +31,6 @@ </span><span class="cx"> <td width="20%" class="BlockLabel">&nbsp;</td> <td width="30%" class="BlockContent"><html:link page="/admin/role/RoleAdmin.do?mode=new"><fmt:message key="admin.home.NewRole"/></html:link></td> </tr> </span><span class="rem">- <tr> - <td colspan="4" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> <!-- / --> </span><span class="lines">@@ -78,9 +74,6 @@ </span><span class="cx"> <td width="30%" class="BlockContent"><html:link page="/rhq/admin/largeenv.xhtml"><fmt:message key="admin.home.LargeEnvironmentLink"/></html:link></td> </tr> --%> </span><span class="rem">- <tr> - <td colspan="2" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> </hq:authorization> <!-- / --> </span><span class="lines">@@ -106,9 +99,6 @@ </span><span class="cx"> <td width="20%" class="BlockLabel"></td> <td width="30%" class="BlockContent"><html:link page="/rhq/content/listChannels.xhtml"><fmt:message key="admin.home.Content.ListChannels"/></html:link></td> </tr> </span><span class="rem">- <tr> - <td colspan="2" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> </hq:authorization> <!-- / --> </span><span class="lines">@@ -125,10 +115,6 @@ </span><span class="cx"> <!-- HIGH AVAILABILITY --> <table width="100%" cellpadding="0" cellspacing="0" border="0"> </span><span class="rem">- <tr> - <td width="20%" class="BlockLabel">Server Timezone:</td> - <td width="30%" class="BlockContent"><%= java.util.TimeZone.getDefault().getDisplayName()%></td> - </tr> </span><span class="cx"> <tr> <td width="20%" class="BlockLabel"></td> <td width="30%" class="BlockContent"><html:link page="/rhq/ha/listServers.xhtml"><fmt:message key="admin.home.Ha.ListServers"/></html:link></td> </span><span class="lines">@@ -145,9 +131,6 @@ </span><span class="cx"> <td width="20%" class="BlockLabel"></td> <td width="30%" class="BlockContent"><html:link page="/rhq/ha/listPartitionEvents.xhtml"><fmt:message key="admin.home.Ha.ListPartitionEvents"/></html:link></td> </tr> </span><span class="rem">- <tr> - <td colspan="2" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> </hq:authorization> <!-- / --> </span><span class="lines">@@ -171,9 +154,6 @@ </span><span class="cx"> <td width="20%" class="BlockLabel"></td> <td width="30%" class="BlockContent"><html:link page="/agentupdate/download"><fmt:message key="admin.home.AgentUpdateBinary.download"/></html:link></td> </tr> </span><span class="rem">- <tr> - <td colspan="2" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> <!-- / --> </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappadminconfigEditServerConfigFormjsp"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/config/EditServerConfigForm.jsp (2834 => 2835)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/config/EditServerConfigForm.jsp 2009-01-29 20:35:47 UTC (rev 2834) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/admin/config/EditServerConfigForm.jsp 2009-01-29 23:51:24 UTC (rev 2835) </span><span class="lines">@@ -30,9 +30,13 @@ </span><span class="cx"> </logic:messagesPresent> <!-- BASE SERVER CONFIG TITLE --> </span><span class="add">+ <tr> + <td colspan="4" class="BlockHeader"> </span><span class="cx"> <tiles:insert definition=".header.tab"> <tiles:put name="tabKey" value="admin.settings.BaseConfigTab"/> </tiles:insert> </span><span class="add">+ </td> + </tr> </span><span class="cx"> <!-- / --> <!-- BASE SERVER CONFIG CONTENTS --> </span><span class="lines">@@ -106,9 +110,6 @@ </span><span class="cx"> <td class="BlockLabel"></td> <td class="BlockContent"></td> </tr> </span><span class="rem">- <tr> - <td colspan="4" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> <!-- / --> <!-- DATA MANAGER CONFIG TITLE --> </span><span class="lines">@@ -448,9 +449,6 @@ </span><span class="cx"> <td class="BlockContent"></td> </tr> </span><span class="rem">- <tr> - <td colspan="4" class="BlockBottomLine"><html:img page="/images/spacer.gif" width="1" height="1" border="0"/></td> - </tr> </span><span class="cx"> </table> <!-- BASELINE CONFIG TITLE --> </span><span class="lines">@@ -566,5 +564,131 @@ </span><span class="cx"> </td> </tr> </span><span class="add">+<!-- SYSTEM-WIDE TITLE --> + <tr> + <td colspan="4" class="BlockHeader"> +<tiles:insert definition=".header.tab"> + <tiles:put name="tabKey" value="admin.settings.SystemTab"/> +</tiles:insert> + </td> + </tr> +<!-- / --> + +<% + + org.rhq.enterprise.server.util.SystemInformation info = org.rhq.enterprise.server.util.SystemInformation.getInstance(); + +%> +<!-- SYSTEM-WIDE CONTENTS --> +<table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.TimeZone"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= java.util.TimeZone.getDefault().getDisplayName()%></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.DatabaseURL"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= info.getDatabaseConnectionURL() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.DatabaseProductName"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= info.getDatabaseProductName() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.DatabaseProductVersion"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= info.getDatabaseProductVersion() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.DatabaseDriverName"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= info.getDatabaseDriverName() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.DatabaseDriverVersion"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= info.getDatabaseDriverVersion() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> + <tr> + <td width="20%" class="BlockLabel"><fmt:message key="admin.settings.System.RawTable"/></td> + <td width="30%" class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= org.rhq.enterprise.server.measurement.util.MeasurementDataManagerUtility.getCurrentRawTable() %></td> + </tr> + </table> + </td> + <td width="20%" class="BlockLabel"></td> + <td width="30%" class="BlockContent"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td nowrap="nowrap" class="BlockContent" colspan="2"> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td class="BlockLabel"><fmt:message key="admin.settings.System.RotationTime"/></td> + <td class="BlockLabel"> + <table cellpadding="0" cellspacing="4" border="0"> + <tr> + <td nowrap="nowrap" align="left"><%= org.rhq.enterprise.server.measurement.util.MeasurementDataManagerUtility.getNextRotationTime() %></td> + </tr> + </table> + </td> + <td class="BlockLabel"></td> + <td class="BlockContent"></td> + </tr> +<!-- / --> + + + + + </span><span class="cx"> </table> <!-- / --> </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappfilteredWEBINFclassesApplicationResourcesproperties"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties (2834 => 2835)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties 2009-01-29 20:35:47 UTC (rev 2834) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties 2009-01-29 23:51:24 UTC (rev 2835) </span><span class="lines">@@ -559,9 +559,19 @@ </span><span class="cx"> admin.home.LicensePlatformLimit=Platforms Limit: # ADMIN.SETTINGS </span><span class="add">+admin.settings.TimeZone=Server Timezone: </span><span class="cx"> admin.settings.EditServerConfig.Title=${product.shortName} Edit ${product.shortName} Server Settings admin.settings.EditServerConfig.PageTitle=Edit ${product.shortName} Server Settings </span><span class="add">+admin.settings.SystemTab=${product.shortName} General System Information +admin.settings.System.RawTable=Current Raw Table: +admin.settings.System.RotationTime=Next Rotation: +admin.settings.System.DatabaseURL=Database Connection URL: +admin.settings.System.DatabaseProductName=Database Product Name: +admin.settings.System.DatabaseProductVersion=Database Product Version: +admin.settings.System.DatabaseDriverName=Database Driver Name: +admin.settings.System.DatabaseDriverVersion=Database Driver Version: + </span><span class="cx"> admin.settings.RestartNote=<b>NOTE:</b> Changes to purge intervals require a server restart. admin.settings.EmailConfigTab=${product.shortName} Email Configuration Properties admin.settings.BaseConfigTab=${product.shortName} General Configuration Properties </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseservermeasurementutilMeasurementDataManagerUtilityjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/util/MeasurementDataManagerUtility.java (2834 => 2835)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/util/MeasurementDataManagerUtility.java 2009-01-29 20:35:47 UTC (rev 2834) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/util/MeasurementDataManagerUtility.java 2009-01-29 23:51:24 UTC (rev 2835) </span><span class="lines">@@ -24,11 +24,13 @@ </span><span class="cx"> import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; </span><span class="add">+import java.text.DateFormat; </span><span class="cx"> import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; </span><span class="add">+import java.util.Date; </span><span class="cx"> import java.util.List; import java.util.Properties; </span><span class="lines">@@ -169,6 +171,26 @@ </span><span class="cx"> return TABLE_PREFIX + nf.format((tableIndex + 1) % (TABLE_COUNT)); } </span><span class="add">+ public static String getCurrentRawTable() { + long now = System.currentTimeMillis(); + long tableIndex = getTableIndex(now); + return TABLE_PREFIX + nf.format((tableIndex + 1) % (TABLE_COUNT)); + } + + public static String getNextRotationTime() { + long now = System.currentTimeMillis(); + long day = now / MILLISECONDS_PER_DAY; + long timeOfDay = now - (day * MILLISECONDS_PER_DAY); + + long remaining = MILLESECONDS_PER_TABLE - timeOfDay; + long nextRotation = now + remaining; + if (nextRotation < now) { + nextRotation += MILLESECONDS_PER_TABLE; + } + + return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL).format(new Date(nextRotation)); + } + </span><span class="cx"> private static int getTableIndex(long time) { long day = time / MILLISECONDS_PER_DAY; long timeOfDay = time - (day * MILLISECONDS_PER_DAY); </span><span class="lines">@@ -612,6 +634,7 @@ </span><span class="cx"> } public static void main(String[] args) throws Exception { </span><span class="add">+ System.out.println(getNextRotationTime()); </span><span class="cx"> // Class.forName("org.postgresql.Driver"); // Connection c = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432","jon","jon"); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverutilSystemInformationjava"></a> <div class="addfile"><h4>Added: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/SystemInformation.java (0 => 2835)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/SystemInformation.java (rev 0) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/SystemInformation.java 2009-01-29 23:51:24 UTC (rev 2835) </span><span class="lines">@@ -0,0 +1,114 @@ </span><span class="add">+/* + * RHQ Management Platform + * Copyright (C) 2005-2008 Red Hat, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +package org.rhq.enterprise.server.util; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.rhq.core.util.jdbc.JDBCUtil; + +/** + * @author Joseph Marques + */ +public final class SystemInformation { + + private final Log log = LogFactory.getLog(SystemInformation.class); + + private Map<Property, String> properties; + + public enum Property { + DATABASE_CONNECTION_URL, // + DATABASE_PRODUCT_NAME, // + DATABASE_PRODUCT_VERSION, // + DATABASE_DRIVER_NAME, // + DATABASE_DRIVER_VERSION; + } + + private SystemInformation() { + DataSource ds = null; + Connection conn = null; + try { + ds = LookupUtil.getDataSource(); + conn = ds.getConnection(); + DatabaseMetaData metadata = conn.getMetaData(); + + String url = metadata.getURL(); + String productName = metadata.getDatabaseProductName(); + String productVersion = metadata.getDatabaseProductVersion(); + String driverName = metadata.getDriverName(); + String driverVersion = metadata.getDriverVersion(); + + Map<Property, String> values = new HashMap<Property, String>(); + values.put(Property.DATABASE_CONNECTION_URL, url); + values.put(Property.DATABASE_PRODUCT_NAME, productName); + values.put(Property.DATABASE_PRODUCT_VERSION, productVersion); + values.put(Property.DATABASE_DRIVER_NAME, driverName); + values.put(Property.DATABASE_DRIVER_VERSION, driverVersion); + properties = Collections.unmodifiableMap(values); + + } catch (Exception e) { + log.error("Could not load properties for " + SystemInformation.class.getSimpleName()); + } finally { + if (properties == null) { + Map<Property, String> values = new HashMap<Property, String>(); + for (Property prop : Property.values()) { + values.put(prop, "Could not determine"); + } + properties = Collections.unmodifiableMap(values); + } + JDBCUtil.safeClose(conn); + } + } + + public static SystemInformation getInstance() { + return new SystemInformation(); + } + + public Map<Property, String> getProperties(Property property) { + return properties; + } + + public String getDatabaseConnectionURL() { + return properties.get(Property.DATABASE_CONNECTION_URL); + } + + public String getDatabaseProductName() { + return properties.get(Property.DATABASE_PRODUCT_NAME); + } + + public String getDatabaseProductVersion() { + return properties.get(Property.DATABASE_PRODUCT_VERSION); + } + + public String getDatabaseDriverName() { + return properties.get(Property.DATABASE_DRIVER_NAME); + } + + public String getDatabaseDriverVersion() { + return properties.get(Property.DATABASE_DRIVER_VERSION); + } +} </span><span class="cx">Property changes on: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/SystemInformation.java ___________________________________________________________________ </span></pre></div> <a id="svnmimetype"></a> <div class="addfile"><h4>Added: svn:mime-type ( => )</h4> <pre class="diff"> <span class="info"> </span></pre> </div> </div> </body> </html> |