Hi again,
I tried adding the following builder method :
public static SessionFactory buildSessionFactory(final HibernateSessionManager hibernateSessionManager) {
       return hibernateSessionManager.getSession().getSessionFactory();
   }

And T5 returns  ...

throwables

       * org.hibernate.HibernateException: No CurrentSessionContext
         configured!

Stack trace

       * 
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:572)

       * 
$SessionFactory_1217831619b.getCurrentSession($SessionFactory_1217831619b.java)

       * 
br.com.arsmachina.dao.hibernate.BaseHibernateDAO.getSession(BaseHibernateDAO.java:111)

       * 
br.com.arsmachina.dao.hibernate.ReadableDAOImpl.createCriteria(ReadableDAOImpl.java:267)

       * 
br.com.arsmachina.dao.hibernate.ReadableDAOImpl.findAll(ReadableDAOImpl.java:125)

       * 
br.com.arsmachina.dao.hibernate.GenericDAOImpl.findAll(GenericDAOImpl.java:94)

       * $UserDAO_1217831614a.findAll($UserDAO_1217831614a.java)

I attached my custom implementations of the package "br.com.arsmachina.dao.hibernate" , now i have working ars-machina.generic-dao-hibernate and tapestry-hibernate modules together .

A few changes in BaseHibernateDAO :

- Replaced the import of class org.hibernate.classic.Session with org.hibernate.Session.

- Add the org.hibernate.Session object as a new paremeter in all the constructor methods.

  - Changes in class BaseHibernateDAO :

Add new field of type org.hibernate.Session, that will be initialized inside the constructor ( like the SessionFactory does ) Modify the method getSession(), returning the new field reference

By this way, the SessionFactory is Only used for his specific purposes and the Session is provided directly by the HibernateSessionManager service from tapestry-hibernate.

That´s all , any suggestions, opinions..


Nice evening !
Antonio



Thiago H. de Paula Figueiredo escribió:
On Mon, May 25, 2009 at 6:58 AM, GMAIL1 <amiguel.fernan...@gmail.com> wrote:

Hi all ,

Hi!

I´m trying to use te modules Ars-Machina generic-dao &
generic-dao-hibernate, but i´m getting the following message :

Nice to see that someone besides me is using the Ars Machina Project
packages. :)

No service implements the interface org.hibernate.SessionFactory*

These packages don't have a dependency on Tapestry-IoC, so they don't
provide a SessionFactory service to T-IoC.

Any addicional dependency for get working ? I will try making my own
builder method that returns an instance of SessionFactory, getting the instance 
from one of the services provided
the tapestry-hibernate module.

I've never used Tapestry-Hibernate myself, but I guess that'll work. :)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to