Sure, easy to do that in my application code. However, this is a service
(that injects a session into it) in a Trails library that builds on
tapestry-hibernate. I can change the library, but I was just wondering if
it'd be worth and possible to fix in tapestry-hibernate itself.
Kalle
On Wed, Feb
HibernateSessionManager.getSession()
On Wed, Feb 4, 2009 at 9:16 PM, Kalle Korhonen
wrote:
> Noo.. it doesn't have anything to with request context or not. Just that
> doing DetachedCriteria.getExecutableCriteria(session) just won't work with
> the shadow Session proxy because Hibernate tries to
Noo.. it doesn't have anything to with request context or not. Just that
doing DetachedCriteria.getExecutableCriteria(session) just won't work with
the shadow Session proxy because Hibernate tries to cast it to
SessionImplementor. Wonder if it could be fixed in tapestry-hibernate,
telling the proxy
I just hit the same problem "cannot be cast to ...SessionImplementor" while
trying to use Hibernate session in a service that auto-populates some
entries to the database at start-up (so obviously not in request context).
Did anybody find a solution for this?
Kalle
On Wed, Jul 9, 2008 at 10:08 AM
Wow I love that. Somehow I mistakenly thought it didn't work that way,
thanks.
As a related question :
is there a way to get the 'real' session instead of the proxy on a call to
getSession()
The reason I'm asking is that in a lot of cases I want to use (Hibernate's)
DetachedCriteria's, so I c
If you are using tapestry-hibernate, the injectable Session service is
a perthread proxy. It can be shared across threads, but each method
invocation on the proxy is redirected to a real per-thread Hibernate
session.
On Wed, Jul 9, 2008 at 9:27 AM, Britske <[EMAIL PROTECTED]> wrote:
>
> I found s
>
> How can I get the current (per-thread) hibernate-session (as configured
> through tapestry-hibernate) from a singleton custom tapestry service?
>
I haven't tried creating a getInstance type method for my service classes,
but here is my understanding. The default scope for a service is singleto