-
1. Re: getting a handle on Session
jaikiran Jan 9, 2008 8:44 AM (in response to grego1)Which version of EJB do you use? For EJB3, you can get the EntityManager injected. For earlier versions, you can lookup the SessionFactory object and then get the Session from the session factory. More details can be found in the Hibernate Reference at http://www.hibernate.org/hib_docs/reference/en/html/index.html especially Chapter 3
-
2. Re: getting a handle on Session
grego1 Jan 30, 2008 1:29 PM (in response to grego1)Sorry for the delay. We're using EJB3 and we have the EntityManager injected. I don't see methods in EntityManager that allow us to get a handle on the Hiberhate SessionFactory - am I missing something?
What we're really trying to do is use a Criteria to filter our query results from the database. Following that down, we can eventually do a getCriteria...
Any thoughts?
Thanks. -
3. Re: getting a handle on Session
deanouk Mar 20, 2008 6:46 AM (in response to grego1)I'm after a similar feature, so I can use the Hibernate session to detache the objects...