Skip to content

Commit

Permalink
[JBWS-4433]:Don't create JAXPDelegateClassLoader for each invocation …
Browse files Browse the repository at this point in the history
…in the CXFServletExt
  • Loading branch information
jimma committed Dec 4, 2024
1 parent 602dc7f commit 346e8c1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@
public class CXFServletExt extends AbstractHTTPServlet implements ServletDelegate
{
private static final long serialVersionUID = -1820187716558491952L;
private ClassLoader delegateClassLoader;
protected Endpoint endpoint;
protected Bus bus;

@Override
public void init(ServletConfig sc) throws ServletException {
super.init(sc);
loadBus(sc);
delegateClassLoader = SecurityActions.createDelegateClassLoader(SecurityActions.getContextClassLoader(),
CXFServletExt.class.getClassLoader());
}

protected void loadBus(ServletConfig servletConfig) throws ServletException
Expand Down Expand Up @@ -157,7 +160,7 @@ protected Bus getBus()
private ClassLoader pushServerCL()
{
ClassLoader current = SecurityActions.getContextClassLoader();
SecurityActions.setContextClassLoader(SecurityActions.createDelegateClassLoader(current, CXFServletExt.class.getClassLoader()));
SecurityActions.setContextClassLoader(this.delegateClassLoader);
return current;
}

Expand Down

0 comments on commit 346e8c1

Please sign in to comment.