java - How to kill all the threads before deploying a liferay portlet -
i using liferay 6.2 threads created using servletcontextlistener.
so, when try deploy specific portlet application, gives me following error -
info: illegal access: web application instance has been stopped already. not load com.sun.org.apache.xerces.internal.jaxp.documentbuilderfactoryimpl. eventual following stack trace caused error thrown debugging purposes attempt terminate thread caused illegal access, , has no functional impact. java.lang.illegalstateexception @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1600) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1559) @ javax.xml.parsers.factoryfinder.getproviderclass(factoryfinder.java:112) @ javax.xml.parsers.factoryfinder.newinstance(factoryfinder.java:178) @ javax.xml.parsers.factoryfinder.newinstance(factoryfinder.java:147) @ javax.xml.parsers.factoryfinder.find(factoryfinder.java:265) @ javax.xml.parsers.documentbuilderfactory.newinstance(documentbuilderfactory.java:121) @ com.h5g.deployment.util.deploymentutil.getlobbybranch(deploymentutil.java:642) @ com.h5g.deployment.service.clientstatuschecktask.call(clientstatuschecktask.java:47) @ com.h5g.deployment.service.clientstatuschecktask.call(clientstatuschecktask.java:1) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:744) i'd been looking way kill threads before auto deploy kicks in.
any pointers helpful.
this sounds lot you're creating threads - typically raises eyebrow in application server environment. there several ways mitigate - 1 least impact on current (implied) architecture need threads stop when undeploy web application. i'm assuming doesn't happen "on deploy", rather "after undeploy" because you're starting threads in servletcontextlistener, never stopping them.
a servletcontextlistener gets notified when application shut down, can use flag state threads spawned. in typical endless loop, threads check if still should running - if shouldn't, exit endless loop , they'll beautifully clean behind them. when application redeployed, new servletcontextlistener spawn new threads.
Comments
Post a Comment