tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kemnade <jochen.kemn...@eddyson.de>
Subject Re: [2/2] git commit: TAP5-2049: Use a lock when reading/updating HttpSession attributes - Add a symbol to deactivate the session locking logic
Date Wed, 28 May 2014 13:32:36 GMT
Hi,

Am 28.05.2014 14:25, schrieb Thiago H de Paula Figueiredo:
>> 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.

Yes, that's what I proposed earlier. I've come to thinking that it might 
be overkill to create a service for just that tiny purpose and that it 
might become hard to keep the overview over all services over time if we 
did that too often. And I thought that SessionPersistedObjectAnalyzer 
might be the right place to add the method. But I'll have a go at that 
and see how bad it gets. ;-)
Only, I don't like the name ImmutableClassService because it doesn't 
tell you straight away what the service is for. How about 
ClassMutabilityAnalyzer if we really want to use it for that single 
purpose only?

Jochen

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


Mime
View raw message