ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Lambrechts <ludoviclambrechts-...@yahoo.fr>
Subject How to access multiple databases at the same time?
Date Tue, 26 Jul 2005 12:10:48 GMT
Hi there! I'am new to iBatis Data Mapper, which i'am
testing for futur use in a new project.

I've read the docs and tutorials and made some tests
to see how it could help me. I'm pretty impressed by
this framework!

Now, I'd like to know if it's possible to access
multiple databases from, lets say, a servlet in Tomcat
(and of course, the best way to do it)? Ideally, the
framework shouldn't be initialized for each request,
but only once, during the first load of the servlet.

My application will be a "single point of access" for
all  the users. The db structure and the queries are
the same but, depending on the user's department, I
have to query different instances of the db, possibly
located on different servers.

Of course, I don't want to make one servlet for each
db. At first sight, I tought of building an array of
SqlMapClient's or, better (? ;-)), using instances of
DaoManager... but I've no clue :-(

Since I'm only a beginner, somebody can please help?



[developer, 28 years old, brussel, 


Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

View raw message