cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wernke zur Borg <w.zurb...@rheagroup.com>
Subject Re: CommonsJdbcEventLogger does not print the queries
Date Tue, 24 Jan 2012 11:38:25 GMT
On 2012-01-24 12:26, Christian Grobmeier wrote:
> Hello Wernke (sorry for misspelling your name in my first response),
>
> On Tue, Jan 24, 2012 at 12:23 PM, Wernke zur Borg
> <w.zurborg@rheagroup.com>  wrote:
>> Class JdbcAdapter has this:
>>
>> @Inject
>>      protected JdbcEventLogger logger;
> I have not done this before, but in most cases of DI you need to have
> appropriate setters/getters to make the injection work. Doi you have
> them? (f.e. getLogger, setLogger (JdbcEventLogger logger) )
>

Note that it does work with the original JdbcAdapter even though it does 
not have a setter for the logger.

Only when I inject my own subclass the logger injection does not take place.

>> My JdbcAdapter subclass apparently does not get a logger injected -
>> getLogger() returns null.
>>
>> Since I am not yet familiar with DI, I do not know how to get the logger
>> injected.
>>
>> I do have this, although it might not be needed (it does not make any
>> difference):
>>
>> Module m = new Module() {
>>     public void configure(Binder binder) {
>>        binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
>>        ...
>>
>> Thanks, Wernke
>>
>>
>>
>> This email (including any attachments) may contain confidential and/or privileged
>> information or information otherwise protected from disclosure.  If you are not the
>> intended recipient, please notify the sender immediately, do not copy this message
>> or any attachments and do not use it or any purpose or disclose its content to any
>> person, but delete this message and any attachments from your system.
>> RHEA System S.A. (RHEA) disclaims any and all liability if this email transmission
>> was virus corrupted, altered or falsified.
>>
>> If a Non Disclosure Agreement (NDA) exists between RHEA and the receiving
>> organization, then all contents shall be considered proprietary and covered under
>> the NDA.
>>
>>
>
>


-- 
/Wernke zur Borg
*Rhea System S.A.*
Robert-Bosch-Str. 7
64293 Darmstadt / Germany
Tel. +49-6151-8709591/


This email (including any attachments) may contain confidential and/or privileged
information or information otherwise protected from disclosure.  If you are not the
intended recipient, please notify the sender immediately, do not copy this message
or any attachments and do not use it or any purpose or disclose its content to any
person, but delete this message and any attachments from your system.
RHEA System S.A. (RHEA) disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.

If a Non Disclosure Agreement (NDA) exists between RHEA and the receiving
organization, then all contents shall be considered proprietary and covered under
the NDA.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message