modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
| 2 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
| 4 +--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java
| 2 -
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
| 12 ++++++++-
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
| 13 +++++++++-
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerOperationsDelegate.java
| 2 -
6 files changed, 28 insertions(+), 7 deletions(-)
New commits:
commit 5a1fc9e3ab2cb631f31eaa81655e6e76fd0f071a
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Fri Jan 13 16:40:32 2012 -0500
[BZ 781621] fixing ldap ssl issue. Users unable to configure SSL support.
This was introduced with the other SystemSettings refactor changes. We
thought we'd found all the places affected.
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
index d1f2294..fc09b0f 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
@@ -165,7 +165,7 @@ public class CustomJaasDeploymentService implements
CustomJaasDeploymentServiceM
configOptions.put(Context.INITIAL_CONTEXT_FACTORY,
conf.getProperty(RHQConstants.LDAPFactory));
configOptions.put(Context.PROVIDER_URL, conf.getProperty(RHQConstants.LDAPUrl));
String value =
conf.getProperty(SystemSetting.USE_SSL_FOR_LDAP.getInternalName());
- boolean ldapSsl = Boolean.TRUE.toString().equals(value);
+ boolean ldapSsl = "ssl".equalsIgnoreCase(value);
configOptions.put(Context.SECURITY_PROTOCOL, (ldapSsl) ? "ssl" :
null);
configOptions.put("LoginProperty",
conf.getProperty(RHQConstants.LDAPLoginProperty));
configOptions.put("Filter",
conf.getProperty(RHQConstants.LDAPFilter));
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java
index 396b2c8..9dd2eb5 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java
@@ -443,7 +443,7 @@ public class LdapGroupManagerBean implements LdapGroupManagerLocal {
// Setup SSL if requested
String value =
env.getProperty(SystemSetting.USE_SSL_FOR_LDAP.getInternalName());
- boolean ldapSsl = Boolean.TRUE.toString().equals(value);
+ boolean ldapSsl = "ssl".equalsIgnoreCase(value);
if (ldapSsl) {
String ldapSocketFactory =
env.getProperty("java.naming.ldap.factory.socket");
if (ldapSocketFactory == null) {
commit 9ba2f79a6494503b17207e0b34055257428181bd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Jan 5 13:58:08 2012 +0100
[BZ 746113] - increasing the maximum wait time for the tomcat start/stop
scripts from 1s to 120s.
diff --git
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerOperationsDelegate.java
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerOperationsDelegate.java
index ce542a9..a06e3cd 100644
---
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerOperationsDelegate.java
+++
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerOperationsDelegate.java
@@ -403,7 +403,7 @@ public class TomcatServerOperationsDelegate {
private void initProcessExecution(ProcessExecution processExecution) {
processExecution.setCaptureOutput(true);
- processExecution.setWaitForCompletion(1000L); // 1 second // TODO: Should we wait
longer than one second?
+ processExecution.setWaitForCompletion(120000L); // 120 seconds - that should be
safe? // TODO: make this configurable
processExecution.setKillOnTimeout(false);
}
commit 5771082b21c401d309cd1c38e538418679ed08b2
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jan 6 09:15:14 2012 -0500
[Bug 771201 - EPP 5.2 discovery fails with java.lang.StringIndexOutOfBoundsException]
EPP 5.2 has changed the format of its Implementation-Version string in the
manifest (5.1.1 was different). Add support for the new format. Also,
in general, fail more gracefully when encountering an unexpected version
string.
diff --git
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
index fe13a7a..cae73f3 100644
---
a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
+++
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
@@ -40,6 +40,7 @@ public class JBossInstallationInfo {
private static final String LOCALHOST_ADDRESS = "127.0.0.1";
private static final String SOA_IMPL_VERSION_PREFIX = "SOA-";
private static final String EAP_IMPL_VERSION_PREFIX = "EAP-";
+ private static final String EPP_IMPL_VERSION_PREFIX = "JBoss-EPP";
private static final ComparableVersion VERSION_4_2 = new
ComparableVersion("4.2");
private final JBossProductType productType;
@@ -53,11 +54,15 @@ public class JBossInstallationInfo {
File runJar = new File(binDir, "run.jar");
if (!runJar.exists()) {
throw new RuntimeException(runJar + " does not exist - " +
installationDir
- + " does not appear to be a JBoss installation/home
directory.");
+ + " does not appear to be a JBoss installation/home
directory.");
}
Attributes jarManifestAttributes = loadManifestAttributesFromJar(runJar);
this.productType =
JBossProductType.determineJBossProductType(jarManifestAttributes);
this.version = getVersion(jarManifestAttributes);
+ int majorVersionIndex = version.indexOf('.');
+ if (-1 == majorVersionIndex) {
+ throw new RuntimeException("Unexpected run.jar implementation version,
can't parse: " + this.version);
+ }
this.defaultBindAddress = getDefaultServerName(this.version);
this.isEap = determineEap(jarManifestAttributes);
this.majorVersion = version.substring(0, version.indexOf('.'));
@@ -112,6 +117,10 @@ public class JBossInstallationInfo {
String implementationVersion =
jarManifestAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
// e.g. AS 5.1: "Implementation-Version: 5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221634)"
// e.g. EAP 5.0: "Implementation-Version: 5.0.0.Beta (build:
SVNTag=JBPAPP_5_0_0_Beta date=200906191731)"
+ if (implementationVersion.startsWith(EPP_IMPL_VERSION_PREFIX)) {
+ implementationVersion =
implementationVersion.substring(EPP_IMPL_VERSION_PREFIX.length()).trim();
+ }
+
int spaceIndex = validateImplementationVersion(implementationVersion);
String version = implementationVersion.substring(0, spaceIndex);
if (version.startsWith(SOA_IMPL_VERSION_PREFIX)) {
@@ -120,6 +129,7 @@ public class JBossInstallationInfo {
if (version.startsWith(EAP_IMPL_VERSION_PREFIX)) {
version = version.substring(EAP_IMPL_VERSION_PREFIX.length());
}
+
return version;
}
diff --git
a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
index 20e7e81..13e1304 100644
---
a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
+++
b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
@@ -38,6 +38,7 @@ import org.apache.maven.artifact.versioning.ComparableVersion;
public class JBossInstallationInfo {
private static final String ANY_ADDRESS = "0.0.0.0";
private static final String LOCALHOST_ADDRESS = "127.0.0.1";
+ private static final String EPP_IMPL_VERSION_PREFIX = "JBoss-EPP";
private static final String SOA_IMPL_VERSION_PREFIX = "SOA-";
private static final ComparableVersion VERSION_4_2 = new
ComparableVersion("4.2");
@@ -56,8 +57,12 @@ public class JBossInstallationInfo {
Attributes jarManifestAttributes = loadManifestAttributesFromJar(runJar);
this.productType =
JBossProductType.determineJBossProductType(jarManifestAttributes);
this.version = getVersion(jarManifestAttributes);
+ int majorVersionIndex = version.indexOf('.');
+ if (-1 == majorVersionIndex) {
+ throw new RuntimeException("Unexpected run.jar implementation version,
can't parse: " + this.version);
+ }
this.defaultBindAddress = getDefaultServerName(this.version);
- this.majorVersion = version.substring(0, version.indexOf('.'));
+ this.majorVersion = version.substring(0, majorVersionIndex);
}
public JBossProductType getProductType() {
@@ -103,15 +108,21 @@ public class JBossInstallationInfo {
throw new IllegalStateException("'" +
Attributes.Name.IMPLEMENTATION_VERSION
+ "' MANIFEST.MF attribute not found.");
}
+ if (implementationVersion.startsWith(EPP_IMPL_VERSION_PREFIX)) {
+ implementationVersion =
implementationVersion.substring(EPP_IMPL_VERSION_PREFIX.length()).trim();
+ }
+
int spaceIndex = implementationVersion.indexOf(' ');
if (spaceIndex == -1) {
throw new IllegalStateException("'" +
Attributes.Name.IMPLEMENTATION_VERSION
+ "' MANIFEST.MF attribute has an invalid value: " +
implementationVersion);
}
+
String version = implementationVersion.substring(0, spaceIndex);
if (version.startsWith(SOA_IMPL_VERSION_PREFIX)) {
version = version.substring(SOA_IMPL_VERSION_PREFIX.length());
}
+
return version;
}
commit 1e50f290f975541077728074c0cccdb0b131928c
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jan 6 16:18:07 2012 -0600
[BZ 765795] Removed the recursive call that was creating StackOverflowError and added
the correct call to create a resource.
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
index 2395503..37131c2 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java
@@ -521,9 +521,9 @@ public class ResourceFactoryManagerBean implements
ResourceFactoryManagerLocal,
@XmlJavaTypeAdapter(value = ConfigurationAdapter.class)//
Configuration deploymentTimeConfiguration, byte[] packageBits, Integer timeout)
{
- return createPackageBackedResource(subject, parentResourceId, newResourceTypeId,
newResourceName,//
+ return createResource(subject, parentResourceId, newResourceTypeId,
newResourceName,//
pluginConfiguration, packageName, packageVersionNumber, architectureId,//
- deploymentTimeConfiguration, packageBits, (Integer) null);
+ deploymentTimeConfiguration, new ByteArrayInputStream(packageBits),
(Map<String, String>) null, timeout);
}
@Override