This closes #170

This commit is contained in:
Clebert Suconic 2015-09-18 15:08:09 -04:00
commit dc3b01036d
2 changed files with 21 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -526,6 +527,8 @@ public class Create extends InputAbstract {
File dataFolder = new File(directory, "data");
dataFolder.mkdirs();
filters.put("${logmanager}", getLogManager());
if (javaOptions == null || javaOptions.length() == 0) {
javaOptions = "";
}
@ -616,6 +619,23 @@ public class Create extends InputAbstract {
return null;
}
private String getLogManager() throws IOException {
String logManager = "";
File dir = new File(path(getHome().toString(), false) + "/lib");
File[] matches = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith("jboss-logmanager") && name.endsWith(".jar");
}
});
if (matches != null && matches.length > 0) {
logManager = matches[0].getName();
}
return logManager;
}
/**
* It will create the jms configurations
*/

View File

@ -23,7 +23,7 @@ ARTEMIS_HOME='${artemis.home}'
# Java Opts
JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M ${java-opts}"
JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Xbootclasspath/a:$ARTEMIS_HOME/lib/${logmanager} -Djava.util.logging.manager=org.jboss.logmanager.LogManager ${java-opts}"
# Debug args: Uncomment to enable debug