On Wed, 19 May 2010 10:18:25 -0300, Tomek <tomekspa...@gmail.com> wrote:
Hi All,
Hi!
I can't figure out how to implement custom hibernate connection
configuration in tapestry 5. Till now I used hibernate.cfg.xml file, but
I want to change database any time the new user log in.
This is a very specific scenario and Tapestry-Hibernate was built to cover
the most common ones. You can use Tapestry-Hibernate code as the starting
poing of you own code.
Do You think it is posiible to
change this Session object on the fly and also 2 different user will be
able to work on 2 different databases simultaneously?
You could decorate the Session service and return a completely different
Session for each different user, but I'm not sure it would work.
One more thing is how to implement my own HibernateConfigurer and take
advantage of contributeHibernateSessionSource method. I really don't
understand this. Tapestry wants me to create my own
WidgetHibernateConfigurer class that defines:
configuration.setProperty("hibernate.connection.driver_class",
"org.postgresql.Driver");
No. Think of HibernateConfigurer as a Configuration post-processor.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org