Issue Details (XML | Word | Printable)

Key: PICO-253
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: peter royal
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
PicoContainer

Per-Instance ComponentMonitor implementation

Created: 28/Aug/05 04:55 PM   Updated: 10/May/08 04:28 PM
Component/s: PicoContainer (Java)
Affects Version/s: 1.2-RC1, 2.2
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
Gems should contain a ComponentMonitor implementation that does instance-level logging (rather than class-level).

This will allow users increased granularity when using a CM.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul Hammant added a comment - 23/Oct/05 06:31 AM
Assuming Log4J/Clogging..

And is the instance the monitor instance or the component instance ?

Could it be that, some how, the CM should inticate which instance of the component via the JVM reference ID for the object, ot via a new log category?


Michael Rimov added a comment - 10/May/08 03:20 PM
Isn't this fixed for 2.2?

Paul Hammant added a comment - 10/May/08 04:28 PM
I'm not sure what Peter is after. Pete ?

CM has better methods in Pico 2.x than 1.x that's for sure.

In 2.2, aside from CM, there is a way to inject custom things like you'd see for Log4J and CommonsLogging. Refer usages of SwedeFactoryInjector in http://svn.codehaus.org/picocontainer/java/2.x/trunk/pico/container/src/test/org/picocontainer/DefaultPicoContainerTestCase.java

or did you mean something like:

pico.as(withCustomMonitor(myMonitor1)).addComponent(Foo.class,FooImpl.class);
pico.as(withCustomMonitor(myMonitor2)).addComponent(Bar.class,BarImpl.class);