> Hi,
> i want to read dasource info at runtime. I see that "DatasourceInfo"
> class have all the property that i need. How i can obtain an instance of
> this class?
> From a "Configuration" oject?
> From a "DataDomain" object?
>
> Thank's
> Davide
Hi Davide,
You are on the right track, but go even lower down the stack. You need to
obtain DataNod, then call getDataSource, casting the result to
org.objectstyle.cayenne.conn.PoolManager. Pool manager has al the info you
need.
Of course the cast to PoolManager is valid only if you configured
DriverDataSourceFactory for the DataNode in the Modeler. If it is a
container-provided DataSource (i.e. obtained via JNDI), this won't work.
Andrus
This archive was generated by hypermail 2.0.0 : Thu Apr 14 2005 - 09:02:44 EDT