hi all,
i'm getting ready to start work on a new application
that will be using SLSB biz tier and of course
hibernate for the orm of the domain objs. i'm trying
to get a clear understanding of the JTA integration
features in hibernate3.
the docs say that the session now responds to the JTA
synchronization events (beforecompletion = flush,
aftercompletion?=close). this is great and frees us
devs to only concerning ourselves with obtaining
the session from the factory. or does it?
my question is this: if i want to obtain a session that
was created within the same CMT transaction (or
obtain a new one, whatever the case maybe) is this
still the responsibility of the application employing
one of the know patterns to address this issue? the
below quote from the docs doesn't provide me with
clear understanding or at least doesn't provide the
whole picture as it relates to this issue. if i was new
to hibernate this could imply that the sessionfactory
manages this for me.
"In other words, all you have to do in a managed environment is to get a Session from the SessionFactory (usually bound to JNDI), do your data access work, and leave the rest to the container. "
thanks,
sean mcdaniel
|