>I get the feeling you don't understand how the hibernate session works in
tapestry. Please re-read my comment from the other thread describing the
singleton proxy and per-thread instance.<
The SessionSource is all about hibernate. SessionSource.createSession ->
new Session everytime. (Singleton)
HibernateSessionManager is the holder of the session and is PerThread.
The actual session object is a shadow property that is derived from calling
HibernateSessionManager.getSession().
I know exactly how it works. So please correct your opinion about the
session source.
And also I am not about the session here, the session is just an example. I
started to need something
like this but now I know better.
Currently I go for something like this:
1. Object creation with private field and constructor injection
2. Own stuff for method invocation as stated so I can have fun with
coding by convention on my own. I will also invoke on annotation
presents.
3. at the end clear up thread if needed.
I currently write my own Invokeable task that performs injections and
values post injection and so on.
Cheers,
Martin (Kersten)
PS: DejavĂș again. This thing I wanted 2008 too and well nope no ticket in
the jira for this one :)
Jepp, I keep my hands where they belong, in my pocket.
2013/9/23 Lance Java <[email protected]>
> I'm not sure I see the point. ALL services in the tapestry registry are
> singletons (including the hibernate session). So all services can be
> constructor injected.
>
> I get the feeling you don't understand how the hibernate session works in
> tapestry. Please re-read my comment from the other thread describing the
> singleton proxy and per-thread instance.
>