Re: multiple databases
"Michael Nash JGlobal.com" <[email protected]> Wed, 7 Jul 2004 18:34:50 -0400
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Organization | JGlobal |
| Message-ID | <20040707183450.4b5ce014@jglobal> |
Lou:
> I need to pull data from another database instance apart from the
> default database keel-dbpool.
I can verify this works well..
>I found where the keel-dbpool is defined
> in the persistence service implementations, but I haven't been able to
> find how a second database configuration would be defined as the default
> is in keel-build/dprop/{myapp}-deploy.properties.
You don't, at least not in the deploy properties file. The properties there are just a convenience, though, so you can define additional db's manually. What you need to do is duplicate the keel-dbpool element in config, give it a different id, and change the necessary fields. One way to do this is to configure your properties file for the first db, generate config, copy out the keel-dbpool element from system.xconf, then change the properties for the second one, generate again....
Then you define a default-persistant instance that refers to this second keel-dbpool, and that's the one that talks to the second database. If they each have the same schema there are config options for that too, let me know if you need them.
Mike
>
> Thanks in advance,
> Lou
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
--
Michael Nash
JGlobal Ltd
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com
Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com