How should the AS7 copy of the JAX-RS API jars be initialized? It seems
wrong to me, that each deployed Seam application is calling
I also don't see why we need the
org.jboss.seam.resteasy.SeamResteasyProviderFactory class which just
passes through to the extended ResteasyProviderFactory class.
Short term fix #1: eliminate the SeamResteasyProviderFactory class and
use ResteasyProviderFactory in its place.
Short term fix #2: don't package the rest easy jars with the application.
I think with these changes, there may still be multiple calls to the
ResteasyProviderFactory.setInstance() but each one should pass the same
ResteasyProviderFactory (from the AS7 JAR-RS API jars).
To be worked out, changes to avoid having applications call
ResteasyProviderFactory.setInstance(), that should be initialized by AS7
(I think) or at least handled more gracefully. As things stand
currently, applications probably shouldn't clear the instance (as that
would break other apps).
On 02/14/2012 08:07 PM, Scott Marlow wrote:
I agree that if the user doesn't bundle their own rest east jars,
would probably work around the issue.
I haven't seen any standalone tests that recreate the leak yet but it
looks likely that the application copy of ResteasyBootstrap.java
would call the API
which would save the static reference that doesn't get cleared. Worse
than that, I think the setInstance call would blow away any other
ResteasyProviderFactory instance that is already set.
Which backs up the assertion that rest easy jars shouldn't be bundled
with a user app currently. ResteasyBootstrap should probably clear the
instance at shutdown time but that wouldn't change the API static issue.
On 02/14/2012 03:06 PM, Stuart Douglas wrote:
> I'm pretty sure this is because the user is bundling their own rest easy jars in
EAR/lib. The API caches stuff in statics, which is keeping a reference to the user
> On 15/02/2012, at 2:17 AM, Scott Marlow wrote:
is an AS7 user forum thread
>> about application classloader leaks in a few different areas.
>> All of them involve a Seam 2.2.2 application using Resteasy 2.3.1. One
>> of the leaks is described in jira RESTEASY-660.
>> Is there something that the users application has to do, to get Seam
>> 2.2.2 to call ResteasyProviderFactory.clearContextData() at the end of a
>> -------- Original Message --------
>> Subject: Re: [jboss-as7-dev] help needed with responding to reported
>> classloader leaks in (Rest, Rest WS, JPA, EJB3 activation/passivation,
>> Date: Tue, 14 Feb 2012 07:33:29 -0500
>> From: Bill Burke<bburke(a)redhat.com>
>> To: jboss-as7-dev(a)lists.jboss.org
>> On 2/13/12 12:59 PM, Scott Marlow wrote:
>>> org.jboss.resteasy.util.ThreadLocalStack creates ThreadLocal pseudo-leak
>>> on AS 7: https://issues.jboss.org/browse/RESTEASY-660
>> This may be Seam related.
>> Bill Burke
>> JBoss, a division of Red Hat
>> jboss-as7-dev mailing list
>> seam-dev mailing list
seam-dev mailing list