cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: cayenne.adapter.[domain].[node] property
Date Mon, 17 Dec 2012 06:45:11 GMT

On Dec 16, 2012, at 1:48 AM, John Huss <> wrote:
>>> My problem with AutoAdapter is that is causes a connection to be opened
>>> immediately whereas a hard coded adapter does not.  Does it have to do
>>> that?
>> It shouldn't. Could you provide a stack trace of the call that starts the
>> connection? Maybe there's something preceding AutoAdapter initialization,
>> like connection pool creation?
> Ok, deeper down I was calling
>     dataNode.getAdapter().getExtendedTypes().registerType(...)
> which was forcing the adapter to be loaded.  This appears not to happen if
> I use the DI binding instead.  So problem solved!

Cool. Yeah, a notion of ownership of certain objects by certain other objects (adapter owns
ExtendedType, adapter owns PkGenerator, etc) is being obsoleted by DI, but is still reflected
in the API. We'll be gradually cleaning this up.


View raw message