You should use the injected service.

It is thread safe.

In addition, there is  logic in place to notify it when class loaders
change (i.e., when reloading a component or service-layer class), so
that it can clear its caches. This prevents memory leaks (where the PA
keeps a reference to a Class and therefore an otherwise unused
ClassLoader).

On Thu, Sep 16, 2010 at 4:26 AM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Thu, 16 Sep 2010 02:54:52 -0300, 9902468 <ville.virta...@greenstreet.fi>
> wrote:
>
>> Hi,
>
> Hi!
>
>> It uses T5 PropertyAccess service, but the static method doesn't receive
>> it as parameter - it is instantiated inside the method using new
>> PropertyAccessImpl();.
>
> PropertyAccessImpl is in a internal package and there's no guarantee of
> backward compatibility. You should not use it. While don't you just inject
> PropertyAccess through Tapestry-IoC?
>
>> Now the only question is: is the PropertyAccess service thread safe to
>> use? What about the ClassPropertyAdapter.set(object, string, object) and
>> ClassPropertyAdapter.get(object, string)?
>
> Looking at the sources, I can't see why it wouldn't be thread-safe. The set
> methods in PropertyAccessImpl and ClassPropertyAdapterImpl don't change
> their state.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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

Reply via email to