I assume that the following is a no no(?)
> public Criteria createCritera(Class<?> persistentClass) {
> ...//creation of session object etc.
> session.beginTransaction();
> Criteria crit = session.createCriteria(persistentClass);
> session.getTransaction().commit();
> session.close();
>
> return crit;
}
OR is it ok to use and manipulate a Critera object even though the Session object used to create th Critera is closed and the current Transaction is commited.