[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit eab921b5d519f99786bf6363e4e4deedb64bd607
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 12 14:37:59 2011 -0400
Fix a small merge issue.
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index 1429e3c..c98b4b3 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -11,7 +11,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<!-- support internationalized characters -->
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>RHQ Core Application</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
13 years, 1 month
[rhq] Branch 'release-4.0.0' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 19 ++++++++----
1 file changed, 14 insertions(+), 5 deletions(-)
New commits:
commit b27171174d8671c0484a48d39de65aaf5cf7a89e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 12 14:15:58 2011 -0400
[BZ 703252 - IE (IE7, IE8) unable to load CoreGUI]
Revert the use of DOCTYPE as "standards" mode causes various issues in
several browsers. This is basically due to the fact that SmartGWT codes
for browser's native "quirks" behavior. As such SmartGWT is more
predictable when avoiding "standards" modes. But we still had a need to
direct IE in some way to give us the behavior we want. Todo this we add the
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
directive to our initializing html (CoreGUI.html). This instructs IE to
emulate IE7 quirks mode. In effect, this means that if our code looks good
with IE7 it should continue to work well even if users upgrade to IE8, IE9,
etc... It also seems to provide enough guidance to IE to get perform the
proper loading, assuming we build the "ie6" gwt.userAgent. And it gets
around a SmartGWT tree rendering issue with IE8 modes.
Since this is ignored by non-IE browsers they will continue to run in their
own quirks mode, thus avoiding issues like BZ 703515, which is a regression
brought about by the original DOCTYPE approach.
Alternatively,
Conflicts:
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index 5432ecb..1429e3c 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -1,5 +1,18 @@
<html>
<head>
+ <!-- this forces us to emulate IE7 "quirks" mode regardless of IE browser version. It:
+ 1) Follows the SmartGWT recommendation of not declaring a DOCTYPE and instead using these meta elements.
+ 2) solves initial app load issues that we experienced on some XP and Vista flavors.
+ 3) avoids an IE8/SmartGWT issue regarding poor tree rendering (unindented, vertical gaps).
+
+ Note, when building the app, you must include the "ie6" gwt.userAgent since we're emulating IE7 (which
+ requires the "ie6" userAgent.
+ -->
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
+
+ <!-- support internationalized characters -->
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+
<title>RHQ Core Application</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link rel="apple-touch-icon" href="/images/favicon.png" />
@@ -7,11 +20,6 @@
<script type="text/javascript">
var isomorphicDir = "org.rhq.enterprise.gui.coregui.CoreGUI/sc/";
</script>
- <!--<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
- <script type="text/javascript" src="js/jquery.sparkline-1.6.js"></script>-->
-
- <!-- support internationalized characters -->
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="CoreGUI.css">
<link rel="stylesheet" href="css/search.css">
@@ -25,6 +33,7 @@
</style>
</head>
<body>
+
<script type="text/javascript" language="javascript"
src="org.rhq.enterprise.gui.coregui.CoreGUI/org.rhq.enterprise.gui.coregui.CoreGUI.nocache.js"></script>
13 years, 1 month
[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 20 ++++++++----
1 file changed, 14 insertions(+), 6 deletions(-)
New commits:
commit be6c71ed2e27124addb6abb68526b66834dbaae1
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 12 14:09:44 2011 -0400
[BZ 703252 - IE (IE7, IE8) unable to load CoreGUI]
Revert the use of DOCTYPE as "standards" mode causes various issues in
several browsers. This is basically due to the fact that SmartGWT codes
for browser's native "quirks" behavior. As such SmartGWT is more
predictable when avoiding "standards" modes. But we still had a need to
direct IE in some way to give us the behavior we want. Todo this we add the
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
directive to our initializing html (CoreGUI.html). This instructs IE to
emulate IE7 quirks mode. In effect, this means that if our code looks good
with IE7 it should continue to work well even if users upgrade to IE8, IE9,
etc... It also seems to provide enough guidance to IE to get perform the
proper loading, assuming we build the "ie6" gwt.userAgent. And it gets
around a SmartGWT tree rendering issue with IE8 modes.
Since this is ignored by non-IE browsers they will continue to run in their
own quirks mode, thus avoiding issues like BZ 703515, which is a regression
brought about by the original DOCTYPE approach.
Alternatively,
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index 5713c87..1429e3c 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -1,6 +1,18 @@
-<!doctype html>
<html>
<head>
+ <!-- this forces us to emulate IE7 "quirks" mode regardless of IE browser version. It:
+ 1) Follows the SmartGWT recommendation of not declaring a DOCTYPE and instead using these meta elements.
+ 2) solves initial app load issues that we experienced on some XP and Vista flavors.
+ 3) avoids an IE8/SmartGWT issue regarding poor tree rendering (unindented, vertical gaps).
+
+ Note, when building the app, you must include the "ie6" gwt.userAgent since we're emulating IE7 (which
+ requires the "ie6" userAgent.
+ -->
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
+
+ <!-- support internationalized characters -->
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+
<title>RHQ Core Application</title>
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link rel="apple-touch-icon" href="/images/favicon.png" />
@@ -8,11 +20,6 @@
<script type="text/javascript">
var isomorphicDir = "org.rhq.enterprise.gui.coregui.CoreGUI/sc/";
</script>
- <!--<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
- <script type="text/javascript" src="js/jquery.sparkline-1.6.js"></script>-->
-
- <!-- support internationalized characters -->
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="CoreGUI.css">
<link rel="stylesheet" href="css/search.css">
@@ -26,6 +33,7 @@
</style>
</head>
<body>
+
<script type="text/javascript" language="javascript"
src="org.rhq.enterprise.gui.coregui.CoreGUI/org.rhq.enterprise.gui.coregui.CoreGUI.nocache.js"></script>
13 years, 1 month
[rhq] etc/agentspawn
by mazz
etc/agentspawn/src/scripts/agentcopy.xml | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
New commits:
commit fc301489b5d3cec0200ff52d3d757ae98b672e3b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu May 12 13:31:34 2011 -0400
support shutting down agent copies on windows
diff --git a/etc/agentspawn/src/scripts/agentcopy.xml b/etc/agentspawn/src/scripts/agentcopy.xml
index 591782d..1d9c819 100644
--- a/etc/agentspawn/src/scripts/agentcopy.xml
+++ b/etc/agentspawn/src/scripts/agentcopy.xml
@@ -253,8 +253,6 @@ RHQ_AGENT_CMDLINE_OPTS="--daemon --pref=${_index} ${_cmdlineopts}"</echo>
<!-- ========== -->
<target name="stop" description="Stops all the agents (not available on Windows).">
- <fail if="iswindows" message="Stopping agents with this script is not supported on Windows"/>
-
<echo>Stopping all agents...</echo>
<foreach param="_index"
list="${agentcopy.agent.spawn.list}"
@@ -275,10 +273,22 @@ RHQ_AGENT_CMDLINE_OPTS="--daemon --pref=${_index} ${_cmdlineopts}"</echo>
<echo>Stopping agent [${_index}] with pid [${_pid}]</echo>
- <exec executable="kill">
- <arg value="-TERM" />
- <arg value="${_pid}" />
- </exec>
+ <if>
+ <os family="windows"/>
+ <then>
+ <exec executable="taskkill.exe">
+ <arg value="/F" />
+ <arg value="/PID" />
+ <arg value="${_pid}" />
+ </exec>
+ </then>
+ <else>
+ <exec executable="kill">
+ <arg value="-TERM" />
+ <arg value="${_pid}" />
+ </exec>
+ </else>
+ </if>
</target>
</project>
13 years, 1 month
[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 2 +-
modules/enterprise/gui/installer-war/src/main/webapp/createdb.jsp | 2 +-
modules/enterprise/gui/installer-war/src/main/webapp/header.jsp | 2 +-
modules/enterprise/gui/installer-war/src/main/webapp/index.html | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/admin/test/agent.jsp | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/admin/test/browser.jsp | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/index.html | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/portal/MainLayout.jsp | 8 ++++----
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/visibility/DashCharts.jsp | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails.xhtml | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request-plain.xhtml | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request.xhtml | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history.xhtml | 2 +-
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails.xhtml | 2 +-
14 files changed, 17 insertions(+), 17 deletions(-)
New commits:
commit 9f926435c6f4e80d65bfae7486de887ccc818aa3
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu May 12 12:15:25 2011 -0400
fix syntax of timed meta Refresh header (remove space after semicolon), so it will work w/ Webkit-based browsers (i.e. Chrome and Safari); use consistence letter case for various meta http headers across portal-war and coregui
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index 1b96d09..5713c87 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="js/jquery.sparkline-1.6.js"></script>-->
<!-- support internationalized characters -->
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="CoreGUI.css">
<link rel="stylesheet" href="css/search.css">
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/createdb.jsp b/modules/enterprise/gui/installer-war/src/main/webapp/createdb.jsp
index 797a5d4..7b00972 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/createdb.jsp
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/createdb.jsp
@@ -14,7 +14,7 @@
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
- <meta http-equiv="Cache-control" content="no-cache" />
+ <meta http-equiv="Cache-Control" content="no-cache" />
</head>
<body>
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/header.jsp b/modules/enterprise/gui/installer-war/src/main/webapp/header.jsp
index df38c2d..c3cb048 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/header.jsp
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/header.jsp
@@ -14,7 +14,7 @@
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
- <meta http-equiv="Cache-control" content="no-cache" />
+ <meta http-equiv="Cache-Control" content="no-cache" />
<%-- we only do our AJAX forwarding to the login page if fully deployed but not on the installer start page --%>
<c:if test="<%= new ServerInformation().isFullyDeployed() && request.getRequestURI().indexOf("installer/start") == -1 %>">
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/index.html b/modules/enterprise/gui/installer-war/src/main/webapp/index.html
index 04a87fa..2b0686c 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/index.html
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/index.html
@@ -6,7 +6,7 @@
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
-<meta http-equiv="Cache-control" content="no-cache" />
+<meta http-equiv="Cache-Control" content="no-cache" />
<script type="text/javascript" language="JavaScript">
<!--
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/agent.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/agent.jsp
index 16242c1..289d812 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/agent.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/agent.jsp
@@ -16,7 +16,7 @@
<%@page import="org.rhq.enterprise.communications.Ping"%>
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title>Test Agent Communications</title>
</head>
<body>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/browser.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/browser.jsp
index a939783..67587db 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/browser.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/admin/test/browser.jsp
@@ -28,7 +28,7 @@
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>EJB3 Entity browser</title>
</head>
<body>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/index.html b/modules/enterprise/gui/portal-war/src/main/webapp/index.html
index 74eaaa5..c3ecd0c 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/index.html
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/index.html
@@ -1,7 +1,7 @@
<html>
<head>
- <meta http-equiv="Refresh" content="0; URL=/coregui/"/>
+ <meta http-equiv="Refresh" content="0;URL=/coregui/"/>
</head>
<body bgcolor="white">
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portal/MainLayout.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portal/MainLayout.jsp
index 2e85aaa..c76bd25 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portal/MainLayout.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portal/MainLayout.jsp
@@ -7,10 +7,10 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<html:html>
<head>
- <meta http-equiv="EXPIRES" content="-1">
- <meta http-equiv="PRAGMA" content="NO-CACHE">
- <meta http-equiv="MAX-AGE" content="0">
- <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
+ <meta http-equiv="Expires" content="-1">
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Max-Age" content="0">
+ <meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" type="text/css" media="screen" href="/css/win.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="/css/layout.css"/>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/visibility/DashCharts.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/visibility/DashCharts.jsp
index 9760f0a..84f4173 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/visibility/DashCharts.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/visibility/DashCharts.jsp
@@ -25,7 +25,7 @@
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
<c:if test="${not empty refreshPeriod}">
- <meta http-equiv="refresh" content="<c:out value='${refreshPeriod}' />">
+ <meta http-equiv="Refresh" content="<c:out value='${refreshPeriod}' />">
</c:if>
<script src="<html:rewrite page="/js/functions.js"/>" type="text/javascript"></script>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails.xhtml
index 6972761..396fad9 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails.xhtml
@@ -28,7 +28,7 @@
<ui:define name="metaHeaders">
<f:verbatim rendered="#{item.status eq 'INPROGRESS'}">
- <meta http-equiv="refresh" content="10"/>
+ <meta http-equiv="Refresh" content="10"/>
</f:verbatim>
</ui:define>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request-plain.xhtml
index 1419931..a897944 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request-plain.xhtml
@@ -19,7 +19,7 @@
<ui:param name="selectedTabName" value="Content.History"/>
<ui:define name="metaHeaders">
- <meta http-equiv="refresh" content="10"/>
+ <meta http-equiv="Refresh" content="10"/>
</ui:define>
<ui:define name="content">
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request.xhtml
index 26ce06d..584d481 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-request.xhtml
@@ -19,7 +19,7 @@
<ui:param name="selectedTabName" value="Content.History"/>
<ui:define name="metaHeaders">
- <meta http-equiv="refresh" content="10"/>
+ <meta http-equiv="Refresh" content="10"/>
</ui:define>
<ui:define name="content">
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history.xhtml
index 18059f2..223774a 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history.xhtml
@@ -19,7 +19,7 @@
<ui:param name="selectedTabName" value="Content.History"/>
<ui:define name="metaHeaders">
- <meta http-equiv="refresh" content="10"/>
+ <meta http-equiv="Refresh" content="10"/>
</ui:define>
<ui:define name="content">
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails.xhtml
index 25cd3a6..0a61d68 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails.xhtml
@@ -28,7 +28,7 @@
<ui:define name="metaHeaders">
<f:verbatim rendered="#{item.status eq 'INPROGRESS'}">
- <meta http-equiv="refresh" content="10" />
+ <meta http-equiv="Refresh" content="10" />
</f:verbatim>
</ui:define>
13 years, 1 month
[rhq] Branch 'as7plugin' - 5 commits - modules/enterprise
by Heiko W. Rupp
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableImgButton.java | 23
modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties | 250 ++++++++++
modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml | 1
modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml | 41 +
5 files changed, 313 insertions(+), 12 deletions(-)
New commits:
commit 99e9fe5029899b1d53481b90ca8577ff9df8ac61
Merge: f751fc8 7d3d67f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu May 12 12:29:20 2011 +0200
Merge branch 'master' into as7plugin
commit 7d3d67fd9e7b766d13f0daf39eaf07d7c625f11b
Merge: c10d876 0a31209
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu May 12 10:22:16 2011 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit c10d8762ef84e49c214e91dcf1eafee51cf2607f
Author: Jijun Liu <lxjijun(a)gmail.com>
Date: Thu May 12 10:13:51 2011 +0200
Chinese Installer messages.
diff --git a/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties
new file mode 100644
index 0000000..06c2191
--- /dev/null
+++ b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties
@@ -0,0 +1,250 @@
+createDatabaseUserTitle=\u521b\u5efa\u6570\u636e\u5e93/\u7528\u6237
+createDatabaseUserHelp=\u5728\u8fd9\u91cc\u8f93\u5165\u7ba1\u7406\u5458\u4fe1\u606f,\u70b9\u51fb\u6309\u94ae\u6765\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u548c\u7528\u6237.
+adminConnectionUrl=DB\u8fde\u63a5URL
+adminUsername=\u6570\u636e\u5e93\u7ba1\u7406\u5458\u540d\u79f0
+adminPassword=\u6570\u636e\u5e93\u7ba1\u7406\u5458\u5bc6\u7801
+experimentalDb=\u5df2\u9009\u7684\u6570\u636e\u5e93\u53ea\u80fd\u7528\u6765\u4f5c\u6f14\u793a\u76ee\u7684.\u4e0d\u5e94\u8be5\u7528\u4e8e\u6b63\u5f0f\u4ea7\u54c1\u4f7f\u7528. \u4f7f\u7528H2\u6216MS SQL\u5c06\u6ca1\u6709\u5b89\u88c5\u652f\u6301.
+createDatabaseNote=\u5982\u679c\u4e0d\u5b58\u5728,\u5c06\u521b\u5efa\u6570\u636e\u5e93/\u7528\u6237
+createDatabaseButton=\u521b\u5efa\u6570\u636e\u5e93
+testDatabaseNote=\u9a8c\u8bc1\u6570\u636e\u5e93\u914d\u7f6e
+testDatabaseButton=\u6d4b\u8bd5\u8fde\u63a5
+existingSchemaQuestion=\u6307\u5b9a\u7684\u6570\u636e\u5e93\u5b58\u5728.\u5c06\u5982\u4f55\u64cd\u4f5c?
+existingSchemaAnswerOverwrite=\u8986\u76d6 (\u8986\u76d6\u5df2\u5b58\u5728\u6570\u636e)
+existingSchemaAnswerUpgrade=\u4fdd\u7559 (\u7ef4\u62a4\u5b58\u5728\u6570\u636e)
+existingSchemaAnswerSkip=\u8df3\u8fc7 (\u4e0d\u505a\u4efb\u4f55\u64cd\u4f5c)
+invalidNumber=\u5c5e\u6027{0}\u662f\u65e0\u6548\u6570\u5b57[{1}]
+invalidBoolean=\u5e03\u5c14\u503c{0}\u5e94\u8be5\u662f'true'\u6216'false'\u800c\u4e0d\u5e94\u662f[{1}]
+invalidString=\u5c5e\u6027{0}\u5fc5\u987b\u8bbe\u7f6e.
+saveFailure=\u4fdd\u5b58\u5c5e\u6027\u5b8c\u5168\u90e8\u7f72\u5931\u8d25 - RHQ\u5c06\u4e0d\u80fd\u6b63\u5e38\u5de5\u4f5c\n\
+\u539f\u56e0: {0}
+errorLabel=\u9519\u8bef
+saveError=\u56e0\u672a\u77e5\u539f\u56e0\u65e0\u6cd5\u4fdd\u5b58\u8bbe\u7f6e.
+invalidDatabaseSettings=\u65e0\u6cd5\u8fde\u63a5\u5230\u7ed9\u5b9a\u6570\u636e\u5e93. \n\
+\u8bf7\u68c0\u67e5\u6570\u636e\u5e93\u914d\u7f6e\u5e76\u4e14\u786e\u8ba4\u6570\u636e\u5e93\u5728\u8fd0\u884c\u4e2d.
+setPropertiesInstructions=\u8fd9\u662fRHQ\u670d\u52a1\u5668\u5b89\u88c5\u7684\u914d\u7f6e\u8bbe\u7f6e. \n\
+\u4f60\u53ef\u4ee5\u6309\u9700\u5b9a\u5236. \u5355\u51fb\u4e0d\u540c\u9009\u9879\u540d\u67e5\u770b\u5e2e\u52a9. \u5bf9\u4e8e\u6807\u8bb0\u4e3a"\u9700\u8981\u91cd\u542f"\u7684\u9009\u9879 \n\
+\u9700\u8981\u91cd\u542f\u624d\u80fd\u751f\u6548. \u6240\u4ee5\u5b89\u88c5\u5b8c\u6210\u540e,\u8981\u9a6c\u4e0a\u91cd\u542f\u670d\u52a1\u5668.
+advancedSettingsInstructions=\u5355\u51fb\u4e0b\u9762\u590d\u9009\u6846\u67e5\u770b\u6807\u51c6\u8bbe\u7f6e\u548c\u9ad8\u7ea7\u8bbe\u7f6e.
+installButtonsText=\u5355\u51fb'\u5b89\u88c5\u4ea7\u54c1'\u5f00\u59cb\u666e\u901a\u5b89\u88c5.\n\
+\u5355\u51fb\u6309\u94ae'\u5d4c\u5165\u5f0f\u5b89\u88c5'\u5c06\u5feb\u901f\u7684\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u6570\u636e\u5e93\u548c\u5d4c\u5165\u7684Agent\u7684\u5b8c\u6574\u73af\u5883.\u5d4c\u5165\u5f0f\u5b89\u88c5\u53ea\u80fd\u7528\u6765\u6f14\u793a\u6216\u8bc4\u4f30!
+orText=-- or --
+saveEmbeddedMode=\u5d4c\u5165\u5f0f\u5b89\u88c5
+databaseSettingsInstructions=\u6570\u636e\u5e93\u914d\u7f6e. \u6240\u6709\u4fe1\u606f\u90fd\u8981\u8f93\u5165. \u4f7f\u7528\u6309\u94ae"\u6d4b\u8bd5\u8fde\u63a5"\u6765\u9a8c\u8bc1\u8bbe\u7f6e.
+installSettingsInstructions= \u5b9a\u4e49\u9700\u8981\u7684\u670d\u52a1\u5668\u4fe1\u606f.
+installSettingsNote1=\u5982\u679c\u5347\u7ea7\u6216\u91cd\u88c5\u8bf7\u5728\u5217\u8868\u4e2d\u9009\u62e9\u6ce8\u518c\u7684\u670d\u52a1\u5668:
+installSettingsNote2=\u5982\u679c\u5b89\u88c5\u4e00\u4e2a\u65b0\u670d\u52a1\u5668\u8bf7\u5728\u4e0b\u9762\u8f93\u5165\u670d\u52a1\u5668\u7aef\u914d\u7f6e:
+serverSettingsInstructions=\u4ee5\u4e0b\u9009\u9879\u90fd\u662f\u5fc5\u987b\u7684.
+save=\u5b89\u88c5\u670d\u52a1\u5668!
+yesString=\u662f
+noString=\u5426
+propertyName=\u5c5e\u6027\u540d
+value=\u503c
+requiresRestart=\u9700\u8981\u91cd\u542f?
+welcomeTitle=\u6b22\u8fce\u4f7f\u7528RHQ!
+welcomeMessage=\u5f00\u59cb\u5b89\u88c5RHQ. \u8fd9\u4e2a\u9875\u9762\u7528\u6765\n\
+\u5b89\u88c5\u914d\u7f6eRHQ\u670d\u52a1\u5668. \n\
+\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e,\u5c06\u53ef\u4ee5\u767b\u5f55\u4f7f\u7528RHQ.
+starting=\u8fdb\u884c\u4e2d,\u8bf7\u7b49\u5f85 ...
+alreadyInstalled=RHQ\u5c06\u8981\u5b89\u88c5!
+alreadyInstalledStartedLink=\u5b8c\u6210!\u70b9\u51fb\u6b64\u5904\u5f00\u59cb!
+startInstallingLink=\u7ee7\u7eed\u5b89\u88c5\u8bf7\u70b9\u51fb\u8fd9\u91cc
+backToSettingsLink=\u8fd4\u56de\u914d\u7f6e\u9875\u9762
+showAdvancedSettings=\u663e\u793a\u9ad8\u7ea7\u9009\u9879
+propertyDatabaseType=\u6570\u636e\u5e93\u7c7b\u578b
+propertyDatabaseTypeHelp=-DatabaseType
+propertyDatabaseConnectionUrl=\u6570\u636e\u5e93\u8fde\u63a5URL
+propertyDatabaseConnectionUrlHelp=-DatabaseConnectionURL
+propertyDatabaseDriverClass=\u6570\u636e\u5e93JDBC\u9a71\u52a8
+propertyDatabaseDriverClassHelp=-DatabaseJDBCDriverClass
+propertyDatabaseXADataSourceClass=\u6570\u636e\u5e93XA\u6570\u636e\u6e90\u7c7b
+propertyDatabaseXADataSourceClassHelp=-DatabaseXADataSourceClass
+propertyDatabaseUserName=\u6570\u636e\u5e93\u7528\u6237\u540d
+propertyDatabaseUserNameHelp=-DatabaseUserName
+propertyDatabasePassword=\u6570\u636e\u5e93\u5bc6\u7801
+propertyDatabasePasswordHelp=-DatabasePassword
+propertyBindAddress=\u670d\u52a1\u5668\u76d1\u542c\u5730\u5740
+propertyBindAddressHelp=-ServerBindAddress
+propertyHttpPort=HTTP\u7aef\u53e3
+propertyHttpPortHelp=-HTTPPort
+propertyHttpsPort=\u5b89\u5168HTTPS\u7aef\u53e3
+propertyHttpsPortHelp=-SecureHTTPSPort
+propertyWebServicePort=Web Service\u7aef\u53e3
+propertyWebServicePortHelp=-WebServicePort
+propertyNamingServicePort=Naming Service\u7aef\u53e3
+propertyNamingServicePortHelp=-NamingServicePort
+propertyNamingServiceRmiPort=Naming Service RMI\u7aef\u53e3
+propertyNamingServiceRmiPortHelp=-NamingServiceRMIPort
+propertyJrmpInvokerRmiPort=JRMP Invoker RMI\u7aef\u53e3
+propertyJrmpInvokerRmiPortHelp=-JRMPInvokerRMIPort
+propertyPooledInvokerRmiPort=Pooled Invoker RMI\u7aef\u53e3
+propertyPooledInvokerRmiPortHelp=-PooledInvokerRMIPort
+propertyAjpPort=AJP\u7aef\u53e3
+propertyAjpPortHelp=-AJPPort
+propertyUnifiedInvokerPort=\u7edf\u4e00Invoker\u7aef\u53e3
+propertyUnifiedInvokerPortHelp=-UnifiedInvokerPort
+propertyAspectDeployerPort=Aspect Deployer\u7aef\u53e3
+propertyAspectDeployerPortHelp=-AspectDeployerPort
+propertyTomcatClientAuthMode=Tomcat\u5ba2\u6237\u7aef\u6388\u6743\u6a21\u5f0f
+propertyTomcatClientAuthModeHelp=-TomcatClientAuthMode
+propertyTomcatAlgorithm=Tomcat Keystore/Truststore\u7b97\u6cd5
+propertyTomcatAlgorithmHelp=-TomcatAlgorithm
+propertyTomcatKeystoreFilename=Tomcat Keystore
+propertyTomcatKeystoreFilenameHelp=-TomcatKeystore
+propertyTomcatKeystorePassword=Tomcat Keystore\u5bc6\u7801
+propertyTomcatKeystorePasswordHelp=-TomcatKeystorePassword
+propertyTomcatKeystoreType=Tomcat Keystore\u7c7b\u578b
+propertyTomcatKeystoreTypeHelp=-TomcatKeystoreType
+propertyTomcatKeystoreAlias=Tomcat Keystore Alias
+propertyTomcatKeystoreAliasHelp=-TomcatKeystoreAlias
+propertyTomcatTruststoreFilename=Tomcat Truststore
+propertyTomcatTruststoreFilenameHelp=-TomcatTruststore
+propertyTomcatTruststorePassword=Tomcat Truststore\u5bc6\u7801
+propertyTomcatTruststorePasswordHelp=-TomcatTruststorePassword
+propertyTomcatTruststoreType=Tomcat Truststore\u7c7b\u578b
+propertyTomcatTruststoreTypeHelp=-TomcatTruststoreType
+propertyTomcatSslProtocol=Tomcat SSL\u534f\u8bae
+propertyTomcatSslProtocolHelp=-TomcatSSLProtocol
+propertyConnectorTransport=\u63a5\u6536Agent\u901a\u4fe1\u4f20\u8f93
+propertyConnectorTransportHelp=-IncomingAgentCommunicationsTransport
+propertyConnectorBindAddress=\u63a5\u6536Agent\u901a\u4fe1\u76d1\u542c\u5730\u5740
+propertyConnectorBindAddressHelp=-IncomingAgentCommunicationsBindAddress
+propertyConnectorBindPort=\u63a5\u6536Agent\u901a\u4fe1\u7aef\u53e3
+propertyConnectorBindPortHelp=-IncomingAgentCommunicationsPort
+propertyConnectorTransportParams=\u63a5\u6536Agent\u901a\u4fe1\u4f20\u8f93\u53c2\u6570
+propertyConnectorTransportParamsHelp=-IncomingAgentCommunicationsTransportParameters
+propertyAgentMulticastDetectorEnabled=\u542f\u7528Agent\u591a\u64ad\u63a2\u6d4b\u5668
+propertyAgentMulticastDetectorEnabledHelp=-AgentMulticastDetectorEnabled
+propertyAgentMulticastDetectorBindAddress=Agent\u591a\u64ad\u63a2\u6d4b\u5668\u76d1\u542c\u5730\u5740
+propertyAgentMulticastDetectorBindAddressHelp=-AgentMulticastDetectorBindAddress
+propertyAgentMulticastDetectorMulticastAddress=Agent \u7ec4\u64ad\u5730\u5740\u591a\u64ad\u63a2\u6d4b\u5668
+propertyAgentMulticastDetectorMulticastAddressHelp=-AgentMulticastDetectorMulticastAddress
+propertyAgentMulticastDetectorPort=Agent\u591a\u64ad\u63a2\u6d4b\u5668\u7aef\u53e3
+propertyAgentMulticastDetectorPortHelp=-AgentMulticastDetectorPort
+propertySecurityServerSecureSocketProtocol=\u63a5\u6536\u5b89\u5168 - \u5b89\u5168Socket\u534f\u8bae
+propertySecurityServerSecureSocketProtocolHelp=-IncomingSecureSocketProtocol
+propertySecurityServerKeystoreFile=\u63a5\u6536\u5b89\u5168 - Keystore\u6587\u4ef6
+propertySecurityServerKeystoreFileHelp=-IncomingKeystoreFile
+propertySecurityServerKeystoreAlgorithm=\u63a5\u6536\u5b89\u5168 - Keystore\u7b97\u6cd5
+propertySecurityServerKeystoreAlgorithmHelp=-IncomingKeystoreAlgorithm
+propertySecurityServerKeystoreType=\u63a5\u6536\u5b89\u5168 - Keystore\u7c7b\u578b
+propertySecurityServerKeystoreTypeHelp=-IncomingKeystoreType
+propertySecurityServerKeystorePassword=\u63a5\u6536\u5b89\u5168 - Keystore\u5bc6\u7801
+propertySecurityServerKeystorePasswordHelp=-IncomingKeystorePassword
+propertySecurityServerKeystoreKeyPassword=\u63a5\u6536\u5b89\u5168 - Keystore Key\u5bc6\u7801
+propertySecurityServerKeystoreKeyPasswordHelp=-IncomingKeystoreKeyPassword
+propertySecurityServerKeystoreAlias=\u63a5\u6536\u5b89\u5168 - Keystore Alias
+propertySecurityServerKeystoreAliasHelp=-IncomingKeystoreAlias
+propertySecurityServerTruststoreFile=\u63a5\u6536\u5b89\u5168 - Truststore\u6587\u4ef6
+propertySecurityServerTruststoreFileHelp=-IncomingTruststoreFile
+propertySecurityServerTruststoreAlgorithm=\u63a5\u6536\u5b89\u5168 - Truststore\u7b97\u6cd5
+propertySecurityServerTruststoreAlgorithmHelp=-IncomingTruststoreAlgorithm
+propertySecurityServerTruststoreType=\u63a5\u6536\u5b89\u5168 - Truststore\u7c7b\u578b
+propertySecurityServerTruststoreTypeHelp=-IncomingTruststoreType
+propertySecurityServerTruststorePassword=\u63a5\u6536\u5b89\u5168 - Truststore\u5bc6\u7801
+propertySecurityServerTruststorePasswordHelp=-IncomingTruststorePassword
+propertySecurityServerClientAuthMode=\u63a5\u6536\u5b89\u5168 - \u5ba2\u6237\u7aef\u6388\u6743\u6a21\u5f0f
+propertySecurityServerClientAuthModeHelp=-IncomingClientAuthenticationMode
+propertySecurityClientSecureSocketProtocol=\u5916\u53d1\u5b89\u5168 - \u5b89\u5168Socket\u534f\u8bae
+propertySecurityClientSecureSocketProtocolHelp=-OutgoingSecureSocketProtocol
+propertySecurityClientKeystoreFile=\u5916\u53d1\u5b89\u5168 - Keystore\u6587\u4ef6
+propertySecurityClientKeystoreFileHelp=-OutgoingKeystoreFile
+propertySecurityClientKeystoreAlgorithm=\u5916\u53d1\u5b89\u5168 - Keystore\u7b97\u6cd5
+propertySecurityClientKeystoreAlgorithmHelp=-OutgoingKeystoreAlgorithm
+propertySecurityClientKeystoreType=\u5916\u53d1\u5b89\u5168 - Keystore\u7c7b\u578b
+propertySecurityClientKeystoreTypeHelp=-OutgoingKeystoreType
+propertySecurityClientKeystorePassword=\u5916\u53d1\u5b89\u5168 - Keystore\u5bc6\u7801
+propertySecurityClientKeystorePasswordHelp=-OutgoingKeystorePassword
+propertySecurityClientKeystoreKeyPassword=\u5916\u53d1\u5b89\u5168 - Keystore Key\u5bc6\u7801
+propertySecurityClientKeystoreKeyPasswordHelp=-OutgoingKeystoreKeyPassword
+propertySecurityClientKeystoreAlias=\u5916\u53d1\u5b89\u5168 - Keystore Alias
+propertySecurityClientKeystoreAliasHelp=-OutgoingKeystoreAlias
+propertySecurityClientTruststoreFile=\u5916\u53d1\u5b89\u5168 - Truststore\u6587\u4ef6
+propertySecurityClientTruststoreFileHelp=-OutgoingTruststoreFile
+propertySecurityClientTruststoreAlgorithm=\u5916\u53d1\u5b89\u5168 - Truststore\u7b97\u6cd5
+propertySecurityClientTruststoreAlgorithmHelp=-OutgoingTruststoreAlgorithm
+propertySecurityClientTruststoreType=\u5916\u53d1\u5b89\u5168 - Truststore\u7c7b\u578b
+propertySecurityClientTruststoreTypeHelp=-OutgoingTruststoreType
+propertySecurityClientTruststorePassword=\u5916\u53d1\u5b89\u5168 - Truststore\u5bc6\u7801
+propertySecurityClientTruststorePasswordHelp=-OutgoingTruststorePassword
+propertySecurityClientServerAuthModeEnabled=\u5916\u53d1\u5b89\u5168 - \u542f\u7528\u670d\u52a1\u5668\u6388\u6743\u6a21\u5f0f
+propertySecurityClientServerAuthModeEnabledHelp=-OutgoingServerAuthenticationModeEnabled
+propertyEmbeddedRHQAgentEnabled=\u542f\u7528\u5d4c\u5165Agent
+propertyEmbeddedRHQAgentEnabledHelp=-EmbeddedRHQAgentEnabled
+propertyEmbeddedRHQAgentName=\u5d4c\u5165Agent\u540d\u79f0
+propertyEmbeddedRHQAgentNameHelp=-EmbeddedRHQAgentName
+propertyEmbeddedRHQAgentDisableNativeSystem=\u5d4c\u5165Agent\u7981\u7528\u672c\u5730\u7cfb\u7edf
+propertyEmbeddedRHQAgentDisableNativeSystemHelp=-EmbeddedRHQAgentDisableNativeSystem
+propertyEmbeddedRHQAgentResetConfiguration=\u5d4c\u5165Agent\u91cd\u7f6e\u914d\u7f6e
+propertyEmbeddedRHQAgentResetConfigurationHelp=-EmbeddedRHQAgentResetConfiguration
+propertyEmailSmtpHost=\u90ae\u4ef6SMTP\u4e3b\u673a\u540d
+propertyEmailSmtpHostHelp=-EmailSMTPHostname
+propertyEmailSmtpPort=\u90ae\u4ef6SMTP\u7aef\u53e3
+propertyEmailSmtpPortHelp=-EmailSMTPPort
+propertyEmailFromAddress=\u53d1\u9001\u90ae\u4ef6\u5730\u5740
+propertyEmailFromAddressHelp=-EmailFromAddress
+propertyOperationTimeout=\u9ed8\u8ba4Operation Invocation\u8d85\u65f6\u65f6\u95f4
+propertyOperationTimeoutHelp=-OperationInvocationDefaultTimeout
+propertyClusterPartitionName=\u96c6\u7fa4 - Partition Name
+propertyClusterPartitionNameHelp=-PartitionName
+propertyClusterPartitionBindAddress=\u96c6\u7fa4 - Partition\u76d1\u542c\u5730\u5740
+propertyClusterPartitionBindAddressHelp=-PartitionBindAddress
+propertyClusterUdpGroup=\u96c6\u7fa4 - Partition UDP Multicast Group IP\u5730\u5740
+propertyClusterUdpGroupHelp=-PartitionUDPMulticastGroupIPAddress
+propertyClusterHaPartitionPort=\u96c6\u7fa4 - Partition UDP\u591a\u64ad\u7aef\u53e3
+propertyClusterHaPartitionPortHelp=-PartitionUDPMulticastPort
+propertyClusterEjb3CachePort=\u96c6\u7fa4 - Partition UDP EJB3\u5b9e\u4f53\u7f13\u5b58\u591a\u64ad\u7aef\u53e3
+propertyClusterEjb3CachePortHelp=-PartitionUDPEJB3EntityCacheMulticastPort
+propertyClusterAlertCachePort=\u96c6\u7fa4 - Partition UDP\u544a\u8b66\u7f13\u5b58\u591a\u64ad\u7aef\u53e3
+propertyClusterAlertCachePortHelp=-PartitionUDPAlertCacheMulticastPort
+propertyClusterUdpLoopback=\u96c6\u7fa4 - Partition UDP\u56de\u73af
+propertyClusterUdpLoopbackHelp=-PartitionUDPLoopback
+propertyClusterHaJndiPort=\u96c6\u7fa4 - HA JNDI\u7aef\u53e3
+propertyClusterHaJndiPortHelp=-HAJNDIPort
+propertyClusterHaJndiRmiPort=\u96c6\u7fa4 - HA JNDI RMI\u7aef\u53e3
+propertyClusterHaJndiRmiPortHelp=-HAJNDIRMIPort
+propertyClusterHaJndiAutoDiscoveryPort=\u96c6\u7fa4 - HA JNDI\u81ea\u52a8\u53d1\u73b0\u7ec4\u7aef\u53e3
+propertyClusterHaJndiAutoDiscoveryPortHelp=-HAJNDIAutoDiscoveryGroupPort
+propertyClusterHaJrmpInvokerRmiPort=\u96c6\u7fa4 - HA JRMP Invoker RMI\u7aef\u53e3
+propertyClusterHaJrmpInvokerRmiPortHelp=-HAJRMPInvokerRMIPort
+propertyClusterHaPooledInvokerPort=\u96c6\u7fa4 - HA Pooled Invoker\u7aef\u53e3
+propertyClusterHaPooledInvokerPortHelp=-HAPooledInvokerPort
+propertyClusterJGroupsUdpIpTtl=\u96c6\u7fa4 - JGroups UDP IP\u5b58\u6d3b\u65f6\u95f4
+propertyClusterJGroupsUdpIpTtlHelp=-JGroupsUDPIPTimeToLive
+propertyConcurrencyLimitWebConns=\u5e76\u53d1\u6570\u9650\u5236 - \u6700\u5927Web\u8fde\u63a5\u6570
+propertyConcurrencyLimitWebConnsHelp=-WebConnections
+propertyConcurrencyLimitGlobal=\u5e76\u53d1\u6570\u9650\u5236 - \u5168\u5c40
+propertyConcurrencyLimitGlobalHelp=-GlobalConcurrencyLimit
+propertyConcurrencyLimitInventoryReport=\u5e76\u53d1\u6570\u9650\u5236 - \u6e05\u5355\u62a5\u8868
+propertyConcurrencyLimitInventoryReportHelp=-InventoryReport
+propertyConcurrencyLimitAvailabilityReport=\u5e76\u53d1\u6570\u9650\u5236 - \u53ef\u7528\u6027\u62a5\u8868
+propertyConcurrencyLimitAvailabilityReportHelp=-AvailabilityReport
+propertyConcurrencyLimitInventorySync=\u5e76\u53d1\u6570\u9650\u5236 - \u6e05\u5355\u540c\u6b65
+propertyConcurrencyLimitInventorySyncHelp=-InventorySynchronization
+propertyConcurrencyLimitContentReport=\u5e76\u53d1\u6570\u9650\u5236 - Content\u62a5\u8868
+propertyConcurrencyLimitContentReportHelp=-ContentReport
+propertyConcurrencyLimitContentDownload=\u5e76\u53d1\u6570\u9650\u5236 - Content\u4e0b\u8f7d
+propertyConcurrencyLimitContentDownloadHelp=-ContentDownload
+propertyConcurrencyLimitMeasurementReport=\u5e76\u53d1\u6570\u9650\u5236 - \u6027\u80fd\u62a5\u8868
+propertyConcurrencyLimitMeasurementReportHelp=-MeasurementReport
+propertyConcurrencyLimitMeasurementScheduleRequest=\u5e76\u53d1\u6570\u9650\u5236 - Measurement Schedule\u8bf7\u6c42
+propertyConcurrencyLimitMeasurementScheduleRequestHelp=-MeasurementScheduleRequest
+introduceHelpDocs=\u60f3\u66f4\u591a\u4e86\u89e3RHQ,\u8bf7\u67e5\u770b\u4e0b\u9762\u7684\u6587\u6863\u94fe\u63a5:
+helpDocRHQServerInstallGuide=\u5b89\u88c5
+helpDocRHQServerInstallGuideLabel=RHQ\u670d\u52a1\u5668\u5b89\u88c5\u6307\u5357
+helpDocRHQGuiConsoleUsersGuide=GUI+Console+Users+Guide
+helpDocRHQGuiConsoleUsersGuideLabel=RHQ GUI Console\u7528\u6237\u6307\u5357
+helpDocRHQServerUsersGuide=Running+the+RHQ+Server
+helpDocRHQServerUsersGuideLabel=RHQ\u670d\u52a1\u5668\u7528\u6237\u6307\u5357
+helpDocRHQAgentUsersGuide=Running+the+RHQ+Agent
+helpDocRHQAgentUsersGuideLabel=RHQ Agent\u7528\u6237\u6307\u5357
+helpDocFaq=FAQ
+helpDocFaqLabel=\u7591\u96be\u89e3\u7b54
+helpDocRHQServerPropParentPage=http://support.rhq-project.org/display/JOPR2/Startup+Properties#ConfiguringtheServer
+newServerSelectItem=\u65b0\u670d\u52a1\u5668
+registeredServersLabel=\u6ce8\u518c\u7684\u670d\u52a1\u5668:
+propertyHighAvailabilityName=\u670d\u52a1\u5668\u540d\u79f0
+propertyHighAvailabilityNameHelp=-ServerName
+propertyMaintenanceModeAtStart=\u542f\u52a8\u7ef4\u62a4\u6a21\u5f0f
+propertyMaintenanceModeAtStartHelp=-MaintenanceModeAtStart
+propertyHighAvailabilityEndpointAddress=\u670d\u52a1\u5668\u516c\u5171\u5730\u5740
+propertyHighAvailabilityAffinityGroup=\u76f8\u4f3c\u7684\u670d\u52a1\u5668\u7ec4\u540d
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
index 9ad7a36..6fd2bb4 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
@@ -58,6 +58,7 @@
<supported-locale>de</supported-locale>
<supported-locale>fr</supported-locale>
<supported-locale>pt</supported-locale>
+ <supported-locale>zh</supported-locale>
</locale-config>
</application>
commit 0a3120904a5b601477819460b8b99817e43256dc
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed May 11 14:57:21 2011 -0400
[BZ 693232] configure AlertManagerBean, AuthorizationManagerBean, and SubjectManagerBean to use the strict max instance pool since they also are called (indirectly) by AlertConditionConsumerBean (part of fix for https://bugzilla.redhat.com/show_bug.cgi?id=693232)
diff --git a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
index 8892da8..b7c5c66 100644
--- a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
+++ b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
@@ -9,11 +9,12 @@
<!--
The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
- AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
- indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
- the default SLSB pool impl (ThreadlocalPool) would cause a new instance of this SLSB to be created
- every time it was invoked by AlertConditionConsumerBean. This would be bad if only because an existing instance would
- not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+ AlertDefinitionManagerBean, AlertManagerBean, AuthorizationManagerBean, CachedConditionManagerBean, and
+ SubjectManager SLSB's are all invoked, either directly or indirectly, by the AlertConditionConsumerBean MDB.
+ Since MDB invocations are always done in new threads, using the default SLSB pool impl (ThreadlocalPool) would
+ cause a new instance of these SLSB's to be created every time they were invoked by AlertConditionConsumerBean.
+ This would be bad if only because existing instances would
+ not be reused, but it is really bad because the instances would also never get destroyed, causing heap space to
gradually leak until the Server eventually ran out of memory. Hence, we must use a StrictMaxPool, which
will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because lots of alert
definitions could result in many concurrent calls to AlertConditionConsumerBean, and because most of these
@@ -21,7 +22,7 @@
minimize the chances of AlertConditionConsumerBean invocations, which are the most critical, from having to
block and potentially getting backed up in the queue. We set the pool timeout extremely high to essentially
prevent queued callers from timing out. Note, MDB's are configured in ejb3-interceptors-aop.xml to use a strict
- max pool with a max of 15 and a timeout of 10000, so AlertConditionConsumerBean could become a bottleneck for
+ max pool with a max of 15 and a timeout of 10000, so AlertConditionConsumerBean might become a bottleneck for
systems with a lot of alerts defined. (ips, 05/10/11)
For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 .
@@ -64,6 +65,24 @@
</session>
<session>
+ <ejb-name>AlertManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>AuthorizationManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
<ejb-name>CachedConditionManagerBean</ejb-name>
<pool-config>
<pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
@@ -72,6 +91,15 @@
</pool-config>
</session>
+ <session>
+ <ejb-name>SubjectManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
<!--
The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
@@ -138,4 +166,3 @@
</enterprise-beans>
</jboss>
-
commit 8069e7fe667aaca09d61489ac2b5ca06570564a1
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Tue May 10 13:19:19 2011 -0400
modifying floating edit fields in templates to be locatable for selenium automation.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
index fecac0b..f933711 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
@@ -26,7 +26,6 @@ import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.ImgButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
@@ -59,6 +58,7 @@ import org.rhq.enterprise.gui.coregui.client.components.table.ResourceCategoryCe
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository.TypesLoadedCallback;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableImgButton;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableListGrid;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
@@ -315,7 +315,7 @@ public class ResourceTypeTreeView extends LocatableVLayout implements Bookmarkab
rollOverCanvas.setWidth(50);
rollOverCanvas.setHeight(22);
- ImgButton metricTemplateImg = new ImgButton();
+ LocatableImgButton metricTemplateImg = new LocatableImgButton(extendLocatorId("Metric_" + rowNum));
metricTemplateImg.setShowDown(false);
metricTemplateImg.setShowRollOver(false);
metricTemplateImg.setLayoutAlign(Alignment.CENTER);
@@ -329,7 +329,7 @@ public class ResourceTypeTreeView extends LocatableVLayout implements Bookmarkab
}
});
- ImgButton alertTemplateImg = new ImgButton();
+ LocatableImgButton alertTemplateImg = new LocatableImgButton(extendLocatorId("Alert_" + rowNum));
alertTemplateImg.setShowDown(false);
alertTemplateImg.setShowRollOver(false);
alertTemplateImg.setLayoutAlign(Alignment.CENTER);
@@ -428,7 +428,7 @@ public class ResourceTypeTreeView extends LocatableVLayout implements Bookmarkab
rollOverCanvas.setWidth(50);
rollOverCanvas.setHeight(22);
- ImgButton metricTemplateImg = new ImgButton();
+ LocatableImgButton metricTemplateImg = new LocatableImgButton(extendLocatorId("Metric_" + rowNum));
metricTemplateImg.setShowDown(false);
metricTemplateImg.setShowRollOver(false);
metricTemplateImg.setLayoutAlign(Alignment.CENTER);
@@ -442,7 +442,7 @@ public class ResourceTypeTreeView extends LocatableVLayout implements Bookmarkab
}
});
- ImgButton alertTemplateImg = new ImgButton();
+ LocatableImgButton alertTemplateImg = new LocatableImgButton(extendLocatorId("Alert_" + rowNum));
alertTemplateImg.setShowDown(false);
alertTemplateImg.setShowRollOver(false);
alertTemplateImg.setLayoutAlign(Alignment.CENTER);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableImgButton.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableImgButton.java
new file mode 100644
index 0000000..f1deb36
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableImgButton.java
@@ -0,0 +1,23 @@
+package org.rhq.enterprise.gui.coregui.client.util.selenium;
+
+import com.smartgwt.client.widgets.ImgButton;
+
+/**
+ * Wrapper for com.smartgwt.client.widgets.Img that sets the ID for use with selenium scLocators.
+ *
+ * @author Simeon Pinder
+ */
+public class LocatableImgButton extends ImgButton {
+
+ /**
+ * <pre>
+ * ID Format: "simpleClassname_locatorId"
+ * </pre>
+ * @param locatorId not null.
+ * @param img not null or empty.
+ */
+ public LocatableImgButton(String locatorId) {
+ SeleniumUtility.setID(this, locatorId);
+ }
+
+}
13 years, 1 month
[rhq] Branch 'as7plugin' - 8 commits - modules/core modules/enterprise modules/plugins
by Heiko W. Rupp
modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java | 8
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java | 14
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/PluginConfigurationUpdate.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java | 6
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java | 10
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java | 10
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java | 42
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java | 5
modules/core/domain/src/main/java/org/rhq/core/domain/dashboard/Dashboard.java | 10
modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java | 582 +++++-----
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementData.java | 54
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java | 390 +++---
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java | 218 +--
modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/operation/ResourceOperationHistory.java | 8
modules/core/domain/src/main/java/org/rhq/core/domain/plugin/ServerPlugin.java | 8
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java | 24
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java | 55
modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java | 2
modules/enterprise/gui/coregui/pom.xml | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java | 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java | 14
modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml | 139 ++
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 12
modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java | 24
45 files changed, 896 insertions(+), 908 deletions(-)
New commits:
commit f751fc8abe6f0562386fdfae5e2e3946e40abc03
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu May 12 09:36:58 2011 +0200
Get rid of some bogus stuff
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 3d4f335..bbd7ba3 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -156,9 +156,6 @@
</plugin-configuration>
- <content name="deployment" category="deployable" isCreationType="true" description="Deployments on this domain">
- </content>
-
<resource-configuration>
<c:simple-property name="profile" />
<c:simple-property name="socket-binding-group"/>
@@ -174,11 +171,10 @@
<c:simple-property name="path" default="deployment" readOnly="true"/>
</plugin-configuration>
- <content name="file" category="deployable" isCreationType="true" description="Deployments on this domain">
+ <content name="file" category="deployable" isCreationType="true" description="Deployments on this server group">
<configuration>
<c:group name="deployment" displayName="Deployment Options">
<c:simple-property name="runtimeName" required="true"/>
- <c:simple-property name="alreadyUploaded" type="boolean" description="Was this already uploaded to the Domain? TODO"/>
</c:group>
</configuration>
</content>
@@ -224,8 +220,14 @@
</plugin-configuration>
<content name="file" category="deployable" isCreationType="true" description="Deployments on this domain">
+ <configuration>
+ <c:group name="deployment" displayName="Deployment Options">
+ <c:simple-property name="runtimeName" required="true"/>
+ </c:group>
+ </configuration>
</content>
+
<resource-configuration>
<c:simple-property name="name" readOnly="true"/>
<c:simple-property name="runtime-name" readOnly="true"/>
commit e735bdab1e57ffbf8e8898ae37f4f0e9cedd9f08
Merge: 05bd876 a62f196
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 11 09:19:34 2011 +0200
Merge branch 'master' into as7plugin
commit a62f196717a056c1d73967999938ca447818c237
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 11 09:17:30 2011 +0200
Prevent NPE if processInfo is null.
diff --git a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
index 9bd3859..d50f324 100644
--- a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
+++ b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
@@ -152,16 +152,18 @@ public class SambaServerComponent extends AugeasConfigurationComponent implement
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
NetworkStats stats = resourceContext.getSystemInformation().getNetworkStats("localhost", PORT);
-
- processInfo.refresh();
-
- for (MeasurementScheduleRequest request : metrics) {
- if (request.getName().startsWith("NetworkStat.")) {
- int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
- report.addData(new MeasurementDataNumeric(request, (double) val));
- } else if (request.getName().startsWith("Process.")) {
- Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo, request.getName().substring("Process.".length()));
- report.addData(new MeasurementDataNumeric(request, value));
+
+ if (processInfo!=null) {
+ processInfo.refresh();
+
+ for (MeasurementScheduleRequest request : metrics) {
+ if (request.getName().startsWith("NetworkStat.")) {
+ int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
+ report.addData(new MeasurementDataNumeric(request, (double) val));
+ } else if (request.getName().startsWith("Process.")) {
+ Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo, request.getName().substring("Process.".length()));
+ report.addData(new MeasurementDataNumeric(request, value));
+ }
}
}
}
@@ -269,7 +271,7 @@ public class SambaServerComponent extends AugeasConfigurationComponent implement
if (args != null) {
processExecution.setArguments(args.split(" "));
}
-
+
processExecution.setCaptureOutput(true);
processExecution.setWaitForCompletion(1000L);
processExecution.setKillOnTimeout(true);
commit 05bd876ef224ec81424a5892c4e48b0b80f31fb7
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 11 09:17:30 2011 +0200
Prevent NPE if processInfo is null.
diff --git a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
index 9bd3859..d50f324 100644
--- a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
+++ b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerComponent.java
@@ -152,16 +152,18 @@ public class SambaServerComponent extends AugeasConfigurationComponent implement
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
NetworkStats stats = resourceContext.getSystemInformation().getNetworkStats("localhost", PORT);
-
- processInfo.refresh();
-
- for (MeasurementScheduleRequest request : metrics) {
- if (request.getName().startsWith("NetworkStat.")) {
- int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
- report.addData(new MeasurementDataNumeric(request, (double) val));
- } else if (request.getName().startsWith("Process.")) {
- Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo, request.getName().substring("Process.".length()));
- report.addData(new MeasurementDataNumeric(request, value));
+
+ if (processInfo!=null) {
+ processInfo.refresh();
+
+ for (MeasurementScheduleRequest request : metrics) {
+ if (request.getName().startsWith("NetworkStat.")) {
+ int val = stats.getByName(request.getName().substring("NetworkStat.".length()));
+ report.addData(new MeasurementDataNumeric(request, (double) val));
+ } else if (request.getName().startsWith("Process.")) {
+ Double value = ObjectUtil.lookupDeepNumericAttributeProperty(processInfo, request.getName().substring("Process.".length()));
+ report.addData(new MeasurementDataNumeric(request, value));
+ }
}
}
}
@@ -269,7 +271,7 @@ public class SambaServerComponent extends AugeasConfigurationComponent implement
if (args != null) {
processExecution.setArguments(args.split(" "));
}
-
+
processExecution.setCaptureOutput(true);
processExecution.setWaitForCompletion(1000L);
processExecution.setKillOnTimeout(true);
commit 48bf82fcfaaf7cd9d3aa7549de7d49d793964b5f
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue May 10 15:14:44 2011 -0400
Related to [BZ 702390 - Large number of BundleDeployments for a single Bundle causes fetch serialization issues]
Ensure (optional=false) set for LAZY load required (i.e. nullable = false) associations.
This should ensure efficient lazy load.
For clarity, and to give Hibernate as many hints as possible, mark all
XxxToOne associations with the 'optional' attribute, whether true or false,
lazy or not. And set nullable on the JoinColumn annotations as well.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
index 640648b..355c854 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
@@ -299,8 +299,8 @@ public class AlertCondition implements Serializable {
@Enumerated(EnumType.STRING)
private AlertConditionCategory category;
- @JoinColumn(name = "MEASUREMENT_DEFINITION_ID", referencedColumnName = "ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "MEASUREMENT_DEFINITION_ID", referencedColumnName = "ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
@XmlTransient
private MeasurementDefinition measurementDefinition;
@@ -319,8 +319,8 @@ public class AlertCondition implements Serializable {
@Column(name = "TRIGGER_ID")
private Integer triggerId;
- @JoinColumn(name = "ALERT_DEFINITION_ID", referencedColumnName = "ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "ALERT_DEFINITION_ID", referencedColumnName = "ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
@XmlTransient
private AlertDefinition alertDefinition;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
index cfbb9d7..31fc9ab 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
@@ -111,11 +111,11 @@ public class BundleVersion implements Serializable {
private String recipe;
@JoinColumn(name = "BUNDLE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private Bundle bundle;
@JoinColumn(name = "CONFIG_DEF_ID", referencedColumnName = "ID", nullable = true)
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
private ConfigurationDefinition configurationDefinition;
@OneToMany(mappedBy = "bundleVersion", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/PluginConfigurationUpdate.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/PluginConfigurationUpdate.java
index e7c5845..32a526e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/PluginConfigurationUpdate.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/PluginConfigurationUpdate.java
@@ -139,12 +139,12 @@ public class PluginConfigurationUpdate extends AbstractResourceConfigurationUpda
public static final String QUERY_DELETE_GROUP_UPDATE = "pluginConfigurationUpdate.deleteGroupUpdate";
@JoinColumn(name = "PLUGIN_CONFIG_RES_ID", referencedColumnName = "ID", nullable = true)
- @ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY, optional = true)
@XmlTransient
private Resource resource;
@JoinColumn(name = "AGG_PLUGIN_UPDATE_ID", referencedColumnName = "ID", nullable = true)
- @ManyToOne
+ @ManyToOne(optional = true)
private GroupPluginConfigurationUpdate groupConfigurationUpdate;
protected PluginConfigurationUpdate() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
index 00877bd..a94c4ab 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
@@ -59,7 +59,7 @@ import org.rhq.core.domain.configuration.Configuration;
* @author Jason Dobies
*/
@Entity
-@NamedQueries({
+@NamedQueries( {
@NamedQuery(name = ContentSource.QUERY_FIND_ALL, query = "SELECT cs FROM ContentSource cs "),
@NamedQuery(name = ContentSource.QUERY_FIND_ALL_WITH_CONFIG, query = "SELECT cs FROM ContentSource cs LEFT JOIN FETCH cs.configuration"),
@NamedQuery(name = ContentSource.QUERY_FIND_BY_NAME_AND_TYPENAME, query = "SELECT cs " + " FROM ContentSource cs "
@@ -94,7 +94,7 @@ public class ContentSource implements Serializable {
private int id;
@JoinColumn(name = "CONTENT_SOURCE_TYPE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne
+ @ManyToOne(optional = false)
private ContentSourceType contentSourceType;
@Column(name = "NAME", nullable = false)
@@ -117,7 +117,7 @@ public class ContentSource implements Serializable {
private String loadErrorMessage;
@JoinColumn(name = "CONFIGURATION_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
private Configuration configuration;
@Column(name = "CREATION_TIME", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
index 2c6b41d..52e6cce 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
@@ -100,7 +100,7 @@ public class ContentSourceType implements Serializable {
private String defaultSyncSchedule = "0 0 3 * * ?";
@JoinColumn(name = "SOURCE_CONFIG_DEF_ID", nullable = true)
- @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
@XmlTransient
private ConfigurationDefinition contentSourceConfigurationDefinition;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
index 9b21fe2..5d52d7f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
@@ -54,7 +54,7 @@ import org.rhq.core.domain.resource.Resource;
* @author Jason Dobies
*/
@Entity
-@NamedQueries({
+@NamedQueries( {
@NamedQuery(name = InstalledPackageHistory.QUERY_FIND_CONFIG_BY_PACKAGE_VERSION_AND_REQ, query = "SELECT dcv FROM InstalledPackageHistory iph JOIN iph.deploymentConfigurationValues dcv "
+ "WHERE iph.packageVersion = :packageVersion "
+ "AND iph.contentServiceRequest = :contentServiceRequest "
@@ -92,7 +92,7 @@ public class InstalledPackageHistory implements Serializable {
private int id;
@JoinColumn(name = "PACKAGE_VERSION_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne
+ @ManyToOne(optional = false)
private PackageVersion packageVersion;
@Column(name = "STATUS", nullable = false)
@@ -115,7 +115,7 @@ public class InstalledPackageHistory implements Serializable {
* case that the package type does not define any deploy time properties.
*/
@JoinColumn(name = "DEPLOYMENT_CONFIG_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
private Configuration deploymentConfigurationValues;
/**
@@ -132,11 +132,11 @@ public class InstalledPackageHistory implements Serializable {
* This history item described a package that was on this resource.
*/
@JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne
+ @ManyToOne(optional = false)
private Resource resource;
@JoinColumn(name = "CONTENT_SERVICE_REQUEST_ID", referencedColumnName = "ID", nullable = true)
- @ManyToOne
+ @ManyToOne(optional = true)
private ContentServiceRequest contentServiceRequest;
public int getId() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
index d9e3ea3..9c78af5 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
@@ -41,7 +41,6 @@ import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
-import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
@@ -72,8 +71,7 @@ import org.rhq.core.domain.resource.ResourceType;
+ "JOIN pt.resourceType rt "
+ "LEFT JOIN FETCH pt.deploymentConfigurationDefinition cd "
+ "LEFT JOIN FETCH cd.templates cts " + "WHERE rt.id = :typeId AND pt.isCreationData = true"),
- @NamedQuery(name = PackageType.QUERY_DYNAMIC_CONFIG_VALUES, query = "SELECT pt.resourceType.plugin || ' - ' || pt.resourceType.name || ' - ' || pt.displayName, pt.name FROM PackageType AS pt")
-})
+ @NamedQuery(name = PackageType.QUERY_DYNAMIC_CONFIG_VALUES, query = "SELECT pt.resourceType.plugin || ' - ' || pt.resourceType.name || ' - ' || pt.displayName, pt.name FROM PackageType AS pt") })
@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_PACKAGE_TYPE_ID_SEQ")
@Table(name = "RHQ_PACKAGE_TYPE")
@XmlAccessorType(XmlAccessType.FIELD)
@@ -121,18 +119,18 @@ public class PackageType implements Serializable {
private boolean supportsArchitecture;
@JoinColumn(name = "DEPLOYMENT_CONFIG_DEF_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.ALL })
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private ConfigurationDefinition deploymentConfigurationDefinition;
@JoinColumn(name = "PACKAGE_EXTRA_CONFIG_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.ALL })
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private ConfigurationDefinition packageExtraPropertiesDefinition;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "packageType", cascade = { CascadeType.REMOVE })
private Set<Package> packages;
@JoinColumn(name = "RESOURCE_TYPE_ID", referencedColumnName = "ID", nullable = true)
- @ManyToOne
+ @ManyToOne(optional = true)
@XmlTransient
private ResourceType resourceType;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
index 76dbff4..d64d8a5 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
@@ -78,7 +78,7 @@ import org.rhq.core.domain.util.OSGiVersionComparator;
+ " WHERE pv.generalPackage.name = :packageName "
+ " AND pv.generalPackage.packageType.name = :packageTypeName "
+ " AND pv.generalPackage.packageType.resourceType = :resourceType "
- + " AND pv.architecture.name = :architectureName " + " AND pv.version = :version "),
+ + " AND pv.architecture.name = :architectureName " + " AND pv.version = :version "),
@NamedQuery(name = PackageVersion.QUERY_FIND_ID_BY_PACKAGE_DETAILS_KEY_AND_RES_ID, query = "SELECT pv.id "
+ " FROM PackageVersion AS pv " + " JOIN pv.generalPackage.packageType.resourceType.resources r "
+ " WHERE pv.generalPackage.name = :packageName "
@@ -251,17 +251,13 @@ import org.rhq.core.domain.util.OSGiVersionComparator;
+ "WHERE p.id IN (SELECT pv.generalPackage.id FROM PackageVersion AS pv WHERE pv.fileName = :rpmName)"),
@NamedQuery(name = PackageVersion.QUERY_FIND_PACKAGEVERSION_BY_FILENAME, query = "SELECT pv FROM PackageVersion AS pv WHERE pv.fileName = :rpmName)"),
@NamedQuery(name = PackageVersion.QUERY_FIND_BY_PACKAGE_AND_REPO_ID, query = "SELECT pv"
- + " FROM PackageVersion pv"
- + " JOIN pv.repoPackageVersions rpv"
- + " WHERE pv.generalPackage.id = :packageId"
+ + " FROM PackageVersion pv" + " JOIN pv.repoPackageVersions rpv" + " WHERE pv.generalPackage.id = :packageId"
+ " AND rpv.repo.id = :repoId"),
- @NamedQuery(name = PackageVersion.QUERY_FIND_DELETEABLE_IDS_IN_REPO, query = "SELECT pv.id FROM PackageVersion pv"
+ @NamedQuery(name = PackageVersion.QUERY_FIND_DELETEABLE_IDS_IN_REPO, query = "SELECT pv.id FROM PackageVersion pv"
+ " WHERE (pv.id, 1) IN"
+ " (SELECT pv2.id, (SELECT COUNT(rpv) FROM RepoPackageVersion rpv WHERE rpv.packageVersion.id = pv2.id)"
- + " FROM PackageVersion pv2"
- + " WHERE pv2.id IN ( :packageVersionIds )"
- + " AND pv2.id IN (SELECT rpv.packageVersion.id FROM RepoPackageVersion rpv WHERE rpv.repo.id = :repoId))")
-})
+ + " FROM PackageVersion pv2" + " WHERE pv2.id IN ( :packageVersionIds )"
+ + " AND pv2.id IN (SELECT rpv.packageVersion.id FROM RepoPackageVersion rpv WHERE rpv.repo.id = :repoId))") })
@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_PACKAGE_VERSION_ID_SEQ")
@Table(name = "RHQ_PACKAGE_VERSION")
public class PackageVersion implements Serializable {
@@ -300,7 +296,7 @@ public class PackageVersion implements Serializable {
public static final String QUERY_FIND_PACKAGE_BY_FILENAME = "PackageVersion.findPackageByFilename";
public static final String QUERY_FIND_PACKAGEVERSION_BY_FILENAME = "PackageVersion.findPackageVersionByFilename";
public static final String QUERY_FIND_DELETEABLE_IDS_IN_REPO = "PackageVersion.findDeleteableVersionIds";
-
+
/**
* This is a default {@link Comparator} implementation for package versions.
* If the package versions being compared both have non-null {@link PackageVersion#getVersion() versions}
@@ -319,9 +315,9 @@ public class PackageVersion implements Serializable {
public int compare(PackageVersion p1, PackageVersion p2) {
String v1 = p1.getVersion();
String v2 = p2.getVersion();
-
+
OSGiVersionComparator c = new OSGiVersionComparator();
-
+
if (v1 != null && v2 != null) {
try {
return c.compare(v1, v2);
@@ -329,23 +325,23 @@ public class PackageVersion implements Serializable {
//well, this can happen.. not all packages have OSGi type versions.
}
}
-
+
if (p1.getFileCreatedDate() != null && p2.getFileCreatedDate() != null) {
return p1.getFileCreatedDate().compareTo(p2.getFileCreatedDate());
}
-
+
//hmm... there's actually nothing we can sort these two by..
//let's compare them by id - the one inserted sooner will have a lower id
-
+
return Integer.valueOf(p1.getId()).compareTo(p2.getId());
}
};
-
+
/**
* @see DefaultPackageVersionComparator
*/
public static final DefaultPackageVersionComparator DEFAULT_COMPARATOR = new DefaultPackageVersionComparator();
-
+
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
@@ -354,7 +350,7 @@ public class PackageVersion implements Serializable {
private int id;
@JoinColumn(name = "PACKAGE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST })
+ @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST }, optional = false)
private Package generalPackage;
@Column(name = "DISPLAY_NAME", nullable = true)
@@ -373,7 +369,7 @@ public class PackageVersion implements Serializable {
private String displayVersion;
@JoinColumn(name = "ARCHITECTURE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.PERSIST)
+ @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.PERSIST, optional = false)
private Architecture architecture;
@Column(name = "FILE_NAME", nullable = true)
@@ -401,7 +397,7 @@ public class PackageVersion implements Serializable {
private byte[] metadata;
@JoinColumn(name = "CONFIG_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
private Configuration extraProperties;
@OneToMany(mappedBy = "packageVersion", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@@ -415,11 +411,11 @@ public class PackageVersion implements Serializable {
@OneToMany(mappedBy = "packageVersion", fetch = FetchType.LAZY)
private Set<InstalledPackageHistory> installedPackageHistory;
- // No longer use cascade PERSIST on this. We'll associate it manually due to intracacies in blob handling
+ // No longer use cascade PERSIST on this. We'll associate it manually due to intracacies in blob handling
@JoinColumn(name = "PACKAGE_BITS_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
+ @OneToOne(cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY, optional = true)
@XmlTransient
- private PackageBits packageBits; // do NOT eager load this - is has the BLOB contents of the package
+ private PackageBits packageBits;
@OneToMany(mappedBy = "packageVersion", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
private Set<ProductVersionPackageVersion> productVersionPackageVersions;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/dashboard/Dashboard.java b/modules/core/domain/src/main/java/org/rhq/core/domain/dashboard/Dashboard.java
index 2f5d41e..601d817 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/dashboard/Dashboard.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/dashboard/Dashboard.java
@@ -88,20 +88,20 @@ public class Dashboard implements Serializable {
@Column(name = "SHARED", nullable = false)
private boolean shared = false;
- @JoinColumn(name = "CONFIGURATION_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL })
+ @JoinColumn(name = "CONFIGURATION_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, optional = true)
private Configuration configuration = new Configuration();
@JoinColumn(name = "SUBJECT_ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private Subject owner;
@JoinColumn(name = "RESOURCE_ID", nullable = true)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private Resource resource;
@JoinColumn(name = "GROUP_ID", nullable = true)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private ResourceGroup group;
@OneToMany(mappedBy = "dashboard", fetch = FetchType.EAGER)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java b/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
index 4bcc267..eb3b97d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/discovery/ResourceSyncInfo.java
@@ -72,8 +72,8 @@ public class ResourceSyncInfo implements Serializable {
@Enumerated(EnumType.STRING)
private InventoryStatus inventoryStatus;
- @JoinColumn(name = "PARENT_RESOURCE_ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARENT_RESOURCE_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private ResourceSyncInfo parent;
@OneToMany(mappedBy = "parent", fetch = FetchType.EAGER)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
index dfb8d34..f0df086 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
@@ -112,7 +112,7 @@ public class Event implements Serializable {
private int id;
@JoinColumn(name = "EVENT_SOURCE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private EventSource source;
@Column(name = "TIMESTAMP", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
index 75f7b73..5db91bb 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
@@ -58,7 +58,7 @@ public class EventDefinition implements Serializable {
private int id;
@JoinColumn(name = "RESOURCE_TYPE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private ResourceType resourceType;
@Column(name = "RESOURCE_TYPE_ID", insertable = false, updatable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
index 2424edb..f1d8108 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
@@ -74,7 +74,7 @@ public class EventSource implements Serializable {
private EventDefinition eventDefinition;
@JoinColumn(name = "RESOURCE_ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private Resource resource;
@Column(name = "RESOURCE_ID", insertable = false, updatable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
index 260adc5..9647632 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
@@ -1,292 +1,292 @@
-/*
- * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.measurement;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.rhq.core.domain.resource.Resource;
-
-/**
- * This Entity Bean stores information about resource availability. The actual data is run-length encoded. This means
- * that the {@link #getAvailabilityType() availability state} (e.g. UP or DOWN) changed at the
- * {@link #getStartTime() start time}.
- *
- * This provides historical data regarding when a resource was up or down. To get the current availability
- * of a resource, it is best to use the {@link ResourceAvailability} entity instead.
- *
- * @see ResourceAvailability
- *
- * @author Heiko W. Rupp
- * @author John Mazzitelli
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = Availability.FIND_CURRENT_BY_RESOURCE, query = "" //
- + " SELECT av " //
- + " FROM Availability av " //
- + " WHERE av.resource.id = :resourceId " //
- + " AND av.endTime IS NULL " //
- + "ORDER BY av.startTime ASC "), // this order by is on purpose - for handling NonUniqueResultException problems
- @NamedQuery(name = Availability.FIND_BY_RESOURCE, query = "" //
- + " SELECT av " //
- + " FROM Availability av " //
- + " WHERE av.resource.id = :resourceId " //
- + "ORDER BY av.startTime ASC"), //
- @NamedQuery(name = Availability.FIND_BY_RESOURCE_NO_SORT, query = "" //
- + "SELECT av " //
- + " FROM Availability av " //
- + " WHERE av.resource.id = :resourceId "), //
-
- // get all current resource availabilities for those that do not match a given availability type
- @NamedQuery(name = Availability.FIND_NONMATCHING_WITH_RESOURCE_ID_BY_AGENT_AND_TYPE, query = "" //
- + "SELECT new org.rhq.core.domain.resource.composite.ResourceIdWithAvailabilityComposite(av.resource.id, av) " //
- + " FROM Availability av " //
- + " WHERE av.resource.agent.id = :agentId " //
- + " AND ((av.availabilityType <> :availabilityType AND :availabilityType IS NOT NULL) " //
- + " OR (av.availabilityType IS NOT NULL AND :availabilityType IS NULL) " //
- + " OR (av.availabilityType IS NULL AND :availabilityType IS NOT NULL))" //
- + " AND av.endTime IS NULL"), //
- @NamedQuery(name = Availability.FIND_FOR_RESOURCE_WITHIN_INTERVAL, query = "" //
- + "SELECT av FROM Availability av " //
- + " WHERE av.resource.id = :resourceId " //
- + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL) ) " /* availability straddles :start */
- + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
- + "ORDER BY av.startTime ASC"), //
- @NamedQuery(name = Availability.FIND_FOR_RESOURCE_GROUP_WITHIN_INTERVAL, query = "" //
- + "SELECT av FROM Availability av " //
- + " WHERE av.resource.id IN ( SELECT ires.id " //
- + " FROM ResourceGroup rg " //
- + " JOIN rg.implicitResources ires " //
- + " WHERE rg.id = :groupId ) " //
- + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL) ) " /* availability straddles :start */
- + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
- + "ORDER BY av.startTime ASC"), //
- @NamedQuery(name = Availability.FIND_FOR_AUTO_GROUP_WITHIN_INTERVAL, query = "" //
- + " SELECT av FROM Availability av " //
- + " JOIN av.resource res JOIN res.parentResource parent JOIN res.resourceType type " //
- + " WHERE parent.id = :parentId " //
- + " AND type.id = :typeId " //
- + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL)) " /* availability straddles :start */
- + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
- + "ORDER BY av.startTime ASC"), //
- @NamedQuery(name = Availability.FIND_BY_RESOURCE_AND_DATE, query = "" //
- + "SELECT av FROM Availability av " //
- + " WHERE av.resource.id = :resourceId " //
- + " AND av.startTime <= :aTime " //
- + " AND ( av.endTime >= :aTime OR av.endTime IS NULL ) "), //
- @NamedQuery(name = Availability.QUERY_DELETE_BY_RESOURCES, query = "" //
- + " DELETE Availability a " //
- + " WHERE a.resource.id IN ( :resourceIds )") })
-@SequenceGenerator(name = "Generator", sequenceName = "RHQ_AVAILABILITY_ID_SEQ")
-@Table(name = "RHQ_AVAILABILITY")
-public class Availability implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String FIND_CURRENT_BY_RESOURCE = "Availability.findCurrentByResource";
- public static final String FIND_BY_RESOURCE = "Availability.findByResource";
- public static final String FIND_BY_RESOURCE_NO_SORT = "Availability.findByResourceNoSort";
- public static final String FIND_NONMATCHING_WITH_RESOURCE_ID_BY_AGENT_AND_TYPE = "Availability.findNonmatchingWithResourceIdByAgentAndType";
- public static final String FIND_FOR_RESOURCE_WITHIN_INTERVAL = "Availability.findForResourceWithinInterval";
- public static final String FIND_FOR_RESOURCE_GROUP_WITHIN_INTERVAL = "Availability.findForResourceGroupWithinInterval";
- public static final String FIND_FOR_AUTO_GROUP_WITHIN_INTERVAL = "Availability.findForAutoGroupWithinInterval";
- public static final String FIND_BY_RESOURCE_AND_DATE = "Availability.findByResourceAndDate";
- public static final String QUERY_DELETE_BY_RESOURCES = "Availability.deleteByResources";
-
- public static final String NATIVE_QUERY_PURGE = "DELETE FROM RHQ_AVAILABILITY WHERE END_TIME < ?";
-
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "Generator")
- @Id
- private int id;
-
- /**
- * Start time of this availability state
- */
- @Column(name = "START_TIME", nullable = false)
- private long startTime;
-
- /**
- * End time of this availability state (which is the start of the next availability time period)
- */
- @Column(name = "END_TIME", nullable = true)
- private Long endTime;
-
- /**
- * Availability state for this time period
- */
- @Column(name = "AVAILABILITY_TYPE", nullable = true)
- @Enumerated(EnumType.ORDINAL)
- private AvailabilityType availabilityType;
-
- @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
- private Resource resource;
-
- protected Availability() {
- // for JPA use only
- }
-
- /**
- * Constructor for {@link Availability}. If <code>type</code> is <code>null</code>, it will be considered unknown.
- *
- * @param resource
- * @param startTime
- * @param type
- */
- public Availability(Resource resource, Date startTime, AvailabilityType type) {
- if (resource == null) {
- throw new IllegalArgumentException("resource==null");
- }
-
- this.resource = resource;
- this.availabilityType = type;
- this.startTime = (startTime != null) ? startTime.getTime() : new Date().getTime();
- this.endTime = null;
- }
-
- public int getId() {
- return id;
- }
-
- public Resource getResource() {
- return resource;
- }
-
- public Date getStartTime() {
- return new Date(startTime);
- }
-
- public void setStartTime(Date startTime) {
- this.startTime = startTime.getTime();
- }
-
- /**
- * The end time of this availability period. This will be <code>null</code> if this represents the last known
- * availability.
- *
- * @return end of the availability period
- */
- public Date getEndTime() {
- return (endTime != null) ? new Date(endTime.longValue()) : null;
- }
-
- public void setEndTime(Date endTime) {
- this.endTime = (endTime != null) ? endTime.getTime() : null;
- }
-
- /**
- * Indicates the availability status as either UP or DOWN; if <code>null</code> is returned, the status is unknown.
- *
- * @return availability status
- */
- public AvailabilityType getAvailabilityType() {
- return availabilityType;
- }
-
- /**
- * Sets the availability status. This can be <code>null</code> to indicate an "unknown" availability status.
- *
- * @param availabilityType
- */
- public void setAvailabilityType(AvailabilityType availabilityType) {
- this.availabilityType = availabilityType;
- }
-
- @Override
- public String toString() {
- return "Availability[id=" + id + ",type=" + this.availabilityType + ",start-time=" + getStartTime()
- + ",end-time=" + getEndTime() + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = (prime * result) + ((availabilityType == null) ? 0 : availabilityType.hashCode());
- result = (prime * result) + ((endTime == null) ? 0 : endTime.hashCode());
- result = (prime * result) + ((resource == null) ? 0 : resource.hashCode());
- result = (prime * result) + (int) (startTime ^ (startTime >>> 32));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (obj == null) {
- return false;
- }
-
- if (!(obj instanceof Availability)) {
- return false;
- }
-
- final Availability other = (Availability) obj;
- if (availabilityType == null) {
- if (other.availabilityType != null) {
- return false;
- }
- } else if (!availabilityType.equals(other.availabilityType)) {
- return false;
- }
-
- if (endTime == null) {
- if (other.endTime != null) {
- return false;
- }
- } else if (!endTime.equals(other.endTime)) {
- return false;
- }
-
- if (resource == null) {
- if (other.resource != null) {
- return false;
- }
- } else if (!resource.equals(other.resource)) {
- return false;
- }
-
- if (startTime != other.startTime) {
- return false;
- }
-
- return true;
- }
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.measurement;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.rhq.core.domain.resource.Resource;
+
+/**
+ * This Entity Bean stores information about resource availability. The actual data is run-length encoded. This means
+ * that the {@link #getAvailabilityType() availability state} (e.g. UP or DOWN) changed at the
+ * {@link #getStartTime() start time}.
+ *
+ * This provides historical data regarding when a resource was up or down. To get the current availability
+ * of a resource, it is best to use the {@link ResourceAvailability} entity instead.
+ *
+ * @see ResourceAvailability
+ *
+ * @author Heiko W. Rupp
+ * @author John Mazzitelli
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = Availability.FIND_CURRENT_BY_RESOURCE, query = "" //
+ + " SELECT av " //
+ + " FROM Availability av " //
+ + " WHERE av.resource.id = :resourceId " //
+ + " AND av.endTime IS NULL " //
+ + "ORDER BY av.startTime ASC "), // this order by is on purpose - for handling NonUniqueResultException problems
+ @NamedQuery(name = Availability.FIND_BY_RESOURCE, query = "" //
+ + " SELECT av " //
+ + " FROM Availability av " //
+ + " WHERE av.resource.id = :resourceId " //
+ + "ORDER BY av.startTime ASC"), //
+ @NamedQuery(name = Availability.FIND_BY_RESOURCE_NO_SORT, query = "" //
+ + "SELECT av " //
+ + " FROM Availability av " //
+ + " WHERE av.resource.id = :resourceId "), //
+
+ // get all current resource availabilities for those that do not match a given availability type
+ @NamedQuery(name = Availability.FIND_NONMATCHING_WITH_RESOURCE_ID_BY_AGENT_AND_TYPE, query = "" //
+ + "SELECT new org.rhq.core.domain.resource.composite.ResourceIdWithAvailabilityComposite(av.resource.id, av) " //
+ + " FROM Availability av " //
+ + " WHERE av.resource.agent.id = :agentId " //
+ + " AND ((av.availabilityType <> :availabilityType AND :availabilityType IS NOT NULL) " //
+ + " OR (av.availabilityType IS NOT NULL AND :availabilityType IS NULL) " //
+ + " OR (av.availabilityType IS NULL AND :availabilityType IS NOT NULL))" //
+ + " AND av.endTime IS NULL"), //
+ @NamedQuery(name = Availability.FIND_FOR_RESOURCE_WITHIN_INTERVAL, query = "" //
+ + "SELECT av FROM Availability av " //
+ + " WHERE av.resource.id = :resourceId " //
+ + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL) ) " /* availability straddles :start */
+ + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
+ + "ORDER BY av.startTime ASC"), //
+ @NamedQuery(name = Availability.FIND_FOR_RESOURCE_GROUP_WITHIN_INTERVAL, query = "" //
+ + "SELECT av FROM Availability av " //
+ + " WHERE av.resource.id IN ( SELECT ires.id " //
+ + " FROM ResourceGroup rg " //
+ + " JOIN rg.implicitResources ires " //
+ + " WHERE rg.id = :groupId ) " //
+ + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL) ) " /* availability straddles :start */
+ + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
+ + "ORDER BY av.startTime ASC"), //
+ @NamedQuery(name = Availability.FIND_FOR_AUTO_GROUP_WITHIN_INTERVAL, query = "" //
+ + " SELECT av FROM Availability av " //
+ + " JOIN av.resource res JOIN res.parentResource parent JOIN res.resourceType type " //
+ + " WHERE parent.id = :parentId " //
+ + " AND type.id = :typeId " //
+ + " AND ((av.startTime <= :start AND (av.endTime >= :start OR av.endTime IS NULL)) " /* availability straddles :start */
+ + " OR (av.startTime BETWEEN :start AND :end)) " /* interval straddles availability.startTime */
+ + "ORDER BY av.startTime ASC"), //
+ @NamedQuery(name = Availability.FIND_BY_RESOURCE_AND_DATE, query = "" //
+ + "SELECT av FROM Availability av " //
+ + " WHERE av.resource.id = :resourceId " //
+ + " AND av.startTime <= :aTime " //
+ + " AND ( av.endTime >= :aTime OR av.endTime IS NULL ) "), //
+ @NamedQuery(name = Availability.QUERY_DELETE_BY_RESOURCES, query = "" //
+ + " DELETE Availability a " //
+ + " WHERE a.resource.id IN ( :resourceIds )") })
+@SequenceGenerator(name = "Generator", sequenceName = "RHQ_AVAILABILITY_ID_SEQ")
+@Table(name = "RHQ_AVAILABILITY")
+public class Availability implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String FIND_CURRENT_BY_RESOURCE = "Availability.findCurrentByResource";
+ public static final String FIND_BY_RESOURCE = "Availability.findByResource";
+ public static final String FIND_BY_RESOURCE_NO_SORT = "Availability.findByResourceNoSort";
+ public static final String FIND_NONMATCHING_WITH_RESOURCE_ID_BY_AGENT_AND_TYPE = "Availability.findNonmatchingWithResourceIdByAgentAndType";
+ public static final String FIND_FOR_RESOURCE_WITHIN_INTERVAL = "Availability.findForResourceWithinInterval";
+ public static final String FIND_FOR_RESOURCE_GROUP_WITHIN_INTERVAL = "Availability.findForResourceGroupWithinInterval";
+ public static final String FIND_FOR_AUTO_GROUP_WITHIN_INTERVAL = "Availability.findForAutoGroupWithinInterval";
+ public static final String FIND_BY_RESOURCE_AND_DATE = "Availability.findByResourceAndDate";
+ public static final String QUERY_DELETE_BY_RESOURCES = "Availability.deleteByResources";
+
+ public static final String NATIVE_QUERY_PURGE = "DELETE FROM RHQ_AVAILABILITY WHERE END_TIME < ?";
+
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "Generator")
+ @Id
+ private int id;
+
+ /**
+ * Start time of this availability state
+ */
+ @Column(name = "START_TIME", nullable = false)
+ private long startTime;
+
+ /**
+ * End time of this availability state (which is the start of the next availability time period)
+ */
+ @Column(name = "END_TIME", nullable = true)
+ private Long endTime;
+
+ /**
+ * Availability state for this time period
+ */
+ @Column(name = "AVAILABILITY_TYPE", nullable = true)
+ @Enumerated(EnumType.ORDINAL)
+ private AvailabilityType availabilityType;
+
+ @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ private Resource resource;
+
+ protected Availability() {
+ // for JPA use only
+ }
+
+ /**
+ * Constructor for {@link Availability}. If <code>type</code> is <code>null</code>, it will be considered unknown.
+ *
+ * @param resource
+ * @param startTime
+ * @param type
+ */
+ public Availability(Resource resource, Date startTime, AvailabilityType type) {
+ if (resource == null) {
+ throw new IllegalArgumentException("resource==null");
+ }
+
+ this.resource = resource;
+ this.availabilityType = type;
+ this.startTime = (startTime != null) ? startTime.getTime() : new Date().getTime();
+ this.endTime = null;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ public Date getStartTime() {
+ return new Date(startTime);
+ }
+
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime.getTime();
+ }
+
+ /**
+ * The end time of this availability period. This will be <code>null</code> if this represents the last known
+ * availability.
+ *
+ * @return end of the availability period
+ */
+ public Date getEndTime() {
+ return (endTime != null) ? new Date(endTime.longValue()) : null;
+ }
+
+ public void setEndTime(Date endTime) {
+ this.endTime = (endTime != null) ? endTime.getTime() : null;
+ }
+
+ /**
+ * Indicates the availability status as either UP or DOWN; if <code>null</code> is returned, the status is unknown.
+ *
+ * @return availability status
+ */
+ public AvailabilityType getAvailabilityType() {
+ return availabilityType;
+ }
+
+ /**
+ * Sets the availability status. This can be <code>null</code> to indicate an "unknown" availability status.
+ *
+ * @param availabilityType
+ */
+ public void setAvailabilityType(AvailabilityType availabilityType) {
+ this.availabilityType = availabilityType;
+ }
+
+ @Override
+ public String toString() {
+ return "Availability[id=" + id + ",type=" + this.availabilityType + ",start-time=" + getStartTime()
+ + ",end-time=" + getEndTime() + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = (prime * result) + ((availabilityType == null) ? 0 : availabilityType.hashCode());
+ result = (prime * result) + ((endTime == null) ? 0 : endTime.hashCode());
+ result = (prime * result) + ((resource == null) ? 0 : resource.hashCode());
+ result = (prime * result) + (int) (startTime ^ (startTime >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (obj == null) {
+ return false;
+ }
+
+ if (!(obj instanceof Availability)) {
+ return false;
+ }
+
+ final Availability other = (Availability) obj;
+ if (availabilityType == null) {
+ if (other.availabilityType != null) {
+ return false;
+ }
+ } else if (!availabilityType.equals(other.availabilityType)) {
+ return false;
+ }
+
+ if (endTime == null) {
+ if (other.endTime != null) {
+ return false;
+ }
+ } else if (!endTime.equals(other.endTime)) {
+ return false;
+ }
+
+ if (resource == null) {
+ if (other.resource != null) {
+ return false;
+ }
+ } else if (!resource.equals(other.resource)) {
+ return false;
+ }
+
+ if (startTime != other.startTime) {
+ return false;
+ }
+
+ return true;
+ }
}
\ No newline at end of file
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
index 9b3e9ec..020eb0b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
@@ -215,7 +215,7 @@ public class MeasurementBaseline implements Serializable {
private long computeTime;
@JoinColumn(name = "SCHEDULE_ID", nullable = false)
- @OneToOne(fetch = FetchType.LAZY)
+ @OneToOne(fetch = FetchType.LAZY, optional = false)
private MeasurementSchedule schedule;
// we need this to support autobaseline insertion queries
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementData.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementData.java
index 2c99f85..d0d26ab 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementData.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementData.java
@@ -1,25 +1,25 @@
- /*
- * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
package org.rhq.core.domain.measurement;
import java.io.Serializable;
@@ -36,9 +36,9 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
- /**
- * Represents data that was collected either due to a schedule or an on-demand, live collection.
- */
+/**
+* Represents data that was collected either due to a schedule or an on-demand, live collection.
+*/
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@XmlAccessorType(XmlAccessType.FIELD)
@@ -50,8 +50,8 @@ public abstract class MeasurementData implements Serializable {
@EmbeddedId
MeasurementDataPK id;
- @JoinColumn(name = "SCHEDULE_ID", insertable = false, updatable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "SCHEDULE_ID", insertable = false, updatable = false, nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
MeasurementSchedule schedule;
@Transient
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
index 6a9b0fb..4e008f9 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
@@ -1,196 +1,196 @@
-/*
- * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.measurement;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToOne;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.rhq.core.domain.resource.Resource;
-
-/**
- * This entity represents the latest known availability data for a resource.
- *
- * @author Joseph Marques
- */
-@Entity
-@Table(name = ResourceAvailability.TABLE_NAME)
-@NamedQueries( //
-{ @NamedQuery(name = ResourceAvailability.QUERY_FIND_BY_RESOURCE_ID, query = "" //
- + " SELECT ra FROM ResourceAvailability ra WHERE ra.resourceId = :resourceId "),
- @NamedQuery(name = ResourceAvailability.UPDATE_BY_AGENT_ID, query = "" //
- + " UPDATE ResourceAvailability " //
- + " SET availabilityType = :availabilityType " //
- + " WHERE resourceId IN ( SELECT res.id " //
- + " FROM Resource res " //
- + " WHERE res.agent.id = :agentId ) "),
- @NamedQuery(name = ResourceAvailability.INSERT_BY_RESOURCE_IDS, query = "" //
- + " INSERT INTO ResourceAvailability ( resourceId ) " //
- + " SELECT res.id " //
- + " FROM Resource res " //
- + " LEFT JOIN res.currentAvailability avail " //
- + " WHERE res.id IN ( :resourceIds ) " //
- + " AND avail IS NULL "),
- /*
- * Platform plugins always return up for availability. Platforms are
- * only down if the check-suspect-agent's backfiller sets them down.
- * Thus this agent has been backfilled if it's platform is not up.
- *
- * Returns 0 if the agent has NOT been backfilled, non-zero if it is.
- */
- @NamedQuery(name = ResourceAvailability.QUERY_IS_AGENT_BACKFILLED, query = "" //
- + "SELECT COUNT(avail.id) " // return count of
- + " FROM Resource res " //
- + " JOIN res.currentAvailability avail " // we only want the current availability
- + " WHERE res.agent.id = :agentId " // use id not name to prevent an unnecessary join to agent table
- + " AND res.parentResource IS NULL " // we only want platforms
- + " AND avail.availabilityType <> 1") // get all DOWN or UNKNOWN
-})
-@SequenceGenerator(name = "RHQ_RESOURCE_AVAIL_SEQ", sequenceName = "RHQ_RESOURCE_AVAIL_ID_SEQ", allocationSize = 100)
-public class ResourceAvailability implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String TABLE_NAME = "RHQ_RESOURCE_AVAIL";
-
- public static final String QUERY_FIND_BY_RESOURCE_ID = "ResourceAvailability.findByResourceId";
- public static final String UPDATE_BY_AGENT_ID = "ResourceAvailability.updateByAgentId";
- public static final String INSERT_BY_RESOURCE_IDS = "ResourceAvailability.insertByResourceIds";
- public static final String QUERY_IS_AGENT_BACKFILLED = "ResourceAvailability.isAgentBackfilled";
-
- @SuppressWarnings("unused")
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_AVAIL_SEQ")
- @Id
- private int id;
-
- @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
- @OneToOne(fetch = FetchType.LAZY)
- private Resource resource;
-
- @Column(name = "RESOURCE_ID", insertable = false, updatable = false)
- private int resourceId;
-
- /**
- * Availability state for this time period
- */
- @Column(name = "AVAILABILITY_TYPE", nullable = true)
- @Enumerated(EnumType.ORDINAL)
- private AvailabilityType availabilityType;
-
- protected ResourceAvailability() {
- // for JPA use only
- }
-
- /**
- * Constructor for {@link ResourceAvailability}. If <code>type</code> is <code>null</code>, it will be
- * considered unknown.
- *
- * @param resource
- * @param type
- */
- public ResourceAvailability(Resource resource, AvailabilityType type) {
- if (resource == null) {
- throw new IllegalArgumentException("resource==null");
- }
-
- this.resource = resource;
- this.resourceId = resource.getId();
- this.availabilityType = type;
- }
-
- public Resource getResource() {
- return resource;
- }
-
- /**
- * Indicates the availability status as either UP or DOWN; if <code>null</code> is returned, the status is unknown.
- *
- * @return availability status
- */
- public AvailabilityType getAvailabilityType() {
- return availabilityType;
- }
-
- /**
- * Sets the availability status. This can be <code>null</code> to indicate an "unknown" availability status.
- *
- * @param availabilityType
- */
- public void setAvailabilityType(AvailabilityType availabilityType) {
- this.availabilityType = availabilityType;
- }
-
- @Override
- public String toString() {
- return "Availability[resourceId=" + resourceId + ", avail=" + this.availabilityType + "]";
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = (prime * result) + ((availabilityType == null) ? 0 : availabilityType.hashCode());
- result = (prime * result) + resourceId;
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (obj == null || !(obj instanceof ResourceAvailability)) {
- return false;
- }
-
- final ResourceAvailability other = (ResourceAvailability) obj;
-
- if (resourceId != other.resourceId) {
- return false;
- }
-
- if (availabilityType == null) {
- if (other.availabilityType != null) {
- return false;
- }
- } else if (!availabilityType.equals(other.availabilityType)) {
- return false;
- }
-
- return true;
- }
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.measurement;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.rhq.core.domain.resource.Resource;
+
+/**
+ * This entity represents the latest known availability data for a resource.
+ *
+ * @author Joseph Marques
+ */
+@Entity
+@Table(name = ResourceAvailability.TABLE_NAME)
+@NamedQueries( //
+{ @NamedQuery(name = ResourceAvailability.QUERY_FIND_BY_RESOURCE_ID, query = "" //
+ + " SELECT ra FROM ResourceAvailability ra WHERE ra.resourceId = :resourceId "),
+ @NamedQuery(name = ResourceAvailability.UPDATE_BY_AGENT_ID, query = "" //
+ + " UPDATE ResourceAvailability " //
+ + " SET availabilityType = :availabilityType " //
+ + " WHERE resourceId IN ( SELECT res.id " //
+ + " FROM Resource res " //
+ + " WHERE res.agent.id = :agentId ) "),
+ @NamedQuery(name = ResourceAvailability.INSERT_BY_RESOURCE_IDS, query = "" //
+ + " INSERT INTO ResourceAvailability ( resourceId ) " //
+ + " SELECT res.id " //
+ + " FROM Resource res " //
+ + " LEFT JOIN res.currentAvailability avail " //
+ + " WHERE res.id IN ( :resourceIds ) " //
+ + " AND avail IS NULL "),
+ /*
+ * Platform plugins always return up for availability. Platforms are
+ * only down if the check-suspect-agent's backfiller sets them down.
+ * Thus this agent has been backfilled if it's platform is not up.
+ *
+ * Returns 0 if the agent has NOT been backfilled, non-zero if it is.
+ */
+ @NamedQuery(name = ResourceAvailability.QUERY_IS_AGENT_BACKFILLED, query = "" //
+ + "SELECT COUNT(avail.id) " // return count of
+ + " FROM Resource res " //
+ + " JOIN res.currentAvailability avail " // we only want the current availability
+ + " WHERE res.agent.id = :agentId " // use id not name to prevent an unnecessary join to agent table
+ + " AND res.parentResource IS NULL " // we only want platforms
+ + " AND avail.availabilityType <> 1") // get all DOWN or UNKNOWN
+})
+@SequenceGenerator(name = "RHQ_RESOURCE_AVAIL_SEQ", sequenceName = "RHQ_RESOURCE_AVAIL_ID_SEQ", allocationSize = 100)
+public class ResourceAvailability implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String TABLE_NAME = "RHQ_RESOURCE_AVAIL";
+
+ public static final String QUERY_FIND_BY_RESOURCE_ID = "ResourceAvailability.findByResourceId";
+ public static final String UPDATE_BY_AGENT_ID = "ResourceAvailability.updateByAgentId";
+ public static final String INSERT_BY_RESOURCE_IDS = "ResourceAvailability.insertByResourceIds";
+ public static final String QUERY_IS_AGENT_BACKFILLED = "ResourceAvailability.isAgentBackfilled";
+
+ @SuppressWarnings("unused")
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_AVAIL_SEQ")
+ @Id
+ private int id;
+
+ @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
+ @OneToOne(fetch = FetchType.LAZY, optional = false)
+ private Resource resource;
+
+ @Column(name = "RESOURCE_ID", insertable = false, updatable = false)
+ private int resourceId;
+
+ /**
+ * Availability state for this time period
+ */
+ @Column(name = "AVAILABILITY_TYPE", nullable = true)
+ @Enumerated(EnumType.ORDINAL)
+ private AvailabilityType availabilityType;
+
+ protected ResourceAvailability() {
+ // for JPA use only
+ }
+
+ /**
+ * Constructor for {@link ResourceAvailability}. If <code>type</code> is <code>null</code>, it will be
+ * considered unknown.
+ *
+ * @param resource
+ * @param type
+ */
+ public ResourceAvailability(Resource resource, AvailabilityType type) {
+ if (resource == null) {
+ throw new IllegalArgumentException("resource==null");
+ }
+
+ this.resource = resource;
+ this.resourceId = resource.getId();
+ this.availabilityType = type;
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ /**
+ * Indicates the availability status as either UP or DOWN; if <code>null</code> is returned, the status is unknown.
+ *
+ * @return availability status
+ */
+ public AvailabilityType getAvailabilityType() {
+ return availabilityType;
+ }
+
+ /**
+ * Sets the availability status. This can be <code>null</code> to indicate an "unknown" availability status.
+ *
+ * @param availabilityType
+ */
+ public void setAvailabilityType(AvailabilityType availabilityType) {
+ this.availabilityType = availabilityType;
+ }
+
+ @Override
+ public String toString() {
+ return "Availability[resourceId=" + resourceId + ", avail=" + this.availabilityType + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = (prime * result) + ((availabilityType == null) ? 0 : availabilityType.hashCode());
+ result = (prime * result) + resourceId;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (obj == null || !(obj instanceof ResourceAvailability)) {
+ return false;
+ }
+
+ final ResourceAvailability other = (ResourceAvailability) obj;
+
+ if (resourceId != other.resourceId) {
+ return false;
+ }
+
+ if (availabilityType == null) {
+ if (other.availabilityType != null) {
+ return false;
+ }
+ } else if (!availabilityType.equals(other.availabilityType)) {
+ return false;
+ }
+
+ return true;
+ }
}
\ No newline at end of file
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
index 1691a59..6e05fca 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
@@ -1,110 +1,110 @@
-/*
- * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.measurement.calltime;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import org.rhq.core.domain.measurement.MeasurementSchedule;
-
-/**
- * A key used to lookup all call-time data ((i.e. a set of {@link CallTimeDataValue}s)) for a particular destination
- * (e.g. a URL or an EJB method name).
- *
- * @author Ian Springer
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = CallTimeDataKey.QUERY_DELETE_BY_RESOURCES, query = "DELETE CallTimeDataKey ctdk WHERE ctdk.schedule IN ( SELECT ms FROM MeasurementSchedule ms WHERE ms.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(name = "idGenerator", sequenceName = "RHQ_CALLTIME_DATA_KEY_ID_SEQ")
-@Table(name = "RHQ_CALLTIME_DATA_KEY")
-public class CallTimeDataKey implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String QUERY_DELETE_BY_RESOURCES = "CallTimeDataKey.deleteByResources";
-
- public static final int DESTINATION_MAX_LENGTH = 4000;
-
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
- @Id
- private int id;
-
- @JoinColumn(name = "SCHEDULE_ID", insertable = false, updatable = false, nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
- private MeasurementSchedule schedule;
-
- @Column(name = "CALL_DESTINATION", length = DESTINATION_MAX_LENGTH, nullable = false)
- private String callDestination;
-
- /**
- * Create a new <code>CallTimeDataKey</code>.
- *
- * @param schedule the collection schedule corresponding to this call-time data
- * @param callDestination the call destination (e.g. a URL or an EJB name)
- */
- public CallTimeDataKey(@NotNull MeasurementSchedule schedule, @NotNull String callDestination) {
- this.schedule = schedule;
- this.callDestination = callDestination;
- }
-
- protected CallTimeDataKey() {
- /* for JPA use only */
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- @Nullable
- public MeasurementSchedule getSchedule() {
- return this.schedule;
- }
-
- @NotNull
- public String getCallDestination() {
- return this.callDestination;
- }
-
- @Override
- public String toString() {
- return "MeasurementCallDestination[" + "id=" + this.id + ", " + "value=" + this.callDestination + "]";
- }
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.measurement.calltime;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import org.rhq.core.domain.measurement.MeasurementSchedule;
+
+/**
+ * A key used to lookup all call-time data ((i.e. a set of {@link CallTimeDataValue}s)) for a particular destination
+ * (e.g. a URL or an EJB method name).
+ *
+ * @author Ian Springer
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = CallTimeDataKey.QUERY_DELETE_BY_RESOURCES, query = "DELETE CallTimeDataKey ctdk WHERE ctdk.schedule IN ( SELECT ms FROM MeasurementSchedule ms WHERE ms.resource.id IN ( :resourceIds ) )") })
+@SequenceGenerator(name = "idGenerator", sequenceName = "RHQ_CALLTIME_DATA_KEY_ID_SEQ")
+@Table(name = "RHQ_CALLTIME_DATA_KEY")
+public class CallTimeDataKey implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String QUERY_DELETE_BY_RESOURCES = "CallTimeDataKey.deleteByResources";
+
+ public static final int DESTINATION_MAX_LENGTH = 4000;
+
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @Id
+ private int id;
+
+ @JoinColumn(name = "SCHEDULE_ID", insertable = false, updatable = false, nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ private MeasurementSchedule schedule;
+
+ @Column(name = "CALL_DESTINATION", length = DESTINATION_MAX_LENGTH, nullable = false)
+ private String callDestination;
+
+ /**
+ * Create a new <code>CallTimeDataKey</code>.
+ *
+ * @param schedule the collection schedule corresponding to this call-time data
+ * @param callDestination the call destination (e.g. a URL or an EJB name)
+ */
+ public CallTimeDataKey(@NotNull MeasurementSchedule schedule, @NotNull String callDestination) {
+ this.schedule = schedule;
+ this.callDestination = callDestination;
+ }
+
+ protected CallTimeDataKey() {
+ /* for JPA use only */
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ @Nullable
+ public MeasurementSchedule getSchedule() {
+ return this.schedule;
+ }
+
+ @NotNull
+ public String getCallDestination() {
+ return this.callDestination;
+ }
+
+ @Override
+ public String toString() {
+ return "MeasurementCallDestination[" + "id=" + this.id + ", " + "value=" + this.callDestination + "]";
+ }
}
\ No newline at end of file
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
index 55c0086..d5aee06 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
@@ -168,8 +168,8 @@ public abstract class OperationHistory implements Serializable {
@ManyToOne(fetch = FetchType.EAGER)
private OperationDefinition operationDefinition;
- @JoinColumn(name = "PARAMETERS_CONFIG_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARAMETERS_CONFIG_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY, optional = true)
private Configuration parameters;
protected OperationHistory() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/ResourceOperationHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/ResourceOperationHistory.java
index 4b002b1..08c29be 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/ResourceOperationHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/ResourceOperationHistory.java
@@ -115,12 +115,12 @@ public class ResourceOperationHistory extends OperationHistory {
@XmlTransient
private Resource resource;
- @JoinColumn(name = "RESULTS_CONFIG_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "RESULTS_CONFIG_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private Configuration results;
- @JoinColumn(name = "GROUP_HISTORY_ID", referencedColumnName = "ID")
- @ManyToOne
+ @JoinColumn(name = "GROUP_HISTORY_ID", referencedColumnName = "ID", nullable = true)
+ @ManyToOne(optional = true)
private GroupOperationHistory groupOperationHistory;
protected ResourceOperationHistory() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/ServerPlugin.java b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/ServerPlugin.java
index a0b3d3d..34d2f17 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/ServerPlugin.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/ServerPlugin.java
@@ -262,12 +262,12 @@ public class ServerPlugin extends AbstractPlugin {
public static final String QUERY_GET_CONFIG_MTIMES = "ServerPlugin.getConfigMTimes";
public static final String UPDATE_PLUGIN_ENABLED_BY_ID = "ServerPlugin.updatePluginEnabledById";
- @JoinColumn(name = "JOBS_CONFIG_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "JOBS_CONFIG_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private Configuration scheduledJobsConfiguration;
- @JoinColumn(name = "PLUGIN_CONFIG_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "PLUGIN_CONFIG_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private Configuration pluginConfiguration;
@Column(name = "PTYPE")
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index d58abfa..e31b9ef 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -941,12 +941,11 @@ public class Resource implements Comparable<Resource>, Serializable {
private String location;
@JoinColumn(name = "RESOURCE_TYPE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne
+ @ManyToOne(optional = false)
// TODO GH: It would be preferable for this to be lazy, but will need cleanup throughout the app (fetch = FetchType.LAZY)
@Summary(index = 4)
private ResourceType resourceType;
- // LAZY fetch otherwise this will recursively call all parents until null is found
// do not cascade remove - would take forever to delete a full platform hierarchy
// we will manually delete the children ourselves
@OneToMany(mappedBy = "parentResource", fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST })
@@ -954,21 +953,22 @@ public class Resource implements Comparable<Resource>, Serializable {
// primary key
private Set<Resource> childResources = new LinkedHashSet<Resource>();
- @JoinColumn(name = "PARENT_RESOURCE_ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ // LAZY fetch otherwise this will recursively call all parents until null is found
+ @JoinColumn(name = "PARENT_RESOURCE_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
@XmlTransient
private Resource parentResource;
- @JoinColumn(name = "RES_CONFIGURATION_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "RES_CONFIGURATION_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, optional = true)
private Configuration resourceConfiguration = new Configuration();
- @JoinColumn(name = "PLUGIN_CONFIGURATION_ID", referencedColumnName = "ID")
- @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "PLUGIN_CONFIGURATION_ID", referencedColumnName = "ID", nullable = true)
+ @OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, optional = true)
private Configuration pluginConfiguration = new Configuration();
- @JoinColumn(name = "AGENT_ID", referencedColumnName = "ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "AGENT_ID", referencedColumnName = "ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private Agent agent;
// bulk delete @OneToMany(mappedBy = "resource", cascade = { CascadeType.ALL })
@@ -1050,8 +1050,8 @@ public class Resource implements Comparable<Resource>, Serializable {
@OneToMany(mappedBy = "resource", fetch = FetchType.LAZY)
private Set<EventSource> eventSources = new HashSet<EventSource>();
- @JoinColumn(name = "PRODUCT_VERSION_ID", referencedColumnName = "ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "PRODUCT_VERSION_ID", referencedColumnName = "ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private ProductVersion productVersion;
// not currently needed, but could be added if we find a need to get deployment info via the resource
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
index 9e0ce28..0562890 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
@@ -79,15 +79,15 @@ import org.rhq.core.domain.util.Summary;
@Table(name = ResourceType.TABLE_NAME)
@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_RESOURCE_TYPE_ID_SEQ")
@NamedQueries( {
- @NamedQuery(name = ResourceType.QUERY_FIND_BY_PLUGIN, query = "SELECT rt FROM ResourceType AS rt " +
- "WHERE rt.plugin = :plugin AND rt.deleted = false"),
+ @NamedQuery(name = ResourceType.QUERY_FIND_BY_PLUGIN, query = "SELECT rt FROM ResourceType AS rt "
+ + "WHERE rt.plugin = :plugin AND rt.deleted = false"),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_NAME_AND_PLUGIN, // TODO: QUERY: names are case-sensitive
- query = "SELECT rt FROM ResourceType AS rt WHERE LOWER(rt.name) = LOWER(:name) AND rt.plugin = :plugin " +
- "AND rt.deleted = false"),
+ query = "SELECT rt FROM ResourceType AS rt WHERE LOWER(rt.name) = LOWER(:name) AND rt.plugin = :plugin "
+ + "AND rt.deleted = false"),
@NamedQuery(name = ResourceType.QUERY_FIND_ALL, query = "SELECT rt FROM ResourceType AS rt where rt.deleted = false"),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_PARENT_AND_NAME, // TODO: QUERY: Not looking up by the full key, get rid of this query
- query = "SELECT rt FROM ResourceType AS rt WHERE :parent MEMBER OF rt.parentResourceTypes AND rt.name = :name " +
- "AND rt.deleted = false"),
+ query = "SELECT rt FROM ResourceType AS rt WHERE :parent MEMBER OF rt.parentResourceTypes AND rt.name = :name "
+ + "AND rt.deleted = false"),
/* authz'ed queries for ResourceTypeManagerBean */
@NamedQuery(name = ResourceType.QUERY_FIND_CHILDREN, query = "SELECT c "
@@ -111,8 +111,7 @@ import org.rhq.core.domain.util.Summary;
@NamedQuery(name = ResourceType.QUERY_FIND_UTILIZED_BY_CATEGORY, query = "SELECT DISTINCT res.resourceType "
+ "FROM Resource res, IN (res.implicitGroups) g, IN (g.roles) r, IN (r.subjects) s " //
+ "WHERE s = :subject " //
- + "AND res.resourceType.category = :category "
- + "AND res.resourceType.deleted = false "
+ + "AND res.resourceType.category = :category " + "AND res.resourceType.deleted = false "
+ "AND (UPPER(res.name) LIKE :nameFilter ESCAPE :escapeChar OR :nameFilter is null) "
+ "AND (res.resourceType.plugin = :pluginName OR :pluginName is null) "
+ "AND (:inventoryStatus = res.inventoryStatus OR :inventoryStatus is null) "
@@ -144,8 +143,7 @@ import org.rhq.core.domain.util.Summary;
+ " JOIN rg.resourceType rt" //
+ " JOIN rg.roles r JOIN r.subjects s " //
+ " WHERE s = :subject " //
- + " AND rt.deleted = false "
- + " AND ( rt.plugin = :pluginName OR :pluginName is null ) "),
+ + " AND rt.deleted = false " + " AND ( rt.plugin = :pluginName OR :pluginName is null ) "),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_RESOURCE_GROUP_admin, query = "" //
+ "SELECT DISTINCT rt " //
+ " FROM ResourceGroup rg " //
@@ -153,12 +151,10 @@ import org.rhq.core.domain.util.Summary;
+ " WHERE rt.deleted = false AND ( rt.plugin = :pluginName OR :pluginName is null ) "),
@NamedQuery(name = ResourceType.QUERY_GET_EXPLICIT_RESOURCE_TYPE_COUNTS_BY_GROUP, query = "SELECT type.id, type.name, COUNT(type.id) "
+ "FROM ResourceGroup rg JOIN rg.explicitResources res JOIN res.resourceType type "
- + "WHERE rg.id = :groupId AND res.resourceType.deleted = false "
- + "GROUP BY type.id, type.name "),
+ + "WHERE rg.id = :groupId AND res.resourceType.deleted = false " + "GROUP BY type.id, type.name "),
@NamedQuery(name = ResourceType.QUERY_GET_IMPLICIT_RESOURCE_TYPE_COUNTS_BY_GROUP, query = "SELECT type.id, type.name, COUNT(type.id) "
+ "FROM ResourceGroup rg JOIN rg.implicitResources res JOIN res.resourceType type "
- + "WHERE rg.id = :groupId AND res.resourceType.deleted = false "
- + "GROUP BY type.id, type.name "),
+ + "WHERE rg.id = :groupId AND res.resourceType.deleted = false " + "GROUP BY type.id, type.name "),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_SUBCATEGORY, query = "SELECT rt " + "FROM ResourceType rt "
+ "WHERE rt.subCategory = :subCategory AND rt.deleted = false"),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_ID_WITH_ALL_OPERATIONS, query = "SELECT DISTINCT rt "
@@ -183,18 +179,13 @@ import org.rhq.core.domain.util.Summary;
@NamedQuery(name = ResourceType.QUERY_FIND_DUPLICATE_TYPE_NAMES, query = "" //
+ " SELECT rt.name " //
+ " FROM ResourceType rt " //
- + " WHERE rt.deleted = false "
- + " GROUP BY rt.name " //
+ + " WHERE rt.deleted = false " + " GROUP BY rt.name " //
+ " HAVING COUNT(rt.name) > 1"), //
@NamedQuery(name = ResourceType.QUERY_DYNAMIC_CONFIG_WITH_PLUGIN, query = "" //
+ "SELECT rt.plugin || ' - ' || rt.name, rt.plugin || '-' || rt.name FROM ResourceType rt WHERE rt.deleted = false"), //
- @NamedQuery(name = ResourceType.QUERY_MARK_TYPES_DELETED, query =
- "UPDATE ResourceType t SET t.deleted = true WHERE t.id IN (:resourceTypeIds)"),
- @NamedQuery(name = ResourceType.QUERY_FIND_IDS_BY_PLUGIN, query =
- "SELECT t.id FROM ResourceType t WHERE t.plugin = :plugin AND t.deleted = false"),
- @NamedQuery(name = ResourceType.QUERY_FIND_COUNT_BY_PLUGIN, query =
- "SELECT COUNT(t) FROM ResourceType t WHERE t.plugin = :plugin AND t.deleted = false")
-})
+ @NamedQuery(name = ResourceType.QUERY_MARK_TYPES_DELETED, query = "UPDATE ResourceType t SET t.deleted = true WHERE t.id IN (:resourceTypeIds)"),
+ @NamedQuery(name = ResourceType.QUERY_FIND_IDS_BY_PLUGIN, query = "SELECT t.id FROM ResourceType t WHERE t.plugin = :plugin AND t.deleted = false"),
+ @NamedQuery(name = ResourceType.QUERY_FIND_COUNT_BY_PLUGIN, query = "SELECT COUNT(t) FROM ResourceType t WHERE t.plugin = :plugin AND t.deleted = false") })
@NamedNativeQueries( {
// TODO: Add authz conditions to the below query.
@NamedNativeQuery(name = ResourceType.QUERY_FIND_CHILDREN_BY_CATEGORY, query = "" //
@@ -218,9 +209,9 @@ import org.rhq.core.domain.util.Summary;
+ "AND 0 = "
+ "(SELECT COUNT(rtp2.resource_type_id) "
+ "FROM RHQ_resource_type_parents rtp2 "
- + "WHERE rtp2.resource_type_id = crt2.id) "
- + "AND crt2.deleted = false "
- + "AND crt2.category = ? " + " ) ORDER BY name", resultSetMapping = ResourceType.MAPPING_FIND_CHILDREN_BY_CATEGORY),
+ + "WHERE rtp2.resource_type_id = crt2.id) " + "AND crt2.deleted = false "
+ + "AND crt2.category = ? "
+ + " ) ORDER BY name", resultSetMapping = ResourceType.MAPPING_FIND_CHILDREN_BY_CATEGORY),
@NamedNativeQuery(name = ResourceType.QUERY_FIND_CHILDREN_BY_CATEGORY_admin, query = "" //
+ "(SELECT crt.id, crt.name, crt.category, crt.creation_data_type, crt.create_delete_policy, crt.singleton, crt.supports_manual_add, crt.description, crt.plugin, crt.ctime, crt.mtime, crt.deleted, crt.subcategory_id, crt.plugin_config_def_id, crt.res_config_def_id "
+ "FROM RHQ_resource_type crt, RHQ_resource res, RHQ_resource_type rt, RHQ_resource_type_parents rtp "
@@ -347,18 +338,18 @@ public class ResourceType implements Serializable, Comparable<ResourceType> {
//@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
private Set<ResourceType> parentResourceTypes;
- @JoinColumn(name = "PLUGIN_CONFIG_DEF_ID")
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "PLUGIN_CONFIG_DEF_ID", nullable = true)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
//@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
private ConfigurationDefinition pluginConfigurationDefinition;
- @JoinColumn(name = "RES_CONFIG_DEF_ID")
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "RES_CONFIG_DEF_ID", nullable = true)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
//@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
private ConfigurationDefinition resourceConfigurationDefinition;
- @JoinColumn(name = "SUBCATEGORY_ID")
- @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "SUBCATEGORY_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.LAZY, optional = true)
private ResourceSubCategory subCategory;
@OneToMany(mappedBy = "resourceType", cascade = CascadeType.ALL)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
index b517d59..181e322 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
@@ -89,7 +89,7 @@ public class SavedSearch implements Serializable {
private Long resultCount;
@JoinColumn(name = "SUBJECT_ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private Subject subject;
@Column(name = "SUBJECT_ID", insertable = false, updatable = false)
commit 9ef17a26f0ff774c9bd4fb15e87c215fd8041202
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue May 10 13:42:56 2011 -0400
Related to [BZ 702390 - Large number of BundleDeployments for a single Bundle causes fetch serialization issues]
Revert some of the work done in commit 976c5fc6ed. Add back the LAZY load
on Configuration. Although, I think, it does need to perform additional
querying for the 'null' value determination, it can still proxy a non-null
value on optional XxxToOne associations.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
index dcf6c27..637bf22 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
@@ -74,8 +74,8 @@ import org.rhq.core.domain.tagging.Tag;
+ " WHERE innerbd.destination.id = :destinationId ) "),
@NamedQuery(name = BundleDeployment.QUERY_UPDATE_FOR_VERSION_REMOVE, query = "" //
+ "UPDATE BundleDeployment bd " //
- + " SET bd.replacedBundleDeploymentId = NULL " //
- + " WHERE bd.replacedBundleDeploymentId IN " //
+ + " SET bd.replacedBundleDeploymentId = NULL " //
+ + " WHERE bd.replacedBundleDeploymentId IN " //
+ " ( SELECT innerbd.id FROM BundleDeployment innerbd " //
+ " WHERE innerbd.bundleVersion.id = :bundleVersionId ) ") })
@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ")
@@ -118,15 +118,15 @@ public class BundleDeployment implements Serializable {
@Column(name = "MTIME")
private Long mtime = System.currentTimeMillis();
- // This is not a join column on purpose. Since it is nullable the OneToOne association would be forced to EAGER
- // fetch. That leads to basically fetching every BundleDeployment every time, in a deeply recursive way if you
- // have a lot deployments.
+ // This is intentionally not annotated as a OneToOne association for a BundleDeployment field. If done that way
+ // then a fetch could result in a very deep recursive fetch of all replaced deployments (for many deployments
+ // to a single destination), which is typically not what we want. And, it can cause fits in HibernateDetach
+ // which does not like extreme depth in its recursive scrubbing [BZ 702390].
@Column(name = "REPLACED_BUNDLE_DEPLOYMENT_ID", nullable = true)
private Integer replacedBundleDeploymentId;
- // note - eager fetch, can not lazy fetch an optional OneToOne
@JoinColumn(name = "CONFIG_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(cascade = CascadeType.ALL, optional = true)
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, optional = true)
private Configuration configuration;
@JoinColumn(name = "BUNDLE_VERSION_ID", referencedColumnName = "ID", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
index aa437e3..8449905 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
@@ -49,6 +49,7 @@ public class BundleDeploymentCriteria extends TaggedCriteria {
private String filterSubjectName;
private boolean fetchBundleVersion;
+ private boolean fetchConfiguration;
private boolean fetchDestination;
private boolean fetchResourceDeployments;
@@ -108,6 +109,10 @@ public class BundleDeploymentCriteria extends TaggedCriteria {
this.fetchBundleVersion = fetchBundleVersion;
}
+ public void fetchConfiguration(boolean fetchConfiguration) {
+ this.fetchConfiguration = fetchConfiguration;
+ }
+
public void fetchDestination(boolean fetchDestination) {
this.fetchDestination = fetchDestination;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
index b13df74..e1367e8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
@@ -143,6 +143,7 @@ public class SelectBundleVersionStep extends AbstractWizardStep {
criteria.addFilterDestinationId(wizard.getDestination().getId());
criteria.addFilterIsLive(true);
criteria.fetchBundleVersion(true);
+ criteria.fetchConfiguration(true);
bundleServer.findBundleDeploymentsByCriteria(criteria, //
new AsyncCallback<PageList<BundleDeployment>>() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
index 73ea70c..3542481 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
@@ -421,6 +421,7 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab
BundleDeploymentCriteria criteria = new BundleDeploymentCriteria();
criteria.addFilterId(bundleDeploymentId);
criteria.fetchBundleVersion(true);
+ criteria.fetchConfiguration(true);
criteria.fetchResourceDeployments(true);
criteria.fetchDestination(true);
criteria.fetchTags(true);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
index 7b45a70..5738c64 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
@@ -1110,6 +1110,7 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
BundleDeploymentCriteria bdc = new BundleDeploymentCriteria();
bdc.addFilterId(resourceDeployment.getBundleDeployment().getId());
bdc.fetchBundleVersion(true);
+ bdc.fetchConfiguration(true);
bdc.fetchDestination(true);
BundleDeployment deployment = bundleManager.findBundleDeploymentsByCriteria(subject, bdc).get(0);
commit 7be4ef4c1438be18625af4ec8c4d62ffecb2beb8
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 10 16:57:44 2011 -0400
compile "ja" (Japanese) locale by default; fix so Logout link does not have line breaks between characters when in "ja" locale
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index 9352745..abb5ad6 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -64,8 +64,8 @@
<gwt.draftCompile>false</gwt.draftCompile>
<!-- Comma-separated list of the locales that should be included during GWT compilation. Currently supported
- locales (i.e. locales for which we have localized message bundles) are "en" and "de". -->
- <gwt.locale>en,de</gwt.locale>
+ locales (i.e. locales for which we have localized message bundles) are "en", "de", and "ja". -->
+ <gwt.locale>en,de,ja</gwt.locale>
</properties>
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
index 557042f..f138f6a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
@@ -124,7 +124,8 @@ public class MenuBarView extends LocatableVLayout {
lineLabel.setWidth("12px");
lineLabel.setAlign(Alignment.CENTER);
- String contents = "<a href='#" + LOGOUT_VIEW_ID.getName() + "'>" + LOGOUT_VIEW_ID.getTitle() + "</a>";
+ String contents = "<a href='#" + LOGOUT_VIEW_ID.getName() + "' style='white-space: nowrap'>"
+ + LOGOUT_VIEW_ID.getTitle() + "</a>";
LocatableLabel logoutLink = new LocatableLabel(this.extendLocatorId("LogoutLink"), contents);
logoutLink.setAutoWidth();
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 4c2ee34..69db4a5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -107,7 +107,7 @@
The gwt.locale property is substituted by the Maven resources plugin
during the resources phase. The default value (defined in coregui/pom.xml)
- is "en,de", which are the languages for which we currently have localized
+ is "en,de,ja", which are the languages for which we currently have localized
messages. To override this value, specify the gwt.locale property on the
mvn command line (e.g. -Dgwt.locale=en) or in your ~/.m2/settings.xml.
-->
commit d18f97331b8e56d0bb5a47b61e2e66420be66a83
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 10 14:10:40 2011 -0400
v2 of the SLSB leak fix, which configures the SLSBs to use the strict max pool via the jboss.xml deployment descriptor, rather than PoolClass annotations on the SLSB classes (https://bugzilla.redhat.com/show_bug.cgi?id=693232)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
index 8ee77c9..a26472e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
@@ -34,8 +34,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.exception.ConstraintViolationException;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionLog;
import org.rhq.core.domain.alert.AlertDampeningEvent;
@@ -47,19 +45,6 @@ import org.rhq.enterprise.server.RHQConstants;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
-// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
-// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
-// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
-// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
-// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
-// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
-// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
-// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
-// pool size to 100 (30 is the default value), to lower the chances of AlertConditionConsumerBean
-// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
-// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 100)
public class AlertConditionLogManagerBean implements AlertConditionLogManagerLocal {
private final Log log = LogFactory.getLog(AlertConditionLogManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
index 3094fc8..ef2ac95 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
@@ -32,8 +32,6 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionCategory;
import org.rhq.core.domain.alert.AlertDefinition;
@@ -51,19 +49,6 @@ import org.rhq.enterprise.server.authz.PermissionException;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
-// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
-// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
-// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
-// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
-// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
-// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
-// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
-// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
-// pool size to 100 (30 is the default value), to lower the chances of AlertConditionConsumerBean
-// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
-// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 100)
public class AlertConditionManagerBean implements AlertConditionManagerLocal {
private static final Log LOG = LogFactory.getLog(AlertConditionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
index 8d36704..dc5a2d4 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
@@ -31,8 +31,6 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDampening;
import org.rhq.core.domain.alert.AlertDampeningEvent;
import org.rhq.core.domain.alert.AlertDefinition;
@@ -43,19 +41,6 @@ import org.rhq.enterprise.server.RHQConstants;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
-// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
-// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
-// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
-// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
-// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
-// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
-// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
-// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
-// pool size to 100 (30 is the default value), to lower the chances of AlertConditionConsumerBean
-// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
-// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 100)
public class AlertDampeningManagerBean implements AlertDampeningManagerLocal {
private final Log log = LogFactory.getLog(AlertDampeningManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
index 828e2bb..22a2e21 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
@@ -34,8 +34,6 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionCategory;
import org.rhq.core.domain.alert.AlertConditionLog;
@@ -69,19 +67,6 @@ import org.rhq.enterprise.server.util.CriteriaQueryGenerator.AuthorizationTokenT
* @author Joseph Marques
*/
@Stateless
-// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
-// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
-// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
-// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
-// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
-// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
-// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
-// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
-// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
-// pool size to 100 (30 is the default value), to lower the chances of AlertConditionConsumerBean
-// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
-// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 100)
public class AlertDefinitionManagerBean implements AlertDefinitionManagerLocal, AlertDefinitionManagerRemote {
private static final Log LOG = LogFactory.getLog(AlertDefinitionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
index 685f461..de2b789 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
@@ -28,8 +28,6 @@ import javax.persistence.PersistenceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDampeningEvent;
import org.rhq.core.domain.alert.AlertDefinition;
import org.rhq.enterprise.server.RHQConstants;
@@ -45,19 +43,6 @@ import org.rhq.enterprise.server.alert.engine.jms.model.InactiveAlertConditionMe
* @author Joseph Marques
*/
@Stateless
-// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
-// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
-// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
-// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
-// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
-// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
-// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
-// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
-// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
-// pool size to 100 (30 is the default value), to lower the chances of AlertConditionConsumerBean
-// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
-// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 100)
public class CachedConditionManagerBean implements CachedConditionManagerLocal {
private final Log log = LogFactory.getLog(CachedConditionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
index 35394d6..4b98c67 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
@@ -32,8 +32,6 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.cloud.FailoverListDetails;
@@ -58,18 +56,6 @@ import org.rhq.enterprise.server.util.LookupUtil;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
-// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
-// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
-// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
-// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
-// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
-// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
-// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
-// timers, we set the max pool size to 50 (the default is 30) to lower the chances of EJB
-// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
-// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 50)
public class CloudManagerBean implements CloudManagerLocal {
private final Log log = LogFactory.getLog(CloudManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
index eeeb812..dfd1990 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
@@ -33,8 +33,6 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDefinition;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.cloud.Server;
@@ -67,18 +65,6 @@ import org.rhq.enterprise.server.util.LookupUtil;
* require holding these locks as part of their processing.
*/
@Stateless
-// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
-// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
-// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
-// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
-// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
-// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
-// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
-// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
-// timers, we set the max pool size to 50 (the default is 30) to lower the chances of EJB
-// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
-// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 50)
public class StatusManagerBean implements StatusManagerLocal {
private final Log log = LogFactory.getLog(StatusManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
index a8b5499..2de7bad 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
@@ -34,8 +34,6 @@ import javax.ejb.TransactionAttributeType;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerLocal;
/**
@@ -46,18 +44,6 @@ import org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerLocal;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
-// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
-// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
-// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
-// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
-// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
-// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
-// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
-// timers, we set the max pool size to 50 (the default is 30) to lower the chances of EJB
-// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
-// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 50)
public class CacheConsistencyManagerBean implements CacheConsistencyManagerLocal {
private final Log log = LogFactory.getLog(CacheConsistencyManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
index dd7790b..be91c65 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
@@ -38,8 +38,6 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.annotation.ejb.PoolClass;
-import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.cloud.PartitionEventType;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.resource.Agent;
@@ -66,18 +64,6 @@ import org.rhq.enterprise.server.core.comm.ServerCommunicationsServiceUtil;
* @author Joseph Marques
*/
@Stateless
-// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
-// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
-// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
-// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
-// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
-// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
-// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
-// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
-// timers, we set the max pool size to 50 (the default is 30) to lower the chances of EJB
-// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
-// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 50)
public class ServerManagerBean implements ServerManagerLocal {
private final Log log = LogFactory.getLog(ServerManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
index 67184cf..19a454a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
@@ -51,9 +51,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
-import org.jboss.annotation.ejb.PoolClass;
import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.ejb3.StrictMaxPool;
import org.jboss.mx.util.MBeanServerLocator;
import org.rhq.core.db.DatabaseType;
@@ -76,18 +74,6 @@ import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.enterprise.server.util.SystemDatabaseInformation;
@Stateless
-// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
-// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
-// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
-// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
-// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
-// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
-// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
-// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
-// timers, we set the max pool size to 50 (the default is 30) to lower the chances of EJB
-// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
-// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
-@PoolClass(value = StrictMaxPool.class, maxSize = 50)
public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemote {
private final String SQL_VACUUM = "VACUUM ANALYZE {0}";
diff --git a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
index eef6d52..8892da8 100644
--- a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
+++ b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
@@ -1,6 +1,141 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
-<jboss>
+<jboss xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+
+ <enterprise-beans>
+
+ <!--
+ The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+ AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+ indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+ the default SLSB pool impl (ThreadlocalPool) would cause a new instance of this SLSB to be created
+ every time it was invoked by AlertConditionConsumerBean. This would be bad if only because an existing instance would
+ not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+ gradually leak until the Server eventually ran out of memory. Hence, we must use a StrictMaxPool, which
+ will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because lots of alert
+ definitions could result in many concurrent calls to AlertConditionConsumerBean, and because most of these
+ SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's), we set the max pool size to 100 to
+ minimize the chances of AlertConditionConsumerBean invocations, which are the most critical, from having to
+ block and potentially getting backed up in the queue. We set the pool timeout extremely high to essentially
+ prevent queued callers from timing out. Note, MDB's are configured in ejb3-interceptors-aop.xml to use a strict
+ max pool with a max of 15 and a timeout of 10000, so AlertConditionConsumerBean could become a bottleneck for
+ systems with a lot of alerts defined. (ips, 05/10/11)
+
+ For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 .
+ -->
+
+ <session>
+ <ejb-name>AlertConditionLogManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>AlertConditionManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>AlertDampeningManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>AlertDefinitionManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>CachedConditionManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+
+ <!--
+ The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+ SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+ done in new threads, using the default SLSB pool impl (ThreadlocalPool) would cause a new instance of this
+ SLSB to be created every time it was invoked by an EJB timer. This would be bad if only because an existing
+ instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+ heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+ StrictMaxPool, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+ The timer invocations will only require one or two instances at any given time, but because most of these
+ SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's, we set the max pool size to 30, to
+ minimize the chances of EJB timer invocations, which are the most critical, from having to block and
+ potentially getting backed up in the queue. We set the pool timeout extremely high to essentially prevent
+ queued callers from timing out. (ips, 05/10/11)
+
+ For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 .
+ -->
+
+ <session>
+ <ejb-name>CacheConsistencyManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>30</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>CloudManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>30</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>ServerManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>30</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>StatusManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>30</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>SystemManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>30</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ </enterprise-beans>
</jboss>
13 years, 1 month
[rhq] 2 commits - modules/enterprise
by Heiko W. Rupp
modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties | 250 ++++++++++
modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml | 1
2 files changed, 251 insertions(+)
New commits:
commit 7d3d67fd9e7b766d13f0daf39eaf07d7c625f11b
Merge: c10d876 0a31209
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu May 12 10:22:16 2011 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit c10d8762ef84e49c214e91dcf1eafee51cf2607f
Author: Jijun Liu <lxjijun(a)gmail.com>
Date: Thu May 12 10:13:51 2011 +0200
Chinese Installer messages.
diff --git a/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties
new file mode 100644
index 0000000..06c2191
--- /dev/null
+++ b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_zh.properties
@@ -0,0 +1,250 @@
+createDatabaseUserTitle=\u521b\u5efa\u6570\u636e\u5e93/\u7528\u6237
+createDatabaseUserHelp=\u5728\u8fd9\u91cc\u8f93\u5165\u7ba1\u7406\u5458\u4fe1\u606f,\u70b9\u51fb\u6309\u94ae\u6765\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u548c\u7528\u6237.
+adminConnectionUrl=DB\u8fde\u63a5URL
+adminUsername=\u6570\u636e\u5e93\u7ba1\u7406\u5458\u540d\u79f0
+adminPassword=\u6570\u636e\u5e93\u7ba1\u7406\u5458\u5bc6\u7801
+experimentalDb=\u5df2\u9009\u7684\u6570\u636e\u5e93\u53ea\u80fd\u7528\u6765\u4f5c\u6f14\u793a\u76ee\u7684.\u4e0d\u5e94\u8be5\u7528\u4e8e\u6b63\u5f0f\u4ea7\u54c1\u4f7f\u7528. \u4f7f\u7528H2\u6216MS SQL\u5c06\u6ca1\u6709\u5b89\u88c5\u652f\u6301.
+createDatabaseNote=\u5982\u679c\u4e0d\u5b58\u5728,\u5c06\u521b\u5efa\u6570\u636e\u5e93/\u7528\u6237
+createDatabaseButton=\u521b\u5efa\u6570\u636e\u5e93
+testDatabaseNote=\u9a8c\u8bc1\u6570\u636e\u5e93\u914d\u7f6e
+testDatabaseButton=\u6d4b\u8bd5\u8fde\u63a5
+existingSchemaQuestion=\u6307\u5b9a\u7684\u6570\u636e\u5e93\u5b58\u5728.\u5c06\u5982\u4f55\u64cd\u4f5c?
+existingSchemaAnswerOverwrite=\u8986\u76d6 (\u8986\u76d6\u5df2\u5b58\u5728\u6570\u636e)
+existingSchemaAnswerUpgrade=\u4fdd\u7559 (\u7ef4\u62a4\u5b58\u5728\u6570\u636e)
+existingSchemaAnswerSkip=\u8df3\u8fc7 (\u4e0d\u505a\u4efb\u4f55\u64cd\u4f5c)
+invalidNumber=\u5c5e\u6027{0}\u662f\u65e0\u6548\u6570\u5b57[{1}]
+invalidBoolean=\u5e03\u5c14\u503c{0}\u5e94\u8be5\u662f'true'\u6216'false'\u800c\u4e0d\u5e94\u662f[{1}]
+invalidString=\u5c5e\u6027{0}\u5fc5\u987b\u8bbe\u7f6e.
+saveFailure=\u4fdd\u5b58\u5c5e\u6027\u5b8c\u5168\u90e8\u7f72\u5931\u8d25 - RHQ\u5c06\u4e0d\u80fd\u6b63\u5e38\u5de5\u4f5c\n\
+\u539f\u56e0: {0}
+errorLabel=\u9519\u8bef
+saveError=\u56e0\u672a\u77e5\u539f\u56e0\u65e0\u6cd5\u4fdd\u5b58\u8bbe\u7f6e.
+invalidDatabaseSettings=\u65e0\u6cd5\u8fde\u63a5\u5230\u7ed9\u5b9a\u6570\u636e\u5e93. \n\
+\u8bf7\u68c0\u67e5\u6570\u636e\u5e93\u914d\u7f6e\u5e76\u4e14\u786e\u8ba4\u6570\u636e\u5e93\u5728\u8fd0\u884c\u4e2d.
+setPropertiesInstructions=\u8fd9\u662fRHQ\u670d\u52a1\u5668\u5b89\u88c5\u7684\u914d\u7f6e\u8bbe\u7f6e. \n\
+\u4f60\u53ef\u4ee5\u6309\u9700\u5b9a\u5236. \u5355\u51fb\u4e0d\u540c\u9009\u9879\u540d\u67e5\u770b\u5e2e\u52a9. \u5bf9\u4e8e\u6807\u8bb0\u4e3a"\u9700\u8981\u91cd\u542f"\u7684\u9009\u9879 \n\
+\u9700\u8981\u91cd\u542f\u624d\u80fd\u751f\u6548. \u6240\u4ee5\u5b89\u88c5\u5b8c\u6210\u540e,\u8981\u9a6c\u4e0a\u91cd\u542f\u670d\u52a1\u5668.
+advancedSettingsInstructions=\u5355\u51fb\u4e0b\u9762\u590d\u9009\u6846\u67e5\u770b\u6807\u51c6\u8bbe\u7f6e\u548c\u9ad8\u7ea7\u8bbe\u7f6e.
+installButtonsText=\u5355\u51fb'\u5b89\u88c5\u4ea7\u54c1'\u5f00\u59cb\u666e\u901a\u5b89\u88c5.\n\
+\u5355\u51fb\u6309\u94ae'\u5d4c\u5165\u5f0f\u5b89\u88c5'\u5c06\u5feb\u901f\u7684\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u6570\u636e\u5e93\u548c\u5d4c\u5165\u7684Agent\u7684\u5b8c\u6574\u73af\u5883.\u5d4c\u5165\u5f0f\u5b89\u88c5\u53ea\u80fd\u7528\u6765\u6f14\u793a\u6216\u8bc4\u4f30!
+orText=-- or --
+saveEmbeddedMode=\u5d4c\u5165\u5f0f\u5b89\u88c5
+databaseSettingsInstructions=\u6570\u636e\u5e93\u914d\u7f6e. \u6240\u6709\u4fe1\u606f\u90fd\u8981\u8f93\u5165. \u4f7f\u7528\u6309\u94ae"\u6d4b\u8bd5\u8fde\u63a5"\u6765\u9a8c\u8bc1\u8bbe\u7f6e.
+installSettingsInstructions= \u5b9a\u4e49\u9700\u8981\u7684\u670d\u52a1\u5668\u4fe1\u606f.
+installSettingsNote1=\u5982\u679c\u5347\u7ea7\u6216\u91cd\u88c5\u8bf7\u5728\u5217\u8868\u4e2d\u9009\u62e9\u6ce8\u518c\u7684\u670d\u52a1\u5668:
+installSettingsNote2=\u5982\u679c\u5b89\u88c5\u4e00\u4e2a\u65b0\u670d\u52a1\u5668\u8bf7\u5728\u4e0b\u9762\u8f93\u5165\u670d\u52a1\u5668\u7aef\u914d\u7f6e:
+serverSettingsInstructions=\u4ee5\u4e0b\u9009\u9879\u90fd\u662f\u5fc5\u987b\u7684.
+save=\u5b89\u88c5\u670d\u52a1\u5668!
+yesString=\u662f
+noString=\u5426
+propertyName=\u5c5e\u6027\u540d
+value=\u503c
+requiresRestart=\u9700\u8981\u91cd\u542f?
+welcomeTitle=\u6b22\u8fce\u4f7f\u7528RHQ!
+welcomeMessage=\u5f00\u59cb\u5b89\u88c5RHQ. \u8fd9\u4e2a\u9875\u9762\u7528\u6765\n\
+\u5b89\u88c5\u914d\u7f6eRHQ\u670d\u52a1\u5668. \n\
+\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e,\u5c06\u53ef\u4ee5\u767b\u5f55\u4f7f\u7528RHQ.
+starting=\u8fdb\u884c\u4e2d,\u8bf7\u7b49\u5f85 ...
+alreadyInstalled=RHQ\u5c06\u8981\u5b89\u88c5!
+alreadyInstalledStartedLink=\u5b8c\u6210!\u70b9\u51fb\u6b64\u5904\u5f00\u59cb!
+startInstallingLink=\u7ee7\u7eed\u5b89\u88c5\u8bf7\u70b9\u51fb\u8fd9\u91cc
+backToSettingsLink=\u8fd4\u56de\u914d\u7f6e\u9875\u9762
+showAdvancedSettings=\u663e\u793a\u9ad8\u7ea7\u9009\u9879
+propertyDatabaseType=\u6570\u636e\u5e93\u7c7b\u578b
+propertyDatabaseTypeHelp=-DatabaseType
+propertyDatabaseConnectionUrl=\u6570\u636e\u5e93\u8fde\u63a5URL
+propertyDatabaseConnectionUrlHelp=-DatabaseConnectionURL
+propertyDatabaseDriverClass=\u6570\u636e\u5e93JDBC\u9a71\u52a8
+propertyDatabaseDriverClassHelp=-DatabaseJDBCDriverClass
+propertyDatabaseXADataSourceClass=\u6570\u636e\u5e93XA\u6570\u636e\u6e90\u7c7b
+propertyDatabaseXADataSourceClassHelp=-DatabaseXADataSourceClass
+propertyDatabaseUserName=\u6570\u636e\u5e93\u7528\u6237\u540d
+propertyDatabaseUserNameHelp=-DatabaseUserName
+propertyDatabasePassword=\u6570\u636e\u5e93\u5bc6\u7801
+propertyDatabasePasswordHelp=-DatabasePassword
+propertyBindAddress=\u670d\u52a1\u5668\u76d1\u542c\u5730\u5740
+propertyBindAddressHelp=-ServerBindAddress
+propertyHttpPort=HTTP\u7aef\u53e3
+propertyHttpPortHelp=-HTTPPort
+propertyHttpsPort=\u5b89\u5168HTTPS\u7aef\u53e3
+propertyHttpsPortHelp=-SecureHTTPSPort
+propertyWebServicePort=Web Service\u7aef\u53e3
+propertyWebServicePortHelp=-WebServicePort
+propertyNamingServicePort=Naming Service\u7aef\u53e3
+propertyNamingServicePortHelp=-NamingServicePort
+propertyNamingServiceRmiPort=Naming Service RMI\u7aef\u53e3
+propertyNamingServiceRmiPortHelp=-NamingServiceRMIPort
+propertyJrmpInvokerRmiPort=JRMP Invoker RMI\u7aef\u53e3
+propertyJrmpInvokerRmiPortHelp=-JRMPInvokerRMIPort
+propertyPooledInvokerRmiPort=Pooled Invoker RMI\u7aef\u53e3
+propertyPooledInvokerRmiPortHelp=-PooledInvokerRMIPort
+propertyAjpPort=AJP\u7aef\u53e3
+propertyAjpPortHelp=-AJPPort
+propertyUnifiedInvokerPort=\u7edf\u4e00Invoker\u7aef\u53e3
+propertyUnifiedInvokerPortHelp=-UnifiedInvokerPort
+propertyAspectDeployerPort=Aspect Deployer\u7aef\u53e3
+propertyAspectDeployerPortHelp=-AspectDeployerPort
+propertyTomcatClientAuthMode=Tomcat\u5ba2\u6237\u7aef\u6388\u6743\u6a21\u5f0f
+propertyTomcatClientAuthModeHelp=-TomcatClientAuthMode
+propertyTomcatAlgorithm=Tomcat Keystore/Truststore\u7b97\u6cd5
+propertyTomcatAlgorithmHelp=-TomcatAlgorithm
+propertyTomcatKeystoreFilename=Tomcat Keystore
+propertyTomcatKeystoreFilenameHelp=-TomcatKeystore
+propertyTomcatKeystorePassword=Tomcat Keystore\u5bc6\u7801
+propertyTomcatKeystorePasswordHelp=-TomcatKeystorePassword
+propertyTomcatKeystoreType=Tomcat Keystore\u7c7b\u578b
+propertyTomcatKeystoreTypeHelp=-TomcatKeystoreType
+propertyTomcatKeystoreAlias=Tomcat Keystore Alias
+propertyTomcatKeystoreAliasHelp=-TomcatKeystoreAlias
+propertyTomcatTruststoreFilename=Tomcat Truststore
+propertyTomcatTruststoreFilenameHelp=-TomcatTruststore
+propertyTomcatTruststorePassword=Tomcat Truststore\u5bc6\u7801
+propertyTomcatTruststorePasswordHelp=-TomcatTruststorePassword
+propertyTomcatTruststoreType=Tomcat Truststore\u7c7b\u578b
+propertyTomcatTruststoreTypeHelp=-TomcatTruststoreType
+propertyTomcatSslProtocol=Tomcat SSL\u534f\u8bae
+propertyTomcatSslProtocolHelp=-TomcatSSLProtocol
+propertyConnectorTransport=\u63a5\u6536Agent\u901a\u4fe1\u4f20\u8f93
+propertyConnectorTransportHelp=-IncomingAgentCommunicationsTransport
+propertyConnectorBindAddress=\u63a5\u6536Agent\u901a\u4fe1\u76d1\u542c\u5730\u5740
+propertyConnectorBindAddressHelp=-IncomingAgentCommunicationsBindAddress
+propertyConnectorBindPort=\u63a5\u6536Agent\u901a\u4fe1\u7aef\u53e3
+propertyConnectorBindPortHelp=-IncomingAgentCommunicationsPort
+propertyConnectorTransportParams=\u63a5\u6536Agent\u901a\u4fe1\u4f20\u8f93\u53c2\u6570
+propertyConnectorTransportParamsHelp=-IncomingAgentCommunicationsTransportParameters
+propertyAgentMulticastDetectorEnabled=\u542f\u7528Agent\u591a\u64ad\u63a2\u6d4b\u5668
+propertyAgentMulticastDetectorEnabledHelp=-AgentMulticastDetectorEnabled
+propertyAgentMulticastDetectorBindAddress=Agent\u591a\u64ad\u63a2\u6d4b\u5668\u76d1\u542c\u5730\u5740
+propertyAgentMulticastDetectorBindAddressHelp=-AgentMulticastDetectorBindAddress
+propertyAgentMulticastDetectorMulticastAddress=Agent \u7ec4\u64ad\u5730\u5740\u591a\u64ad\u63a2\u6d4b\u5668
+propertyAgentMulticastDetectorMulticastAddressHelp=-AgentMulticastDetectorMulticastAddress
+propertyAgentMulticastDetectorPort=Agent\u591a\u64ad\u63a2\u6d4b\u5668\u7aef\u53e3
+propertyAgentMulticastDetectorPortHelp=-AgentMulticastDetectorPort
+propertySecurityServerSecureSocketProtocol=\u63a5\u6536\u5b89\u5168 - \u5b89\u5168Socket\u534f\u8bae
+propertySecurityServerSecureSocketProtocolHelp=-IncomingSecureSocketProtocol
+propertySecurityServerKeystoreFile=\u63a5\u6536\u5b89\u5168 - Keystore\u6587\u4ef6
+propertySecurityServerKeystoreFileHelp=-IncomingKeystoreFile
+propertySecurityServerKeystoreAlgorithm=\u63a5\u6536\u5b89\u5168 - Keystore\u7b97\u6cd5
+propertySecurityServerKeystoreAlgorithmHelp=-IncomingKeystoreAlgorithm
+propertySecurityServerKeystoreType=\u63a5\u6536\u5b89\u5168 - Keystore\u7c7b\u578b
+propertySecurityServerKeystoreTypeHelp=-IncomingKeystoreType
+propertySecurityServerKeystorePassword=\u63a5\u6536\u5b89\u5168 - Keystore\u5bc6\u7801
+propertySecurityServerKeystorePasswordHelp=-IncomingKeystorePassword
+propertySecurityServerKeystoreKeyPassword=\u63a5\u6536\u5b89\u5168 - Keystore Key\u5bc6\u7801
+propertySecurityServerKeystoreKeyPasswordHelp=-IncomingKeystoreKeyPassword
+propertySecurityServerKeystoreAlias=\u63a5\u6536\u5b89\u5168 - Keystore Alias
+propertySecurityServerKeystoreAliasHelp=-IncomingKeystoreAlias
+propertySecurityServerTruststoreFile=\u63a5\u6536\u5b89\u5168 - Truststore\u6587\u4ef6
+propertySecurityServerTruststoreFileHelp=-IncomingTruststoreFile
+propertySecurityServerTruststoreAlgorithm=\u63a5\u6536\u5b89\u5168 - Truststore\u7b97\u6cd5
+propertySecurityServerTruststoreAlgorithmHelp=-IncomingTruststoreAlgorithm
+propertySecurityServerTruststoreType=\u63a5\u6536\u5b89\u5168 - Truststore\u7c7b\u578b
+propertySecurityServerTruststoreTypeHelp=-IncomingTruststoreType
+propertySecurityServerTruststorePassword=\u63a5\u6536\u5b89\u5168 - Truststore\u5bc6\u7801
+propertySecurityServerTruststorePasswordHelp=-IncomingTruststorePassword
+propertySecurityServerClientAuthMode=\u63a5\u6536\u5b89\u5168 - \u5ba2\u6237\u7aef\u6388\u6743\u6a21\u5f0f
+propertySecurityServerClientAuthModeHelp=-IncomingClientAuthenticationMode
+propertySecurityClientSecureSocketProtocol=\u5916\u53d1\u5b89\u5168 - \u5b89\u5168Socket\u534f\u8bae
+propertySecurityClientSecureSocketProtocolHelp=-OutgoingSecureSocketProtocol
+propertySecurityClientKeystoreFile=\u5916\u53d1\u5b89\u5168 - Keystore\u6587\u4ef6
+propertySecurityClientKeystoreFileHelp=-OutgoingKeystoreFile
+propertySecurityClientKeystoreAlgorithm=\u5916\u53d1\u5b89\u5168 - Keystore\u7b97\u6cd5
+propertySecurityClientKeystoreAlgorithmHelp=-OutgoingKeystoreAlgorithm
+propertySecurityClientKeystoreType=\u5916\u53d1\u5b89\u5168 - Keystore\u7c7b\u578b
+propertySecurityClientKeystoreTypeHelp=-OutgoingKeystoreType
+propertySecurityClientKeystorePassword=\u5916\u53d1\u5b89\u5168 - Keystore\u5bc6\u7801
+propertySecurityClientKeystorePasswordHelp=-OutgoingKeystorePassword
+propertySecurityClientKeystoreKeyPassword=\u5916\u53d1\u5b89\u5168 - Keystore Key\u5bc6\u7801
+propertySecurityClientKeystoreKeyPasswordHelp=-OutgoingKeystoreKeyPassword
+propertySecurityClientKeystoreAlias=\u5916\u53d1\u5b89\u5168 - Keystore Alias
+propertySecurityClientKeystoreAliasHelp=-OutgoingKeystoreAlias
+propertySecurityClientTruststoreFile=\u5916\u53d1\u5b89\u5168 - Truststore\u6587\u4ef6
+propertySecurityClientTruststoreFileHelp=-OutgoingTruststoreFile
+propertySecurityClientTruststoreAlgorithm=\u5916\u53d1\u5b89\u5168 - Truststore\u7b97\u6cd5
+propertySecurityClientTruststoreAlgorithmHelp=-OutgoingTruststoreAlgorithm
+propertySecurityClientTruststoreType=\u5916\u53d1\u5b89\u5168 - Truststore\u7c7b\u578b
+propertySecurityClientTruststoreTypeHelp=-OutgoingTruststoreType
+propertySecurityClientTruststorePassword=\u5916\u53d1\u5b89\u5168 - Truststore\u5bc6\u7801
+propertySecurityClientTruststorePasswordHelp=-OutgoingTruststorePassword
+propertySecurityClientServerAuthModeEnabled=\u5916\u53d1\u5b89\u5168 - \u542f\u7528\u670d\u52a1\u5668\u6388\u6743\u6a21\u5f0f
+propertySecurityClientServerAuthModeEnabledHelp=-OutgoingServerAuthenticationModeEnabled
+propertyEmbeddedRHQAgentEnabled=\u542f\u7528\u5d4c\u5165Agent
+propertyEmbeddedRHQAgentEnabledHelp=-EmbeddedRHQAgentEnabled
+propertyEmbeddedRHQAgentName=\u5d4c\u5165Agent\u540d\u79f0
+propertyEmbeddedRHQAgentNameHelp=-EmbeddedRHQAgentName
+propertyEmbeddedRHQAgentDisableNativeSystem=\u5d4c\u5165Agent\u7981\u7528\u672c\u5730\u7cfb\u7edf
+propertyEmbeddedRHQAgentDisableNativeSystemHelp=-EmbeddedRHQAgentDisableNativeSystem
+propertyEmbeddedRHQAgentResetConfiguration=\u5d4c\u5165Agent\u91cd\u7f6e\u914d\u7f6e
+propertyEmbeddedRHQAgentResetConfigurationHelp=-EmbeddedRHQAgentResetConfiguration
+propertyEmailSmtpHost=\u90ae\u4ef6SMTP\u4e3b\u673a\u540d
+propertyEmailSmtpHostHelp=-EmailSMTPHostname
+propertyEmailSmtpPort=\u90ae\u4ef6SMTP\u7aef\u53e3
+propertyEmailSmtpPortHelp=-EmailSMTPPort
+propertyEmailFromAddress=\u53d1\u9001\u90ae\u4ef6\u5730\u5740
+propertyEmailFromAddressHelp=-EmailFromAddress
+propertyOperationTimeout=\u9ed8\u8ba4Operation Invocation\u8d85\u65f6\u65f6\u95f4
+propertyOperationTimeoutHelp=-OperationInvocationDefaultTimeout
+propertyClusterPartitionName=\u96c6\u7fa4 - Partition Name
+propertyClusterPartitionNameHelp=-PartitionName
+propertyClusterPartitionBindAddress=\u96c6\u7fa4 - Partition\u76d1\u542c\u5730\u5740
+propertyClusterPartitionBindAddressHelp=-PartitionBindAddress
+propertyClusterUdpGroup=\u96c6\u7fa4 - Partition UDP Multicast Group IP\u5730\u5740
+propertyClusterUdpGroupHelp=-PartitionUDPMulticastGroupIPAddress
+propertyClusterHaPartitionPort=\u96c6\u7fa4 - Partition UDP\u591a\u64ad\u7aef\u53e3
+propertyClusterHaPartitionPortHelp=-PartitionUDPMulticastPort
+propertyClusterEjb3CachePort=\u96c6\u7fa4 - Partition UDP EJB3\u5b9e\u4f53\u7f13\u5b58\u591a\u64ad\u7aef\u53e3
+propertyClusterEjb3CachePortHelp=-PartitionUDPEJB3EntityCacheMulticastPort
+propertyClusterAlertCachePort=\u96c6\u7fa4 - Partition UDP\u544a\u8b66\u7f13\u5b58\u591a\u64ad\u7aef\u53e3
+propertyClusterAlertCachePortHelp=-PartitionUDPAlertCacheMulticastPort
+propertyClusterUdpLoopback=\u96c6\u7fa4 - Partition UDP\u56de\u73af
+propertyClusterUdpLoopbackHelp=-PartitionUDPLoopback
+propertyClusterHaJndiPort=\u96c6\u7fa4 - HA JNDI\u7aef\u53e3
+propertyClusterHaJndiPortHelp=-HAJNDIPort
+propertyClusterHaJndiRmiPort=\u96c6\u7fa4 - HA JNDI RMI\u7aef\u53e3
+propertyClusterHaJndiRmiPortHelp=-HAJNDIRMIPort
+propertyClusterHaJndiAutoDiscoveryPort=\u96c6\u7fa4 - HA JNDI\u81ea\u52a8\u53d1\u73b0\u7ec4\u7aef\u53e3
+propertyClusterHaJndiAutoDiscoveryPortHelp=-HAJNDIAutoDiscoveryGroupPort
+propertyClusterHaJrmpInvokerRmiPort=\u96c6\u7fa4 - HA JRMP Invoker RMI\u7aef\u53e3
+propertyClusterHaJrmpInvokerRmiPortHelp=-HAJRMPInvokerRMIPort
+propertyClusterHaPooledInvokerPort=\u96c6\u7fa4 - HA Pooled Invoker\u7aef\u53e3
+propertyClusterHaPooledInvokerPortHelp=-HAPooledInvokerPort
+propertyClusterJGroupsUdpIpTtl=\u96c6\u7fa4 - JGroups UDP IP\u5b58\u6d3b\u65f6\u95f4
+propertyClusterJGroupsUdpIpTtlHelp=-JGroupsUDPIPTimeToLive
+propertyConcurrencyLimitWebConns=\u5e76\u53d1\u6570\u9650\u5236 - \u6700\u5927Web\u8fde\u63a5\u6570
+propertyConcurrencyLimitWebConnsHelp=-WebConnections
+propertyConcurrencyLimitGlobal=\u5e76\u53d1\u6570\u9650\u5236 - \u5168\u5c40
+propertyConcurrencyLimitGlobalHelp=-GlobalConcurrencyLimit
+propertyConcurrencyLimitInventoryReport=\u5e76\u53d1\u6570\u9650\u5236 - \u6e05\u5355\u62a5\u8868
+propertyConcurrencyLimitInventoryReportHelp=-InventoryReport
+propertyConcurrencyLimitAvailabilityReport=\u5e76\u53d1\u6570\u9650\u5236 - \u53ef\u7528\u6027\u62a5\u8868
+propertyConcurrencyLimitAvailabilityReportHelp=-AvailabilityReport
+propertyConcurrencyLimitInventorySync=\u5e76\u53d1\u6570\u9650\u5236 - \u6e05\u5355\u540c\u6b65
+propertyConcurrencyLimitInventorySyncHelp=-InventorySynchronization
+propertyConcurrencyLimitContentReport=\u5e76\u53d1\u6570\u9650\u5236 - Content\u62a5\u8868
+propertyConcurrencyLimitContentReportHelp=-ContentReport
+propertyConcurrencyLimitContentDownload=\u5e76\u53d1\u6570\u9650\u5236 - Content\u4e0b\u8f7d
+propertyConcurrencyLimitContentDownloadHelp=-ContentDownload
+propertyConcurrencyLimitMeasurementReport=\u5e76\u53d1\u6570\u9650\u5236 - \u6027\u80fd\u62a5\u8868
+propertyConcurrencyLimitMeasurementReportHelp=-MeasurementReport
+propertyConcurrencyLimitMeasurementScheduleRequest=\u5e76\u53d1\u6570\u9650\u5236 - Measurement Schedule\u8bf7\u6c42
+propertyConcurrencyLimitMeasurementScheduleRequestHelp=-MeasurementScheduleRequest
+introduceHelpDocs=\u60f3\u66f4\u591a\u4e86\u89e3RHQ,\u8bf7\u67e5\u770b\u4e0b\u9762\u7684\u6587\u6863\u94fe\u63a5:
+helpDocRHQServerInstallGuide=\u5b89\u88c5
+helpDocRHQServerInstallGuideLabel=RHQ\u670d\u52a1\u5668\u5b89\u88c5\u6307\u5357
+helpDocRHQGuiConsoleUsersGuide=GUI+Console+Users+Guide
+helpDocRHQGuiConsoleUsersGuideLabel=RHQ GUI Console\u7528\u6237\u6307\u5357
+helpDocRHQServerUsersGuide=Running+the+RHQ+Server
+helpDocRHQServerUsersGuideLabel=RHQ\u670d\u52a1\u5668\u7528\u6237\u6307\u5357
+helpDocRHQAgentUsersGuide=Running+the+RHQ+Agent
+helpDocRHQAgentUsersGuideLabel=RHQ Agent\u7528\u6237\u6307\u5357
+helpDocFaq=FAQ
+helpDocFaqLabel=\u7591\u96be\u89e3\u7b54
+helpDocRHQServerPropParentPage=http://support.rhq-project.org/display/JOPR2/Startup+Properties#ConfiguringtheServer
+newServerSelectItem=\u65b0\u670d\u52a1\u5668
+registeredServersLabel=\u6ce8\u518c\u7684\u670d\u52a1\u5668:
+propertyHighAvailabilityName=\u670d\u52a1\u5668\u540d\u79f0
+propertyHighAvailabilityNameHelp=-ServerName
+propertyMaintenanceModeAtStart=\u542f\u52a8\u7ef4\u62a4\u6a21\u5f0f
+propertyMaintenanceModeAtStartHelp=-MaintenanceModeAtStart
+propertyHighAvailabilityEndpointAddress=\u670d\u52a1\u5668\u516c\u5171\u5730\u5740
+propertyHighAvailabilityAffinityGroup=\u76f8\u4f3c\u7684\u670d\u52a1\u5668\u7ec4\u540d
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
index 9ad7a36..6fd2bb4 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
@@ -58,6 +58,7 @@
<supported-locale>de</supported-locale>
<supported-locale>fr</supported-locale>
<supported-locale>pt</supported-locale>
+ <supported-locale>zh</supported-locale>
</locale-config>
</application>
13 years, 1 month
[rhq] modules/enterprise
by ips
modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml | 41 ++++++++--
1 file changed, 34 insertions(+), 7 deletions(-)
New commits:
commit 0a3120904a5b601477819460b8b99817e43256dc
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed May 11 14:57:21 2011 -0400
[BZ 693232] configure AlertManagerBean, AuthorizationManagerBean, and SubjectManagerBean to use the strict max instance pool since they also are called (indirectly) by AlertConditionConsumerBean (part of fix for https://bugzilla.redhat.com/show_bug.cgi?id=693232)
diff --git a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
index 8892da8..b7c5c66 100644
--- a/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
+++ b/modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml
@@ -9,11 +9,12 @@
<!--
The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
- AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
- indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
- the default SLSB pool impl (ThreadlocalPool) would cause a new instance of this SLSB to be created
- every time it was invoked by AlertConditionConsumerBean. This would be bad if only because an existing instance would
- not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+ AlertDefinitionManagerBean, AlertManagerBean, AuthorizationManagerBean, CachedConditionManagerBean, and
+ SubjectManager SLSB's are all invoked, either directly or indirectly, by the AlertConditionConsumerBean MDB.
+ Since MDB invocations are always done in new threads, using the default SLSB pool impl (ThreadlocalPool) would
+ cause a new instance of these SLSB's to be created every time they were invoked by AlertConditionConsumerBean.
+ This would be bad if only because existing instances would
+ not be reused, but it is really bad because the instances would also never get destroyed, causing heap space to
gradually leak until the Server eventually ran out of memory. Hence, we must use a StrictMaxPool, which
will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because lots of alert
definitions could result in many concurrent calls to AlertConditionConsumerBean, and because most of these
@@ -21,7 +22,7 @@
minimize the chances of AlertConditionConsumerBean invocations, which are the most critical, from having to
block and potentially getting backed up in the queue. We set the pool timeout extremely high to essentially
prevent queued callers from timing out. Note, MDB's are configured in ejb3-interceptors-aop.xml to use a strict
- max pool with a max of 15 and a timeout of 10000, so AlertConditionConsumerBean could become a bottleneck for
+ max pool with a max of 15 and a timeout of 10000, so AlertConditionConsumerBean might become a bottleneck for
systems with a lot of alerts defined. (ips, 05/10/11)
For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 .
@@ -64,6 +65,24 @@
</session>
<session>
+ <ejb-name>AlertManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
+ <ejb-name>AuthorizationManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
+ <session>
<ejb-name>CachedConditionManagerBean</ejb-name>
<pool-config>
<pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
@@ -72,6 +91,15 @@
</pool-config>
</session>
+ <session>
+ <ejb-name>SubjectManagerBean</ejb-name>
+ <pool-config>
+ <pool-class>org.jboss.ejb3.StrictMaxPool</pool-class>
+ <pool-max-size>100</pool-max-size>
+ <pool-timeout>1000000000</pool-timeout>
+ </pool-config>
+ </session>
+
<!--
The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
@@ -138,4 +166,3 @@
</enterprise-beans>
</jboss>
-
13 years, 1 month
[rhq] Branch 'release-4.0.0' - 3 commits - modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 53 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java | 143 ++++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java | 82 +++++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 2
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css | 45 +--
5 files changed, 243 insertions(+), 82 deletions(-)
New commits:
commit c53c227284bdab43d8c6d6acea9ad668259e3041
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri May 6 11:52:18 2011 -0400
re-implement top menu bar using SmartGWT widgets, rather than raw HTML (part of fix for https://bugzilla.redhat.com/show_bug.cgi?id=697590)
(cherry picked from commit b4c21e2fc5e99d8886fb4431713c4d548f95de50)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 09ca49b..85f5e92 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -146,7 +146,7 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
UserSessionManager.login();
- // removing loading image, which can be seen if LoginView doesn't completely cover it
+ // Remove loading image, which can be seen if LoginView doesn't completely cover it.
Element loadingPanel = DOM.getElementById("Loading-Panel");
loadingPanel.removeFromParent();
}
@@ -163,8 +163,8 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
String url = element.getAttribute("href");
String viewPath = getViewPath(url);
if (viewPath != null) {
- GWT.log("Forcing CoreGUI.goToView(\"" + viewPath + "\")...");
- CoreGUI.goToView(viewPath);
+ GWT.log("Forcing History.newItem(\"" + viewPath + "\")...");
+ History.newItem(viewPath);
nativeEvent.preventDefault();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
index 58fd490..557042f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -21,14 +21,15 @@ package org.rhq.enterprise.gui.coregui.client.menu;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.ui.Hyperlink;
import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Img;
+import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
@@ -40,13 +41,17 @@ import org.rhq.enterprise.gui.coregui.client.dashboard.DashboardsView;
import org.rhq.enterprise.gui.coregui.client.help.HelpView;
import org.rhq.enterprise.gui.coregui.client.inventory.InventoryView;
import org.rhq.enterprise.gui.coregui.client.report.ReportTopView;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHStack;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableLabel;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+
+import java.util.HashMap;
+import java.util.Map;
/**
* @author Greg Hinkle
* @author Joseph Marques
+ * @author Ian Springer
*/
public class MenuBarView extends LocatableVLayout {
@@ -80,7 +85,7 @@ public class MenuBarView extends LocatableVLayout {
markForRedraw();
}
- // When redrawing, ensire the correct session infor is displayed
+ // When redrawing, ensure the correct session info is displayed
@Override
public void markForRedraw() {
String currentDisplayName = userLabel.getContents();
@@ -104,50 +109,7 @@ public class MenuBarView extends LocatableVLayout {
}
private Canvas getLinksSection() {
- final HTMLFlow linksPane = new HTMLFlow();
- linksPane.setContents(setupLinks());
-
- History.addValueChangeHandler(new ValueChangeHandler<String>() {
- public void onValueChange(ValueChangeEvent<String> stringValueChangeEvent) {
- String first = stringValueChangeEvent.getValue().split("/")[0];
-
- if ("Resource".equals(first)) {
- first = "Inventory";
- }
-
- currentlySelectedSection = first;
- linksPane.setContents(setupLinks());
- linksPane.markForRedraw();
- }
- });
- return linksPane;
- }
-
- private String setupLinks() {
- // TODO: Replace the below HTML with SmartGWT widgets.
- StringBuilder headerString = new StringBuilder(
- "<table style=\"height: 34px;\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
-
- headerString.append("<td style=\"width: 1px;\"><img src=\"images/header/header_bg_line.png\"/></td>");
- for (ViewName sectionName : SECTIONS) {
-
- String styleClass = "TopSectionLink";
- if (sectionName.getName().equals(currentlySelectedSection)) {
- styleClass = "TopSectionLinkSelected";
- }
-
- // Set explicit identifiers because the generated scLocator is not getting picked up by Selenium.
- headerString.append("<td style=\"vertical-align:middle\" id=\"").append(sectionName).append("\" class=\"")
- .append(styleClass).append("\" onclick=\"window.location.href='#").append(sectionName).append("'\" >");
- headerString.append(sectionName.getTitle());
- headerString.append("</td>\n");
-
- headerString.append("<td style=\"width: 1px;\"><img src=\"images/header/header_bg_line.png\"/></td>");
- }
-
- headerString.append("</tr></table>");
-
- return headerString.toString();
+ return new LinkBar();
}
private Canvas getActionsSection() {
@@ -158,13 +120,13 @@ public class MenuBarView extends LocatableVLayout {
userLabel = new LocatableLabel(this.extendLocatorId("User"), UserSessionManager.getSessionSubject().getName());
userLabel.setAutoWidth();
- LocatableLabel lineLabel = new LocatableLabel(this.extendLocatorId("Line"), " | ");
- lineLabel.setWidth("10px");
+ Label lineLabel = new Label(" | ");
+ lineLabel.setWidth("12px");
lineLabel.setAlign(Alignment.CENTER);
- Hyperlink logoutLink = SeleniumUtility.setHtmlId(new Hyperlink(LOGOUT_VIEW_ID.getTitle(), LOGOUT_VIEW_ID
- .getName()), LOGOUT_VIEW_ID.getName());
- logoutLink.setWidth("50px");
+ String contents = "<a href='#" + LOGOUT_VIEW_ID.getName() + "'>" + LOGOUT_VIEW_ID.getTitle() + "</a>";
+ LocatableLabel logoutLink = new LocatableLabel(this.extendLocatorId("LogoutLink"), contents);
+ logoutLink.setAutoWidth();
layout.addMember(userLabel);
layout.addMember(lineLabel);
@@ -173,4 +135,77 @@ public class MenuBarView extends LocatableVLayout {
return layout;
}
+ class LinkBar extends LocatableHStack implements ValueChangeHandler<String> {
+ private final Map<String, VLayout> sectionNameToLinkVLayoutMap = new HashMap<String, VLayout>();
+
+ LinkBar() {
+ super(MenuBarView.this.extendLocatorId("LinkBar"));
+
+ setWidth100();
+ setHeight100();
+
+ Img divider = new Img("header/header_bg_line.png");
+ divider.setWidth(1);
+ divider.setHeight100();
+ addMember(divider);
+
+ for (ViewName sectionName : SECTIONS) {
+ VLayout linkVLayout = new VLayout();
+ linkVLayout.setHeight100();
+ linkVLayout.setAlign(VerticalAlignment.CENTER);
+
+ String contents = "<a class='menuBar' href='#" + sectionName.getName() + "'>" + sectionName.getTitle()
+ + "</a>";
+ LocatableLabel link = new LocatableLabel(extendLocatorId(sectionName.getName()), contents);
+ link.setAutoHeight();
+ link.setAlign(Alignment.CENTER);
+ link.setStyleName("inheritColor");
+ linkVLayout.addMember(link);
+
+ this.sectionNameToLinkVLayoutMap.put(sectionName.getName(), linkVLayout);
+ updateLinkStyle(sectionName.getName());
+ addMember(linkVLayout);
+
+ divider = new Img("header/header_bg_line.png");
+ divider.setWidth(1);
+ divider.setHeight100();
+ addMember(divider);
+ }
+
+ History.addValueChangeHandler(this);
+ }
+
+ @Override
+ public void onValueChange(ValueChangeEvent<String> stringValueChangeEvent) {
+ String viewPath = stringValueChangeEvent.getValue();
+ String topViewId = viewPath.split("/")[0];
+ if ("Resource".equals(topViewId)) {
+ topViewId = InventoryView.VIEW_ID.getName();
+ }
+ currentlySelectedSection = topViewId;
+
+ for (String sectionName : this.sectionNameToLinkVLayoutMap.keySet()) {
+ updateLinkStyle(sectionName);
+ }
+ }
+
+ private void updateLinkStyle(String sectionName) {
+ String divStyleClass;
+ String styleClass;
+ if (sectionName.equals(currentlySelectedSection)) {
+ divStyleClass = "TopSectionLinkDivSelected";
+ styleClass = "TopSectionLinkSelected";
+ } else {
+ divStyleClass = "TopSectionLinkDiv";
+ styleClass = "TopSectionLink";
+ }
+ VLayout linkVLayout = this.sectionNameToLinkVLayoutMap.get(sectionName);
+ linkVLayout.setStyleName(divStyleClass);
+ linkVLayout.markForRedraw();
+ Canvas link = linkVLayout.getMember(0);
+ link.setStyleName(styleClass);
+ link.markForRedraw();
+ }
+ }
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java
new file mode 100644
index 0000000..4ea7bb1
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java
@@ -0,0 +1,82 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.util.selenium;
+
+import com.smartgwt.client.widgets.layout.HStack;
+
+/**
+ * Wrapper for a SmartGWT {@link HStack} that sets the ID for use with Selenium scLocators.
+ *
+ * @author Ian Springer
+ */
+public class LocatableHStack extends HStack implements Locatable {
+
+ private String locatorId;
+
+ /**
+ * <pre>
+ * ID Format: "simpleClassname_locatorId"
+ * </pre>
+ * @param locatorId not null or empty.
+ */
+ public LocatableHStack(String locatorId) {
+ super();
+ init(locatorId);
+ }
+
+ /**
+ * <pre>
+ * ID Format: "simpleClassname_locatorId"
+ * </pre>
+ * @param locatorId not null or empty.
+ * @param membersMargin
+ */
+ public LocatableHStack(String locatorId, int membersMargin) {
+ super(membersMargin);
+ init(locatorId);
+ }
+
+ private void init(String locatorId) {
+ this.locatorId = locatorId;
+ SeleniumUtility.setID(this, locatorId);
+ }
+
+ public String getLocatorId() {
+ return locatorId;
+ }
+
+ public String extendLocatorId(String extension) {
+ return this.locatorId + "_" + extension;
+ }
+
+ public void destroyMembers() {
+ SeleniumUtility.destroyMembers(this);
+ }
+
+ @Override
+ public void destroy() {
+ destroyMembers();
+ super.destroy();
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index f63dbd9..c2ba874 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -10,7 +10,7 @@
<inherits name='com.smartgwt.SmartGwt' />
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
- <inherits name='com.google.gwt.user.theme.standard.Standard'/>
+ <!--<inherits name='com.google.gwt.user.theme.standard.Standard'/>-->
<!--
<inherits name="com.smartclient.theme.graphite.Graphite"/>
-->
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
index f6befb0..7c86907 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
@@ -1,13 +1,8 @@
-/*body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 8px;
-}*/
+body {
+ color: #010101;
+}
body, p, td, th, option, input, textarea, select {
- color: #000000;
font-family: tahoma, verdana, sans-serif !important;
font-size: 11px !important;
}
@@ -30,6 +25,9 @@ hr {
a, a:link, a:visited, a:hover {
color: #4A5D75 !important;
font-weight: bold !important;
+}
+
+a, a:link, a:visited {
text-decoration: none !important;
}
@@ -37,6 +35,10 @@ a:hover {
text-decoration: underline !important;
}
+a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
+ color: inherit !important;
+}
+
.backLink {
color: #4A5D75;
@@ -97,22 +99,27 @@ a:hover {
}
-.TopSectionLink, .topsectionlinkselected {
- vertical-align: bottom;
- padding:5px;
- padding-left: 15px;
- padding-right: 15px;
+.inheritColor {
+ color: inherit !important;
+}
- cursor: pointer;
- font-size: 10pt;
- font-weight: bold;
- text-decoration: none;
- color: #4A5D75;
+.TopSectionLink, .TopSectionLinkSelected {
+ font-size: 12px !important;
+}
+
+.TopSectionLink {
+ color: #4A5D75 !important;
}
.TopSectionLinkSelected {
+ color: white !important;
+}
+
+.TopSectionLinkDiv {
+}
+
+.TopSectionLinkDivSelected {
background-image: url('images/header/header_bg_selected.png');
- color: white;
}
.BreadCrumb {
commit 04c40e495079b06cb4376d2489e8bdc35eaa9ef8
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 3 20:52:47 2011 -0400
call CoreGUI.goToView(), rather than History.newItem(), in native event handler
(cherry picked from commit f8d1ed14a40dd8a5fb6e798f4317f00e810f640f)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index a41031d..09ca49b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -161,10 +161,10 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
// make sure it's not a hyperlink that GWT already handles
if (element.getPropertyString("__listener") == null) {
String url = element.getAttribute("href");
- String token = getHistoryToken(url);
- if (token != null) {
- GWT.log("Forcing History.newItem(\"" + token + "\")...");
- History.newItem(token);
+ String viewPath = getViewPath(url);
+ if (viewPath != null) {
+ GWT.log("Forcing CoreGUI.goToView(\"" + viewPath + "\")...");
+ CoreGUI.goToView(viewPath);
nativeEvent.preventDefault();
}
}
@@ -173,7 +173,7 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
}
}
- private static String getHistoryToken(String url) {
+ private static String getViewPath(String url) {
String token;
if (url.startsWith("#")) {
token = url.substring(1);
@@ -537,4 +537,5 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
public static boolean isDebugMode() {
return !GWT.isScript();
}
+
}
commit 64454a33934cb9b487394af197936cffccc55664
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue May 3 17:43:04 2011 -0400
add magic Event.NativePreviewHandler that makes anchor tags not reload the whole page in IE; remove unused printWidgetTree method
(cherry picked from commit 4c0c992c2b1ebb560a6d4e9666591614ff1ff7c0)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 47a5c1f..a41031d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -22,10 +22,13 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.EventTarget;
+import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
@@ -54,7 +57,6 @@ import org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsVie
import org.rhq.enterprise.gui.coregui.client.test.TestDataSourceResponseStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestTopView;
import org.rhq.enterprise.gui.coregui.client.util.ErrorHandler;
-import org.rhq.enterprise.gui.coregui.client.util.WidgetUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.message.MessageCenter;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
@@ -65,7 +67,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Greg Hinkle
* @author Ian Springer
*/
-public class CoreGUI implements EntryPoint, ValueChangeHandler<String> {
+public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.NativePreviewHandler {
public static final String CONTENT_CANVAS_ID = "BaseContent";
@@ -121,6 +123,8 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String> {
coreGUI = this;
+ Event.addNativePreviewHandler(this);
+
registerPageKeys();
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
@@ -147,6 +151,42 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String> {
loadingPanel.removeFromParent();
}
+ public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
+ if (SC.isIE() && event.getTypeInt() == Event.ONCLICK) {
+ NativeEvent nativeEvent = event.getNativeEvent();
+ EventTarget target = nativeEvent.getEventTarget();
+ if (Element.is(target)) {
+ Element element = Element.as(target);
+ if ("a".equalsIgnoreCase(element.getTagName())) {
+ // make sure it's not a hyperlink that GWT already handles
+ if (element.getPropertyString("__listener") == null) {
+ String url = element.getAttribute("href");
+ String token = getHistoryToken(url);
+ if (token != null) {
+ GWT.log("Forcing History.newItem(\"" + token + "\")...");
+ History.newItem(token);
+ nativeEvent.preventDefault();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static String getHistoryToken(String url) {
+ String token;
+ if (url.startsWith("#")) {
+ token = url.substring(1);
+ } else if (url.startsWith("/#")) {
+ token = url.substring(2);
+ } else if (url.contains(Location.getHost()) && url.indexOf('#') > 0) {
+ token = url.substring(url.indexOf('#') + 1);
+ } else {
+ token = null;
+ }
+ return token;
+ }
+
private void registerPageKeys() {
if (isDebugMode()) {
KeyIdentifier debugKey = new KeyIdentifier();
@@ -310,10 +350,6 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String> {
return errorHandler;
}
- public static void printWidgetTree() {
- WidgetUtility.printWidgetTree(coreGUI.rootCanvas);
- }
-
private static String getDefaultView() {
// TODO: should this be Dashboard or a User Preference?
return DEFAULT_VIEW;
13 years, 1 month