modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
| 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit faf0013f511894eb2c7b9ef14f87b5e87d657154
Author: Thomas Segismont <tsegismo(a)redhat.com>
Date: Wed Jul 3 14:01:00 2013 +0200
Bug 863502 - EMS ConnectionFactory.discoverServerClasses can throw OutOfMemoryError
Changed the libraryURI root: the plugin was looking for catalina jars from the
CATALINA_HOME directory, instead of CATALINA_HOME/lib.
Now users can put any number of files in CATALINA_HOME, provided they're outside
the lib directory.
diff --git
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
index f1e2c51..c289069 100644
---
a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
+++
b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java
@@ -195,10 +195,11 @@ public class TomcatServerComponent<T extends
ResourceComponent<?>> implements JM
// to have a version compatible local install and set the install path to
the local path, even though
// the server url was remote.
String catalinaHome =
pluginConfig.getSimpleValue(PLUGIN_CONFIG_CATALINA_HOME_PATH, null);
- boolean hasLocalJars = new File(catalinaHome).isDirectory();
+ boolean hasLocalJars = catalinaHome != null && new
File(catalinaHome, "lib").isDirectory();
if (hasLocalJars) {
- connectionSettings.setLibraryURI(catalinaHome);
+ String libDir = new File(catalinaHome,
"lib").getAbsolutePath();
+ connectionSettings.setLibraryURI(libDir);
connectionFactory.discoverServerClasses(connectionSettings);
// Tell EMS to make copies of jar files so that the ems classloader
doesn't lock
Show replies by date