jPOS
jPOS copied to clipboard
Q2 classloder issue
trafficstars
In 686756eaa6e8f we made a change that breaks classloading from Wildfly 10.
In jpos-users Rama mentions that this change fixes the problem:
public Q2 (String[] args, BundleContext bundleContext) {
super();
this.args = args;
startTime = System.currentTimeMillis();
instanceId = UUID.randomUUID();
parseCmdLine (args);
libDir = new File (deployDir, "lib");
dirMap = new TreeMap ();
deployDir.mkdirs ();
--- mainClassLoader = getClass().getClassLoader();
+++ mainClassLoader = Thread.currentThread().getContextClassLoader();
this.bundleContext = bundleContext;
}
We'll consider using one or the other one depending on bundleContext being null.
This needs some deep review.