You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Juan E. Maya" <ma...@gmail.com> on 2008/12/04 21:02:16 UTC

Tapestry-Hibernate + Tapestry-Spring

Hello,
i am having some issues trying to use both modules together. Is this
possible?
I am getting an "Illegal attempt to associate a collection with two open
sessions"; when i try to save my objects. Is there a way to inject the same
used by Tapestry-Hibernate session to my daos?

Right now i am injecting a sessionFactory via spring:
public class BaseHibernateDao<T> extends HibernateDaoSupport{


@Autowired
    public BaseHibernateDao(SessionFactory sessionFactory) {
        super.setSessionFactory(sessionFactory);
        this.persistentClass = (Class<T>) ((ParameterizedType)
getClass().getGenericSuperclass()).getActualTypeArguments()[0];
    }

}

Thank u for your help!