Hi All,

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. I am building one
shared CMS for multiple websites and in my scenerio every user of CMS uses
his/her database. So I would like to create custom Session or maybe
SessionFactory. In every page of my CMS i @Inject Session object that do
alll database job - select, update and so on. 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?

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");

and so on??

Tomasz

Reply via email to