> I have DB access objects as separate XYZOperation classes.
> They are just classes, not pages or components.
>
> How to inject Logger into them?

Why can't your XYZOperation classes be services?

> The only logical solution would be to build special service, say
> ContextService,
> which has logger, inject it into page/component where I use operations,
> and pass it to operation constructor.

I don't follow why you would need a ContextService to hold the logger.
Can't you just inject the logger into the page/component? Are you
wanting a different category?

Josh

On Mon, Jul 26, 2010 at 12:45 PM, Algirdas <[email protected]> wrote:
>
> Just to confirm that there is no other way -
>
> I have DB access objects as separate XYZOperation classes.
> They are just classes, not pages or components.
>
> How to inject Logger into them?
>
> The only logical solution would be to build special service, say
> ContextService,
> which has logger, inject it into page/component where I use operations,
> and pass it to operation constructor.
>
> Or there is a smarter way?
> --
> View this message in context: 
> http://tapestry-users.832.n2.nabble.com/Injecting-Logger-into-non-component-classes-tp5339492p5339492.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to