Hibernate Search 3.0.0.Beta2
by Emmanuel Bernard
Hibernate Search 3.0.0.Beta2 is out with a bunch of new interesting
features:
* shared Lucene IndexReader, significantly increasing the
performances especially in read mostly applications
* ability to customize the object graph fetching strategy
* properties projection from the Lucene index
* ability to sort queries (thanks to Hardy Ferentschik)
* expose the total number of matching results regardless of
pagination
* and some other surprises and bug fixes
Check http://blog.hibernate.org/cgi-bin/blosxom.cgi/
2007/05/31#HSearch-3.0.0.Beta2 for more information.
17 years, 6 months
NonUniqueObjectException
by Heber Lazcano
I have the next exception:
org.hibernate.NonUniqueObjectException: a different object with the same
identifier value was already associated with the session
I work with tomcat 5 and hibernate 3.2
I have a ThreadLocal<Session> threadLocal where put the session and get
it, but each called to tomcat open new session of hibernate...
because the session in threadLocal is null
private static Session getSession() throws HibernateException {
Session session = threadLocal.get();
if (session == null || !session.isOpen()) {
if (sessionFactory == null) {
rebuildSessionFactory();
}
session = (sessionFactory != null) ?
sessionFactory.openSession() : null;
threadLocal.set(session);
}
return session;
}
any idea ? what happen this?
Thank you very much.
--
*Heber Lazcano*
*/Daemons Developer/*/ /
*Tralix - Everything happens on email.*
/Office: +52 (442) 2620304/
/Mobile: +52 (442) 1569756/
*/heber(a)tralix.com <mailto:heber@tralix.com>/*
17 years, 6 months