PS:  if you're going to use the second approach (setUserConnection or
openSession(Connection)), be sure to turn off lazy loading...it won't
work without a DataSource configuration.

Clinton


On Tue, 14 Dec 2004 10:36:05 -0700, Clinton Begin
<[EMAIL PROTECTED]> wrote:
> Couple ways to deal with this.  First, for multiple databases you will
> need an instance of SqlMapClient for each (i.e. 3 databases means 3
> instances of SqlMapClient).  Do not attempt to share the same
> SqlMapClient instance accross databases.
> 
> As for runtime configuration, you can achieve this at least two ways.
> Firs, you can create an instance of SqlMapClient using the
> SqlMapClientBuilder as always, but you pass a properties instance
> (with your connection string) as the second parameter to the build
> method.  See the docs for more.
> 
> Another way to deal with multiple databases (depending on your needs)
> is to bypass the SqlMaps datasource configuration entirely, and
> instead set a user connection (use SqlMapClient.setUserConnection() or
> .openSession(Connection)).  See the docs for more.
> 
> Cheers,
> Clinton
> 
> 
> On Tue, 14 Dec 2004 16:50:48 +0200, Alexey Boroday
> <[EMAIL PROTECTED]> wrote:
> > Hello.
> >
> >  Could you help me please - I'd like to configure dataSource connection
> > string in the run-time instead of storing it in the sqlmap.config file.
> >  How can I fill this property in runtime?
> >
> >  And one more - application should be able read data from two separate
> > databases and write it into the third one. Tell me please - is it possibly
> > to have two database elements in the sqlmap.config? Or I should define three
> > dataSource elements inside one database?
> >  How can I run QueryForList method to make it returns object list from one
> > database if in the config file three dataSource are enumerated?
> >
> >  Thank you
> >
> > ___________________________________________________________________________
> >
> > This communication is confidential and may be legally privileged.
> > If you believe you are not an intended recipient, please inform the sender,
> > delete the e-mail and do not copy, print or use it or disclose it to others.
> > You can inform the sender by replying to this e-mail or by telephone (+380 
> > 44 4906080).
> >
> >
>

Reply via email to