Hi Sergey, thanks for your prompt response. You are right, what I saw in the heap dump were links to the provider class, which prevented the classloader from being garbage collected.
The provider in question is registered via the standard JAX-RS means, in the getSingletons method of javax.ws.rs.core.Application. This is done this way because we need to configure the JacksonJaxbJsonProvider. I'll check with the Tomee team to see if endpoint specific buses are possible. Thanks a lot. On 26 June 2014 07:10, Sergey Beryozkin <[email protected]> wrote: > Hi > > On 26/06/14 04:32, [email protected] wrote: > >> Hi All, >> >> hope you are doing well. We've been using Tomee as our application server >> lately (we have some basic JAX-RS APIs), and after several redeployments >> we >> get a PermGen space error. I've been digging into the heap dump, and from >> what I see our custom JAX-RS provider (JacksonJaxbJsonProvider) is being >> referenced inside ExtensionManagerBus's properties and never unregistered. >> >> I'm pretty sure it's Tomee's fault, because it should be doing due cleanup >> on undeployment, but I was wondering whether the ExtensionManagerBus has >> any way of removing the registered providers. >> >> CXF JAX-RS checks provider context properties when it registers > providers and stores reflection-specific information and proxies on the > bus, it does not store the actual providers. > > Do you have some more info how Bus ends up linking to the provider ? > We have a feature allowing providers registered directly on the bus via > bus properties, is it what is being done in your case ? > > If not then I'm not sure. ProviderFactory holding providers is registered > on the endpoint but I'm not seeing the code where the endpoint is > registered on the bus. > > Either way, the problem appears to be originating from the fact that a > single shared bus is used between multiple endpoints in Tomee. Is it > possible in Tomee endpoint descriptors set up an endpoint specific bus ? > For example, in Spring/Blueprint descriptors which can declare a new CXF > Bus and have jaxrs/jaxws endpoints linking to it and this bus would be > recycled on the redeployment. > > So, please let me know: > - if you have more info about the link from Bus to providers > - check if providers are registered directly on the bus (check its > properties like "javax.ws.rs.ext.MessageBodyReader") > - check if Tomee allows creating endpoint specific buses > > Lets us know please how it goes > > Thanks, Sergey > > > > > Any help would be appreaciated >> Thanks in advance. >> >> > >
