0 Replies Latest reply on Jun 23, 2015 3:59 PM by Thiago Araujo

    Triggering garbage collection of classloader on redeploy

    Thiago Araujo Newbie

      Hello there,


      I have an application (.ear) which makes use of JNI native libraries dynamically loaded.

      There is a requirement of being able to re-deploy it without having to restart the application server.


      I have tested the application with Jboss EAP 6.1, EAP 6.3 and AS 7.1.1 Final,

      and I can successfully do the steps below:


      1 - undeploy the application

      2 - connect to the JVM through JConsole and request a Garbage Collection

      3 - redeploy the updated application


      But if I just re-deploy it, without doing the step 2,

      I get an error stating that the native library is still in use (loaded).


      Is there any way of configuring my application or the server to dispose of the classloader used by the app right after it gets undeployed?


      Thanks in advance.