[osgi-dev] R4 101.6.4 Log Events

Stuart McCulloch stuart.mcculloch at jayway.net
Mon Apr 9 11:04:25 EDT 2007

On 09/04/07, Niclas Hedhman <niclas at hedhman.org> wrote:
> The specification is not clear what should happen if the EventAdmin is not
> available. Availability could be temporarily gone (e.g. update) or more
> permanently missing.
> Three choices as far as I can tell;
>  1. Discard all LogEvents.
>  2. Buffer all LogEvents and deliver when possible.
>  3. Buffer LogEvents for a while, discard the rest.
> Any takers on what is the desired functionality in an enterprise setting?

Option 2 could lead to OutOfMemory issues in the enterprise, especially
if a rogue/malfunctioning bundle is repeatedly issuing log events.

Option 1 is much safer, but one of the discarded events could be the one
that explains why the system is acting up.

How about option 3, but using a circular buffer to keep the last N events?
Typically the events you are interested in are in the last few cycles.

( this is the approach we used in the JVM for the internal "flight recorder" )

> Cheers
> --
> Niclas Hedhman, Software Developer
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev at www2.osgi.org
> http://www2.osgi.org/mailman/listinfo/osgi-dev

Cheers, Stuart

More information about the osgi-dev mailing list