Re: Getting Current Connection from ObjectContext

2011-11-14 Thread Christian Grobmeier
John, On Mon, Nov 14, 2011 at 4:23 PM, John Huss wrote: > I have a similar function.  Would there be any interest in adding something > like this to Cayenne? it is probably best if you would explain more in detail what exactly you would like to add to cayenne on the d...@cayenne.apache.org maili

Re: Getting Current Connection from ObjectContext

2011-11-14 Thread John Huss
I have a similar function. Would there be any interest in adding something like this to Cayenne? John On Mon, Nov 14, 2011 at 6:01 AM, Andrus Adamchik wrote: > You can get DataDomain directly from ServerRuntime: > > DataDomain domain = runtime.getDataDomain(); > > even better - you can get dir

Re: Getting Current Connection from ObjectContext

2011-11-14 Thread Andrus Adamchik
You can get DataDomain directly from ServerRuntime: DataDomain domain = runtime.getDataDomain(); even better - you can get direct access to DataSource: DataSource ds = runtime.getDataSource("mynodename"); So in 3.1 with DI various stack objects are a bit closer to your application. Andrus

Getting Current Connection from ObjectContext

2011-11-14 Thread Marco Gattei
Hi everyone i'm tryng to write a translator from implementing select count(*) from a Select Query with an Expression built at runtime via ExpressionFactory. In cayenne 2.0 i was using something like: static class CountTranslator extends SelectTranslator { @Override