On Wed, 28 May 2014 07:52:31 -0300, Jochen Kemnade <jochen.kemn...@eddyson.de> wrote:

Hi,

Hi!

I'm still undecided how to handle this issue. To get started, I created
and attached a simple patch that downgrades the write lock to a read
lock if the attribute's class is a String, a primitive wrapper type or
has the ImmutableSessionPersistedObject annotation.
This is of course not very flexible but should work in a lot of
situations. And we can always extend the list of immutable classes later.
However, if we want a more flexible approach, I guess the best way to go
would be a SessionPersistedObjectAnalyzer2 interface, with an added
boolean isMutable(T sessionPersistedObject) method.

I'd keep SessionPersistedObjectAnalyzer as it is and create a separate service, let's say ImmutableClassService, with a single method isMutable(Class clasz), which would be basically a collection of Class instances received from distributed configuration. This new service could be even used by other code that could benefit from knowing which classes have immutable instances.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to