modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
| 2
modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
| 28 +++----
modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/alert-cache-service.xml
| 11 --
modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/rhq-mdb-service.xml
| 40 ++++++++++
modules/enterprise/server/container/src/main/scripts/rhq-container.build.xml
| 8 +-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftChangesetBean.java
| 4 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftFileBean.java
| 8 --
7 files changed, 62 insertions(+), 39 deletions(-)
New commits:
commit 8ed0c61658e7da3324a1dc0b64724d882b878850
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Nov 3 16:38:14 2011 -0400
[745236 - JON3 BETA2 ...WARN messages after clean install, drift related]
The issue here is that the drift message driven beans were not being
explicitly deployed via a service xml file in the AS' deploy directory.
We currently had an alert-cache-service.xml deploying the alert cache
mdb. So now replacing that with rhq-mdb-service.xml to create a
consolidated service file deploying rhq mdbs.
diff --git
a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
index d2ed604..089e4e2 100644
---
a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
+++
b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
@@ -49,7 +49,6 @@ import org.apache.tools.ant.helper.ProjectHelper2;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.security.auth.login.XMLLoginConfig;
import org.jboss.security.auth.login.XMLLoginConfigMBean;
import org.jboss.system.server.ServerConfig;
@@ -71,6 +70,7 @@ import org.rhq.enterprise.communications.util.SecurityUtil;
*
* @author John Mazzitelli
*/
+@SuppressWarnings("deprecation")
public class ServerInformation {
private static final Log LOG = LogFactory.getLog(ServerInformation.class);
@@ -85,9 +85,8 @@ public class ServerInformation {
private static final String UNDEPLOYED_EMBEDDED_AGENT_FILENAME =
DEPLOYED_EMBEDDED_AGENT_FILENAME + ".rej";
private static final String DEPLOYED_MAIL_SERVICE_FILENAME =
"mail-service.xml";
private static final String UNDEPLOYED_MAIL_SERVICE_FILENAME =
DEPLOYED_MAIL_SERVICE_FILENAME + ".rej";
- private static final String DEPLOYED_ALERT_CACHE_SERVICE_FILENAME =
"alert-cache-service.xml";
- private static final String UNDEPLOYED_ALERT_CACHE_SERVICE_FILENAME =
DEPLOYED_ALERT_CACHE_SERVICE_FILENAME
- + ".rej";
+ private static final String DEPLOYED_MDB_SERVICE_FILENAME =
"rhq-mdb-service.xml";
+ private static final String UNDEPLOYED_MDB_SERVICE_FILENAME =
DEPLOYED_MDB_SERVICE_FILENAME + ".rej";
private static final String DEPLOYED_JMS_FILENAME = "jms";
private static final String UNDEPLOYED_POSTGRES_JMS_FILENAME =
"jms-postgres.rej";
private static final String UNDEPLOYED_ORACLE_JMS_FILENAME =
"jms-oracle.rej";
@@ -213,7 +212,7 @@ public class ServerInformation {
*
* @throws Exception if failed to create the new schema for some reason
*/
- public void createNewDatabaseSchema(Properties props) throws Exception {
+ public void createNewDatabaseSchema(Properties props) throws Exception {
if (props == null) {
props = getServerProperties();
}
@@ -389,11 +388,11 @@ public class ServerInformation {
deleteFile(jms);
}
- // ALERT CACHE SERVICE
- File alertCache = getAlertCacheServiceFile(!deploy);
- File alertCacheRenameTo = getAlertCacheServiceFile(deploy);
- if (!alertCacheRenameTo.exists()) {
- alertCache.renameTo(alertCacheRenameTo);
+ // MDB SERVICE
+ File mdb = getMdbServiceFile(!deploy);
+ File mdbRenameTo = getMdbServiceFile(deploy);
+ if (!mdbRenameTo.exists()) {
+ mdb.renameTo(mdbRenameTo);
}
// EAR
@@ -421,7 +420,7 @@ public class ServerInformation {
File jms = getJmsFile(true);
File ds = getDataSourceFile(true);
File mail = getMailServiceFile(true);
- File alert = getAlertCacheServiceFile(true);
+ File alert = getMdbServiceFile(true);
return ds.exists() && jms.exists() && ear.exists() &&
agent.exists() && mail.exists() && alert.exists();
}
@@ -438,10 +437,9 @@ public class ServerInformation {
return file;
}
- private File getAlertCacheServiceFile(boolean deployed) {
+ private File getMdbServiceFile(boolean deployed) {
File deployDir = getDeployDirectory();
- File file = new File(deployDir, deployed ? DEPLOYED_ALERT_CACHE_SERVICE_FILENAME
- : UNDEPLOYED_ALERT_CACHE_SERVICE_FILENAME);
+ File file = new File(deployDir, deployed ? DEPLOYED_MDB_SERVICE_FILENAME :
UNDEPLOYED_MDB_SERVICE_FILENAME);
return file;
}
@@ -828,7 +826,7 @@ public class ServerInformation {
MBeanServer mbs = getMBeanServer();
ObjectName name =
ObjectNameFactory.create("jboss.security:service=XMLLoginConfig");
- Object mbean = MBeanServerInvocationHandler.newProxyInstance(mbs,
name,XMLLoginConfigMBean.class,false);
+ Object mbean = MBeanServerInvocationHandler.newProxyInstance(mbs, name,
XMLLoginConfigMBean.class, false);
XMLLoginConfigMBean conf = (XMLLoginConfigMBean) mbean;
conf.stop();
diff --git
a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/alert-cache-service.xml
b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/alert-cache-service.xml
deleted file mode 100644
index 8c620f3..0000000
---
a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/alert-cache-service.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<server>
-
- <!-- Alert Queue Definitions -->
- <mbean code="org.jboss.mq.server.jmx.Queue"
-
name="jboss.mq.destination:service=Queue,name=AlertConditionQueue">
- <attribute name="RecoveryRetries">0</attribute>
- <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- </mbean>
-
-</server>
\ No newline at end of file
diff --git
a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/rhq-mdb-service.xml
b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/rhq-mdb-service.xml
new file mode 100644
index 0000000..177f168
--- /dev/null
+++
b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/deploy/rhq-mdb-service.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<server>
+
+ <!-- Alert Queue Definitions -->
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+
name="jboss.mq.destination:service=Queue,name=AlertConditionQueue">
+ <!--
+ don't redeliver messages on failure. It just causes more failures. just go
straight to the dead messages
+ by setting retry to 0. This is equivalent to setting the dLQMaxResent property to 0
in the MessageDriven
+ annotation in the class definition.
+ -->
+ <attribute name="RecoveryRetries">0</attribute>
+ <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+
+
+ <!-- Drift Queue Definitions -->
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+
name="jboss.mq.destination:service=Queue,name=DriftChangesetQueue">
+ <!--
+ don't redeliver messages on failure. It just causes more failures. just go
straight to the dead messages
+ by setting retry to 0. This is equivalent to setting the dLQMaxResent property to 0
in the MessageDriven
+ annotation in the class definition.
+ -->
+ <attribute name="RecoveryRetries">0</attribute>
+ <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=DriftFileQueue">
+ <!--
+ don't redeliver messages on failure. It just causes more failures. just go
straight to the dead messages
+ by setting retry to 0. This is equivalent to setting the dLQMaxResent property to 0
in the MessageDriven
+ annotation in the class definition.
+ -->
+ <attribute name="RecoveryRetries">0</attribute>
+ <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+
+</server>
\ No newline at end of file
diff --git a/modules/enterprise/server/container/src/main/scripts/rhq-container.build.xml
b/modules/enterprise/server/container/src/main/scripts/rhq-container.build.xml
index 1f8b8b2..bb8b9c9 100644
--- a/modules/enterprise/server/container/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/container/src/main/scripts/rhq-container.build.xml
@@ -825,7 +825,7 @@ rhq.autoinstall.public-endpoint-address=
undeploy-jmx-console,
undeploy-mail-service,
undeploy-cluster-service,
- undeploy-alert-cache-service,
+ undeploy-mdb-service,
undeploy-embedded-agent,
undeploy-jms,
undeploy-ear,
@@ -882,9 +882,9 @@ rhq.autoinstall.public-endpoint-address=
<move file="${jboss.deploy.dir}/cluster-service.xml"
tofile="${jboss.deploy.dir}/cluster-service.xml.rej"
failonerror="false" />
</target>
- <target name="undeploy-alert-cache-service"
unless="predeploy">
- <echo>Preparing for release - undeploying Alert Cache
Service...</echo>
- <move file="${jboss.deploy.dir}/alert-cache-service.xml"
tofile="${jboss.deploy.dir}/alert-cache-service.xml.rej"
failonerror="false" />
+ <target name="undeploy-mdb-service" unless="predeploy">
+ <echo>Preparing for release - undeploying RHQ MDB Service...</echo>
+ <move file="${jboss.deploy.dir}/rhq-mdb-service.xml"
tofile="${jboss.deploy.dir}/rhq-mdb-service.xml.rej"
failonerror="false" />
</target>
<target name="undeploy-embedded-agent" unless="predeploy">
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftChangesetBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftChangesetBean.java
index 0c9f9fd..00c7370 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftChangesetBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftChangesetBean.java
@@ -44,9 +44,7 @@ import org.rhq.enterprise.server.auth.SubjectManagerLocal;
@ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/DriftChangesetQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue =
"Auto-acknowledge"),
// this is just declarative, I think it's unnecessary
- @ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "NonDurable"),
- // don't redeliver messages on failure. It just causes more failures. just go
straight to the dead messages
- @ActivationConfigProperty(propertyName = "dLQMaxResent", propertyValue =
"0") })
+ @ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "NonDurable") })
public class DriftChangesetBean implements MessageListener {
private final Log log = LogFactory.getLog(DriftChangesetBean.class);
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftFileBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftFileBean.java
index b1db4cb..15a2135 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftFileBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftFileBean.java
@@ -44,9 +44,7 @@ import org.rhq.enterprise.server.auth.SubjectManagerLocal;
@ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/DriftFileQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue =
"Auto-acknowledge"),
// this is just declarative, I think it's unnecessary
- @ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "NonDurable"),
- // don't redeliver messages on failure. It just causes more failures. just go
straight to the dead messages
- @ActivationConfigProperty(propertyName = "dLQMaxResent", propertyValue =
"0") })
+ @ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "NonDurable") })
public class DriftFileBean implements MessageListener {
private final Log log = LogFactory.getLog(DriftFileBean.class);
@@ -84,8 +82,8 @@ public class DriftFileBean implements MessageListener {
+ "]");
}
- driftManager.saveChangeSetContent(subjectManager.getOverlord(),
request.getResourceId(),
- request.getDriftDefName(), request.getToken(), tempFile);
+ driftManager.saveChangeSetContent(subjectManager.getOverlord(),
request.getResourceId(), request
+ .getDriftDefName(), request.getToken(), tempFile);
} catch (IOException e) {
log.error(e);
commit 1fbe913245f23d2f0c1e24f034c57df8b3ec8af1
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Nov 3 17:07:49 2011 -0400
[BZ 738369 - a user with "Manage Drift" permissions of "Read"
(implied) cannot view Drift]
Don't block the Drift Tab, there is no read-level drift permission.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index debd785..416f7b0 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -520,7 +520,7 @@ public class ResourceDetailView extends
AbstractTwoLevelTabSetView<ResourceCompo
private void updateDriftTabContent(final ResourceComposite resourceComposite, final
Resource resource,
ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
- if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT),
resourcePermissions.isDrift())) {
+ if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), true)) {
// TODO: Experimenting with not shoing a drift history tab and having all
resource level drift viewing
// go through the comprehensive drift carousel view. Leave it in, but
commented, in case we want it back.