Skip to content

Commit

Permalink
[JBEAP-28644][JBWS-4433]:Don't create JAXPDelegateClassLoader for eac…
Browse files Browse the repository at this point in the history
…h invocation in the CXFServletExt
  • Loading branch information
jimma committed Dec 4, 2024
1 parent 5d278d4 commit cfc53c4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,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 @@ -160,7 +163,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 cfc53c4

Please sign in to comment.