Thanks for your help.
@Transient sounds for me very interesting, it seems to be the best
annotation to get an additional method into the mapped object.
So what could be the reason that my session is closed? How to find out?
The way I do it is just
Code:
Session session = getSessionFactory().getCurrentSession();
Criteria crit = session.createCriteria(Objects.class);
...criteria.list...
build by spring:
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
...
<tx:annotation-driven transaction-manager="txManager"/>
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
...
The exception i get is:
Code:
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
Is there something wrong in my configuration?
Thanks again for your help!