To get the Log instance I just added a static method
to the Log class called:
Log.createLog( Object pSource );
which returns the normal, old log (DefaultLog) if it
could load the class or an instance of Log.NoLog.
The reason for this is that the DefaultLog uses the
Logger class which needs to have a Logging instance
registered at the JMX MBeanServer.
On one side I do not want to loose the ServiceMBean-
Support class but on the other hand I do not want
to bother users outside of jBoss with the Logger
class and that they have to load a logging instance.
Ok?
Mad Andy
-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 06, 2000 12:56 AM
To: jBoss Developer
Subject: Re: [jBoss-Dev] Changes in ServiceMBeanSupport
Hi!
"Schaefer, Andreas" wrote:
> Now "Log" is an abstract class which is then implemented
> by either DefaultLog (was Log before) and Log.NoLog which
> just does nothing.
This is only useful if you also introduce a log factory. Otherwise there
is no gain as the services need to explicitly know what log
implementation they use.
> The reason behind this is that I would like to some of our
> service out of jBoss to dicuss it and also to let other
> Open Source project use them (when they want). I think we
> will benefit when part of our code is used outside of jBoss.
Hm...
> When there is no objections then I will bring my stuff back
> in tomorrow.
Well, answer the factory question and maybe.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]