RE: t5: multiple databases with Tapestry-Hibernate

2008-03-26 Thread Angelo Chen

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: t5: multiple databases with Tapestry-Hibernate

2008-03-25 Thread Jonathan Barker
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:[EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]