You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Michael Melhem <mi...@fztig938.bank.dresdner.net> on 2002/09/06 15:44:30 UTC

[Q] org.apache.avalon.excalibur.monitor.Resource

Hi,

Is there a reason org.apache.avalon.excalibur.monitor.Resource does not
extend from AbstractLogEnabled??

If not, then I will make that small change, because I think that would
be rather useful.

Regards,
Michael Melhem


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] org.apache.avalon.excalibur.monitor.Resource

Posted by Michael Melhem <mi...@fztig938.bank.dresdner.net>.
On Fri, Sep 06, 2002 at 09:50:05AM -0400, Berin Loritsch wrote:
> > From: Michael Melhem [mailto:michaelm@fztig938.bank.dresdner.net] 
> > 
> > Hi,
> > 
> > Is there a reason 
> > org.apache.avalon.excalibur.monitor.Resource does not extend 
> > from AbstractLogEnabled??
> 
> Yep.  It's just one more thing the user has to remember.  The
> Resource is a local object designed to represent a resource--with
> the proper methods to obtain it.  Therefore, I suggest we allow
> for an alternate constructor:
> 
> Resource( org.apache.avalon.logger.Logger );
> 
> If supplied, we will use it--otherwise we default to the
> NullLogger.
> 
> 
> > If not, then I will make that small change, because I think 
> > that would be rather useful.
> 
> 
> I would prefer not to make that happen on an *Object*, as opposed
> to a component.  If the user forgets to set the Logger, then we
> would get NullPointerExceptions where we didn't before.  It is
> important we don't break things like that.

Yup. That makes sense. I will implement an alternate constructor.

Regards,
Michael Melhem
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Q] org.apache.avalon.excalibur.monitor.Resource

Posted by Peter Donald <pe...@apache.org>.
On Fri, 6 Sep 2002 23:50, Berin Loritsch wrote:
> > From: Michael Melhem [mailto:michaelm@fztig938.bank.dresdner.net]
> >
> > Hi,
> >
> > Is there a reason
> > org.apache.avalon.excalibur.monitor.Resource does not extend
> > from AbstractLogEnabled??
>
> Yep.  It's just one more thing the user has to remember.  The
> Resource is a local object designed to represent a resource--with
> the proper methods to obtain it.  Therefore, I suggest we allow
> for an alternate constructor:
>
> Resource( org.apache.avalon.logger.Logger );
>
> If supplied, we will use it--otherwise we default to the
> NullLogger.

I would prefer that you had an alternative implementation altogether that was 
Avalon aware. Maybe something like monitor.AvalonAwareResource ?

If memory serves me well the only things that linked against Avalon/Framework 
was the monitor implementations.

One thing I have been meaning to do for a while is decouple that package from 
Framework so that you have something like

monitor.impl.ActiveMonitor
monitor.impl.PassiveMonitor

monitor.ActiveMonitor extends monitor.impl.ActiveMonitor (and adds avalon 
stuff)
monitor.PassiveMonitor extends monitor.impl.PassiveMonitor (and adds avalon 
stuff)

That way the package is lower coupling and should be easier to work with in 
future. Especially in situations (like in phoenix and myrmidon) where the 
specific configuration mechanism is innapropraite and easier to use them as 
just beans.

Thoughts?

-- 
Cheers,

Peter Donald
-----------------------------------------------------------------------
|  I thought there was a knob on the TV to turn up the intelligence.  |
|      There's a knob called "brightness", but it doesn't work.       |
----------------------------------------------------------------------- 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [Q] org.apache.avalon.excalibur.monitor.Resource

Posted by Berin Loritsch <bl...@apache.org>.
> From: Michael Melhem [mailto:michaelm@fztig938.bank.dresdner.net] 
> 
> Hi,
> 
> Is there a reason 
> org.apache.avalon.excalibur.monitor.Resource does not extend 
> from AbstractLogEnabled??

Yep.  It's just one more thing the user has to remember.  The
Resource is a local object designed to represent a resource--with
the proper methods to obtain it.  Therefore, I suggest we allow
for an alternate constructor:

Resource( org.apache.avalon.logger.Logger );

If supplied, we will use it--otherwise we default to the
NullLogger.


> If not, then I will make that small change, because I think 
> that would be rather useful.


I would prefer not to make that happen on an *Object*, as opposed
to a component.  If the user forgets to set the Logger, then we
would get NullPointerExceptions where we didn't before.  It is
important we don't break things like that.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>