[rhq] Branch 'rhq-on-as7' - modules/enterprise
mazz
mazz at fedoraproject.org
Fri Aug 10 21:36:12 UTC 2012
modules/enterprise/server/ear/pom.xml | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java | 20
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsServiceMBean.java | 2
modules/enterprise/server/sars/services-sar/src/main/resources/META-INF/jboss-service.xml | 211 ++--------
4 files changed, 70 insertions(+), 169 deletions(-)
New commits:
commit cdeb724bd3fae880dd88d242767683fe42a2d8dc
Author: John Mazzitelli <mazz at redhat.com>
Date: Fri Aug 10 17:35:44 2012 -0400
trying to get our MBean services to be deployed within an AS7 SAR
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index d3669c5..fa01aa3 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -213,7 +213,11 @@
<earSourceDirectory>${basedir}/target/classes</earSourceDirectory>
<defaultJavaBundleDir>lib</defaultJavaBundleDir>
<unpackTypes>war,ejb</unpackTypes>
-
+ <archive>
+ <manifestEntries>
+ <Dependencies>org.jboss.common-core</Dependencies> <!-- needed to fix https://issues.jboss.org/browse/AS7-5336 -->
+ </manifestEntries>
+ </archive>
<modules>
<!-- ** WARs -->
<webModule>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
index 5697374..4e673d9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
@@ -122,7 +122,7 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
* Properties that will be used to override preferences found in the preferences node and the configuration
* preferences file.
*/
- private Properties m_configurationOverrides = null;
+ private Properties m_configurationOverrides = new Properties();
/**
* A list of known agents.
@@ -278,7 +278,7 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
m_configuration = null;
m_configFile = ServerConfigurationConstants.DEFAULT_SERVER_CONFIGURATION_FILE;
m_preferencesNodeName = ServerConfigurationConstants.DEFAULT_PREFERENCE_NODE;
- m_configurationOverrides = null;
+ m_configurationOverrides = new Properties();
m_knownAgents.removeAllAgents();
m_knownAgentClients.clear();
m_started = false;
@@ -325,7 +325,15 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
* @see ServerCommunicationsServiceMBean#setConfigurationOverrides(Properties)
*/
public void setConfigurationOverrides(Properties overrides) {
- m_configurationOverrides = overrides;
+ m_configurationOverrides.putAll(overrides);
+ }
+
+ /*
+ * @see ServerCommunicationsServiceMBean#setConfigurationOverrides2(Properties)
+ */
+ // for why we need to split our overrides into two attributes - see https://issues.jboss.org/browse/AS7-5342
+ public void setConfigurationOverrides2(Properties overrides) {
+ m_configurationOverrides.putAll(overrides);
}
/*
@@ -997,4 +1005,10 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
LOG.info(ServerI18NResourceKeys.NEW_CONCURRENCY_LIMIT, limitName, maxConcurrency);
}
+
+ // for why we need this in RHQ - see https://issues.jboss.org/browse/AS7-5336
+ static {
+ java.beans.PropertyEditorManager.registerEditor(Properties.class,
+ org.jboss.util.propertyeditor.PropertiesEditor.class);
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsServiceMBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsServiceMBean.java
index 403ecb3..430870d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsServiceMBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsServiceMBean.java
@@ -97,6 +97,8 @@ public interface ServerCommunicationsServiceMBean extends ServiceContainerMetric
*/
void setConfigurationOverrides(Properties overrides);
+ void setConfigurationOverrides2(Properties overrides); // why this? see https://issues.jboss.org/browse/AS7-5342
+
/**
* This will clear any and all current configuration preferences and then reload the
* {@link #getConfigurationFile() configuration file}.
diff --git a/modules/enterprise/server/sars/services-sar/src/main/resources/META-INF/jboss-service.xml b/modules/enterprise/server/sars/services-sar/src/main/resources/META-INF/jboss-service.xml
index deae6c2..e71e109 100644
--- a/modules/enterprise/server/sars/services-sar/src/main/resources/META-INF/jboss-service.xml
+++ b/modules/enterprise/server/sars/services-sar/src/main/resources/META-INF/jboss-service.xml
@@ -71,172 +71,53 @@ org.quartz.jobStore.lockHandler.class = ${rhq.server.quartz.lockHandler
<attribute name="ConfigurationFile">.../server-comm-configuration.xml</attribute>
-->
- <attribute name="ConfigurationOverrides" serialDataType="jbxb">
- <java:properties xmlns:java="urn:jboss:java-properties"
- xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
- xs:schemaLocation="urn:jboss:java-properties resource:java-properties_1_0.xsd">
-
- <!-- location of the plugin jars and other files agents can download directly from sever -->
-
- <java:property>
- <java:key>rhq.server.agent-files-directory</java:key>
- <java:value>${jboss.home.dir}/standalone/deployments/${rhq.earName}/rhq-downloads</java:value>
- </java:property>
-
- <!-- location where data files can be stored -->
-
- <java:property>
- <java:key>rhq.communications.data-directory</java:key>
- <java:value>${jboss.server.data.dir}</java:value>
- </java:property>
-
- <!-- global limit on number of concurrent incoming messages allowed -->
-
- <java:property>
- <java:key>rhq.communications.global-concurrency-limit</java:key>
- <java:value>${rhq.communications.global-concurrency-limit:200}</java:value>
- </java:property>
-
- <!-- Server's remote endpoint for agents to talk to -->
-
- <java:property>
- <java:key>rhq.communications.connector.transport</java:key>
- <java:value>${rhq.communications.connector.transport:servlet}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.bind-address</java:key>
- <java:value>${rhq.communications.connector.bind-address}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.bind-port</java:key>
- <java:value>${rhq.communications.connector.bind-port:7080}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.transport-params</java:key>
- <java:value>${rhq.communications.connector.transport-params:/jboss-remoting-servlet-invoker/ServerInvokerServlet}</java:value>
- </java:property>
-
- <!-- Multicast detector configuration for auto-discovery -->
-
- <java:property>
- <java:key>rhq.communications.multicast-detector.enabled</java:key>
- <java:value>${rhq.communications.multicast-detector.enabled:false}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.multicast-detector.multicast-address</java:key>
- <java:value>${rhq.communications.multicast-detector.multicast-address:224.16.16.16}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.multicast-detector.bind-address</java:key>
- <java:value>${rhq.communications.multicast-detector.bind-address}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.multicast-detector.port</java:key>
- <java:value>${rhq.communications.multicast-detector.port:16162}</java:value>
- </java:property>
-
- <!-- Server-side SSL Security Configuration (for incoming messages from agents) -->
-
- <java:property>
- <java:key>rhq.communications.connector.security.secure-socket-protocol</java:key>
- <java:value>${rhq.communications.connector.security.secure-socket-protocol:TLS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.file</java:key>
- <java:value>${rhq.communications.connector.security.keystore.file}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.algorithm</java:key>
- <java:value>${rhq.communications.connector.security.keystore.algorithm:SunX509}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.type</java:key>
- <java:value>${rhq.communications.connector.security.keystore.type:JKS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.password</java:key>
- <java:value>${rhq.communications.connector.security.keystore.password:rhqpwd}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.key-password</java:key>
- <java:value>${rhq.communications.connector.security.keystore.key-password:rhqpwd}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.keystore.alias</java:key>
- <java:value>${rhq.communications.connector.security.keystore.alias:rhq}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.truststore.file</java:key>
- <java:value>${rhq.communications.connector.security.truststore.file}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.truststore.algorithm</java:key>
- <java:value>${rhq.communications.connector.security.truststore.algorithm:SunX509}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.truststore.type</java:key>
- <java:value>${rhq.communications.connector.security.truststore.type:JKS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.truststore.password</java:key>
- <java:value>${rhq.communications.connector.security.truststore.password}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.communications.connector.security.client-auth-mode</java:key>
- <java:value>${rhq.communications.connector.security.client-auth-mode:none}</java:value>
- </java:property>
-
- <!-- Client-side SSL Security Configuration (for outgoing messages to agents) -->
+ <!-- see https://issues.jboss.org/browse/AS7-5342 for why we have two attributes instead of just one-->
+ <attribute name="ConfigurationOverrides">
+# location of the plugin jars and other files agents can download directly from sever
+rhq.server.agent-files-directory=${jboss.home.dir}/standalone/deployments/${rhq.earName}/rhq-downloads
+# location where data files can be stored
+rhq.communications.data-directory=${jboss.server.data.dir}
+# global limit on number of concurrent incoming messages allowed
+rhq.communications.global-concurrency-limit=${rhq.communications.global-concurrency-limit:200}
+# Server's remote endpoint for agents to talk to
+rhq.communications.connector.transport=${rhq.communications.connector.transport:servlet}
+rhq.communications.connector.bind-address=${rhq.communications.connector.bind-address}
+rhq.communications.connector.bind-port=${rhq.communications.connector.bind-port:7080}
+rhq.communications.connector.transport-params=${rhq.communications.connector.transport-params:/jboss-remoting-servlet-invoker/ServerInvokerServlet}
+# Multicast detector configuration for auto-discovery
+rhq.communications.multicast-detector.enabled=${rhq.communications.multicast-detector.enabled:false}
+rhq.communications.multicast-detector.multicast-address=${rhq.communications.multicast-detector.multicast-address:224.16.16.16}
+rhq.communications.multicast-detector.bind-address=${rhq.communications.multicast-detector.bind-address}
+rhq.communications.multicast-detector.port=${rhq.communications.multicast-detector.port:16162}
+ </attribute>
- <java:property>
- <java:key>rhq.server.client.security.secure-socket-protocol</java:key>
- <java:value>${rhq.server.client.security.secure-socket-protocol:TLS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.file</java:key>
- <java:value>${rhq.server.client.security.keystore.file}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.algorithm</java:key>
- <java:value>${rhq.server.client.security.keystore.algorithm:SunX509}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.type</java:key>
- <java:value>${rhq.server.client.security.keystore.type:JKS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.password</java:key>
- <java:value>${rhq.server.client.security.keystore.password:rhqpwd}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.key-password</java:key>
- <java:value>${rhq.server.client.security.keystore.key-password:rhqpwd}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.keystore.alias</java:key>
- <java:value>${rhq.server.client.security.keystore.alias:rhq}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.truststore.file</java:key>
- <java:value>${rhq.server.client.security.truststore.file}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.truststore.algorithm</java:key>
- <java:value>${rhq.server.client.security.truststore.algorithm:SunX509}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.truststore.type</java:key>
- <java:value>${rhq.server.client.security.truststore.type:JKS}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.truststore.password</java:key>
- <java:value>${rhq.server.client.security.truststore.password}</java:value>
- </java:property>
- <java:property>
- <java:key>rhq.server.client.security.server-auth-mode-enabled</java:key>
- <java:value>${rhq.server.client.security.server-auth-mode-enabled:false}</java:value>
- </java:property>
- </java:properties>
+ <attribute name="ConfigurationOverrides2">
+# Server-side SSL Security Configuration (for incoming messages from agents
+rhq.communications.connector.security.secure-socket-protocol=${rhq.communications.connector.security.secure-socket-protocol:TLS}
+rhq.communications.connector.security.keystore.file=${rhq.communications.connector.security.keystore.file}
+rhq.communications.connector.security.keystore.algorithm=${rhq.communications.connector.security.keystore.algorithm:SunX509}
+rhq.communications.connector.security.keystore.type=${rhq.communications.connector.security.keystore.type:JKS}
+rhq.communications.connector.security.keystore.password=${rhq.communications.connector.security.keystore.password:rhqpwd}
+rhq.communications.connector.security.keystore.key-password=${rhq.communications.connector.security.keystore.key-password:rhqpwd}
+rhq.communications.connector.security.keystore.alias=${rhq.communications.connector.security.keystore.alias:rhq}
+rhq.communications.connector.security.truststore.file=${rhq.communications.connector.security.truststore.file}
+rhq.communications.connector.security.truststore.algorithm=${rhq.communications.connector.security.truststore.algorithm:SunX509}
+rhq.communications.connector.security.truststore.type=${rhq.communications.connector.security.truststore.type:JKS}
+rhq.communications.connector.security.truststore.password=${rhq.communications.connector.security.truststore.password}
+rhq.communications.connector.security.client-auth-mode=${rhq.communications.connector.security.client-auth-mode:none}
+# Client-side SSL Security Configuration (for outgoing messages to agents)
+rhq.server.client.security.secure-socket-protocol=${rhq.server.client.security.secure-socket-protocol:TLS}
+rhq.server.client.security.keystore.file=${rhq.server.client.security.keystore.file}
+rhq.server.client.security.keystore.algorithm=${rhq.server.client.security.keystore.algorithm:SunX509}
+rhq.server.client.security.keystore.type=${rhq.server.client.security.keystore.type:JKS}
+rhq.server.client.security.keystore.password=${rhq.server.client.security.keystore.password:rhqpwd}
+rhq.server.client.security.keystore.key-password=${rhq.server.client.security.keystore.key-password:rhqpwd}
+rhq.server.client.security.keystore.alias=${rhq.server.client.security.keystore.alias:rhq}
+rhq.server.client.security.truststore.file=${rhq.server.client.security.truststore.file}
+rhq.server.client.security.truststore.algorithm=${rhq.server.client.security.truststore.algorithm:SunX509}
+rhq.server.client.security.truststore.type=${rhq.server.client.security.truststore.type:JKS}
+rhq.server.client.security.truststore.password=${rhq.server.client.security.truststore.password}
+rhq.server.client.security.server-auth-mode-enabled=${rhq.server.client.security.server-auth-mode-enabled:false}
</attribute>
</mbean>
</server>
More information about the rhq-commits
mailing list