All the DAO classes I've created we're purely stateless ... All final
fields, immutable values. that's because the only perthread part is the
injected Hibernate session.

Basically, all your services should be singletons unless here's a
compelling reason not to, and there rarely is.

On Friday, September 14, 2012, George Christman wrote:

> Thank You Carsten for your explanation. It definitely helps and I'll
> definitely check out your suggestions.
>
> Does anybody have any suggestions in regards to DAO's? Should the scope be
> set to Perthread or should DAO services be left as singletons? I had an
> issue last week with a multi thread import process which resulted in my
> hibernate session having lots of issues. After learning about service
> states
> today, I'm thinking this topic may have something to do with my issues last
> week?
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Sevice-State-Stateless-tp5716278p5716294.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org<javascript:;>
> For additional commands, e-mail: users-h...@tapestry.apache.org<javascript:;>
>
>

-- 
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

Reply via email to