On Feb 7, 2008 10:13 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Got some questions, this is the one i use up to now:
>
> @Inject private Session session
>
> Is there a default  HibernateSessionManager created somewhere?

it is created same time the session is.

> second question:
>
> @Inject private  HibernateSessionManager manager
> @Inject private Session session
>

session and session from the maneger are the same,
just it's that maneger will commit at the end
so if you call
session.commit();
you must add after that line session.beginTransaction();
or manager will throws errors in the log

look at the source of the HibernateSessionManager,
things will be clearer then ...

> In this case session is taken from the manager, the latter is just acting
> like Hibernate's transaction, right?

not sure what you mean

>
> Thanks,
>
> A.C.

Davor Hrg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to