You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2008/03/26 03:54:21 UTC

t5: multiple databases with Tapestry-Hibernate

Hi,

Can we access multiple databases with Tapestry-Hibernate? any tips to do
this? Thanks.
-- 
View this message in context: http://www.nabble.com/t5%3A-multiple-databases-with-Tapestry-Hibernate-tp16294517p16294517.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: t5: multiple databases with Tapestry-Hibernate

Posted by Angelo Chen <an...@yahoo.com.hk>.
hi Jonathan,

yes, tapestry-hibernate works so well that I almost forgot how to access
MySql directly, and now I need to access a second database to fetch some
data, and I am thinking if Tapestry-Hibernate can make life easier as well
before I go the jdbc route for the 2nd database.

A.C.


Jonathan Barker wrote:
> 
> Angelo,
> 
> I do this routinely using Hibernate via Spring and tapestry-spring, but I
> haven't tried it with tapestry-hibernate.  Looking at the source:
> 
> 

-- 
View this message in context: http://www.nabble.com/t5%3A-multiple-databases-with-Tapestry-Hibernate-tp16294517p16296340.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: t5: multiple databases with Tapestry-Hibernate

Posted by Jonathan Barker <jo...@gmail.com>.
Angelo,

I do this routinely using Hibernate via Spring and tapestry-spring, but I
haven't tried it with tapestry-hibernate.  Looking at the source:

http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-hibernate/src
/main/java/org/apache/tapestry/hibernate/HibernateModule.java?view=markup

tapestry-hibernate makes it really easy to use a single database if you
conform to the tapestry app-package conventions.  You could probably mimic
what is being done in HibernateModule to create a second configuration, a
second HibernateSessionManager, HibernateSessionSource and a second Session.


The problem will then be that you will have multiple options available for
each of those, so the injection that works so well now in auto-wiring
services will fail.  I think you would need to re-write HibernateModule with
@InjectService() all over the place.


Jonathan



> -----Original Message-----
> From: Angelo Chen [mailto:angelochen960@yahoo.com.hk]
> Sent: Tuesday, March 25, 2008 10:54 PM
> To: users@tapestry.apache.org
> Subject: t5: multiple databases with Tapestry-Hibernate
> 
> 
> Hi,
> 
> Can we access multiple databases with Tapestry-Hibernate? any tips to do
> this? Thanks.
> --
> View this message in context: http://www.nabble.com/t5%3A-multiple-
> databases-with-Tapestry-Hibernate-tp16294517p16294517.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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