jPOS icon indicating copy to clipboard operation
jPOS copied to clipboard

Q2 classloder issue

Open ar opened this issue 7 years ago • 0 comments
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.

ar avatar Jun 18 '18 21:06 ar