cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: CommonsJdbcEventLogger does not print the queries
Date Tue, 24 Jan 2012 11:26:45 GMT
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) )


>
> 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.
>
>



-- 
http://www.grobmeier.de
https://www.timeandbill.de

Mime
View raw message