You need to have multiple DataNodes in your model -- one for each
database. You also need multiple DataMaps. Each DataMap should contain
the schema for one of the databases. Then in the modeler, under the
DataMap Configuration section, select the DataNode to associate the map
to. Cayenne will then use the right database connection for the objects
you are working upon.
http://www.objectstyle.org/confluence/display/CAYDOC/Create+DataNode
http://www.objectstyle.org/confluence/display/CAYDOC/Setting+DataMap+Def
aults
I'm not familiar with c3p0. I just did a Google search and found a
small blurb and, given my complete ignorance of what you are using it
for, I'm not certain you need it. I'm currently using Cayenne in a
Tomcat/Tapestry application and I'm not using JNDI at all. I let
Cayenne pool all of my connections (I have 5 active/simultaneous
databases) with the default manager and it works fine.
/dev/mrg
-----Original Message-----
From: news [mailto:new..ea.gmane.org] On Behalf Of james
Sent: Tuesday, June 06, 2006 1:54 PM
To: cayenne-use..ncubator.apache.org
Subject: Re: Multiple Databases and Setting Connection
Gentry, Michael (Contractor <michael_gentry <at> fanniemae.com> writes:
>
> 1) Yes.
> 2) I'm not certain. Is their any reason you can't use the current
pool
> manager?
>
> /dev/mrg
>
Hi Michael,
1) Any reference where I can read up?
2) I am usng c3p0 without jndi, so that there isn't a need to configure
tomcat.
Can I use Cayenne with c3p0, without jndi?
Regards,
James
This archive was generated by hypermail 2.0.0 : Tue Jun 06 2006 - 14:16:17 EDT