WICKET-625: The problem still exists in Injector class

View: New views
3 Messages — Rating Filter:   Alert me  

WICKET-625: The problem still exists in Injector class

by Daniel Stoch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have added a comment to this issue WICKET-625:

"I think the problem still exists in Injector class, so this issue
should be reopened. There is classToFields field with "FIXME:
WICKET-625..." comment :), which is used to cache fields to inject for
specified class. This map is not cleaned up when hot-deploying.
The patch attached above removes this map (cache), but it has not been
applied and I think it is ok, because removing this cache could
drastically degrade performance.

My proposal is to use a solution described in this article:
http://weblogs.java.net/blog/jhook/archive/2006/12/class_metadata.html
and define classToFields field as a:
WeakHashMap<ClassLoader, ConcurrentHashMap<String, ClassMetaData>>
where a ClassLoader key will be a class loader of injected object's
class. When we will use ClassLoader as the key, then the second map
can store class names instead of Class<?> references."

--
Daniel

Re: WICKET-625: The problem still exists in Injector class

by Juergen Donnerstag :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That is marked to be a 1.3 problem. Could you do me a favor and
validate if it applies to 1.4 as well. If it does please go ahead and
reopen the issue and select 1.4 as affected. Thanks a lot

Juergen

On Fri, Jul 31, 2009 at 12:35 PM, Daniel Stoch<daniel.stoch@...> wrote:

> Hi,
>
> I have added a comment to this issue WICKET-625:
>
> "I think the problem still exists in Injector class, so this issue
> should be reopened. There is classToFields field with "FIXME:
> WICKET-625..." comment :), which is used to cache fields to inject for
> specified class. This map is not cleaned up when hot-deploying.
> The patch attached above removes this map (cache), but it has not been
> applied and I think it is ok, because removing this cache could
> drastically degrade performance.
>
> My proposal is to use a solution described in this article:
> http://weblogs.java.net/blog/jhook/archive/2006/12/class_metadata.html
> and define classToFields field as a:
> WeakHashMap<ClassLoader, ConcurrentHashMap<String, ClassMetaData>>
> where a ClassLoader key will be a class loader of injected object's
> class. When we will use ClassLoader as the key, then the second map
> can store class names instead of Class<?> references."
>
> --
> Daniel
>

Re: WICKET-625: The problem still exists in Injector class

by Daniel Stoch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, it applies to 1.4 as well (sorry, I forgot to mention in my previous post).
I cannot nor reopen or edit this issue in Jira, because I have not such rights.

--
Daniel

On Fri, Jul 31, 2009 at 1:10 PM, Juergen
Donnerstag<juergen.donnerstag@...> wrote:
> That is marked to be a 1.3 problem. Could you do me a favor and
> validate if it applies to 1.4 as well. If it does please go ahead and
> reopen the issue and select 1.4 as affected. Thanks a lot
>
> Juergen
>