Wesley Wu wrote:
> Hi Scott,
>
> I believe I've fixed this issue by adding @ApplicationScoped and
> @RequestedScoped annotation to my beans. :)
>   
I still think there's a chance for a Resin leak; I just don't understand 
where it's coming from.

It shouldn't matter what context you're injecting from, as long as 
you're creating a new top-level CreationalContext. The getReference for 
a dependent bean shouldn't have any references to it.

-- Scott
> Thanks for your efforts.
>
> -Wesley
>
> 2010/8/18 Wesley Wu <wumen...@gmail.com>:
>   
>> Hi Scott,
>>
>> Thanks for the checking.
>>
>> Today I double checked the CDI spec and got some new knowledge.
>>
>> Nearly all my beans were not annotated with any scope, so that they
>> should be @Dependent.
>>
>> Some of the beans were created (not injected) in a servlet filter via
>> a static ObjectFactory.
>> I think the beans should be transient but they are NOT.
>>
>> They actually were probably immortal because they were created in a
>> servlet filter (singleton in webapp).
>> And also my ObjectFactory was annotated with @Singleton too, too bad.
>>
>> As a workaround, I may annotated most my beans as @ApplicationScoped
>> or @SessionScoped,
>> because they're all stateless. At least after a bean was annotated as
>> @SessionScoped, the
>> @PreDestroy method was correctly fired when the request ended.
>>
>> This workaround SHOULD address the memory leak problem of my site,
>> though not thoroughly tested.
>>
>>
>> It's my initial thought. Hope you have a full story to tell me, if
>> u've got some time. :)
>>
>> Thanks again.
>>
>> -Wesley
>>
>>     
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>   



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to