On 7/18/06, Aaron Mulder <[EMAIL PROTECTED]> wrote:
On 7/17/06, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
> How about we just implement toString() on our Runnables, and our
> thread pool can track that way?  I really want to uncouple  this code.

The problem is that if you forget that, or use one bit of code outside
our control (e.g. Tomcat, Jetty, etc.) you instantly get really nasty
entries on the screen that shows the statistics.  At least now we can
tell which ones aren't implemented and just bundle those into an
"unknown" category.  I'm open to alternatives, but I don't like the
toString one so much.

How about having some optional interface such as Nameable...

public interface Nameable {
   /**
    * Gets a human-readable name identifying this object.
    */
   String getName();

   /**
    * Gets the unique name of this object.  The object name must
comply with
    * the ObjectName specification in the JMX specification.
    *
    * @return the unique name of this object within the server
    */
   String getObjectName();}
}

Then any console related code could do an instanceof to see if the
implementation has carefully created a nice visual representation.
(Folks could use AOP to inject implementations too). This interface
can then be used across many different kinds of objects for consoles.

Then code like the work manager can stick to regular interfaces like
Executor, Runnable etc? No biggie, just a thought.


In any case, you can definitely remove GeronimoExecutor.

+1
--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to