cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Which database am I connected to?
Date Fri, 17 Dec 2010 14:15:02 GMT
I guess if we do something like that, we won't go below DataSource... I am still thinking how
to expose DataSource via DI.

Andrus


On Dec 17, 2010, at 4:02 PM, Borut BolĨina wrote:
> Hi,
> 
> sometimes when creating administrative web applications you want to show to
> which database the application is connected to. For a simple case one can
> do:
> 
> String connectionInfo  = ((DataContext)
> dc).getParentDataDomain().getNode("MyNode").getDataSource().getConnection().toString();
> 
> and then parse out the info needed to display.
> 
> Would you consider forming a simple API for getting connection info out of
> Cayenne context in future versions? Or am I just lazy? :-)
> 
> -Borut


Mime
View raw message