Hi Wicket Devs,
TextTemplateResourceReference is dynamic, it contains a Map<String,
Object> to populate a normal text resource.
issue 1: It cannot be shared between servers in a cluster, I think we
should add some javadocs explaining this. The old, "if your cluster does
not support sticky sessions, this will not work" bit.
issue 2: The problem is that it is registered using the same key in the
ResourceReferenceRegistry each time. In 1.5.5 only the first instance
was registered, but I see this is fixed, at least in master. Now, it
deregisters the previous instance and registers a new instance. This is
not very thread safe. Think multiple instances created in different
sessions.
I was wondering, would it be possible to register
TextTemplateResourceReference using a autogenerated "resource name"
(param 2 to ResourceReference constructor), and use some sort of
listener to identify when it goes out of scope (page expired etc), and
then clean it up?
I wouldn't mind working on a patch, if I could get some pointers on
where to start.
Thanks,
Jesse
- TextTemplateResourceReference registration Jesse Long
-