james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Fondermann" <bernd.fonderm...@googlemail.com>
Subject Re: ProcessorManagement and management interface (Was: svn commit: r468903)
Date Wed, 15 Nov 2006 15:14:42 GMT
On 11/15/06, Stefano Bagnara <apache@bago.org> wrote:
> Bernd, or anyone else with an answer for this,
> I see that the ProcessorManagement have direct dependencies on
> javax.management classes: I'm not against this, but why we need this
> dependency here and not for the other management tools?

In http://mail-archives.apache.org/mod_mbox/james-server-dev/200610.mbox/%3c88f6e29a0610260428u3bb2a2alc0a92e3a83e247d1@mail.gmail.com%3e
I pinged the dev-list about that.

Some more words are obviously needed. :-)

Before JAMES-635, our Management MBeans were declared at build time
and Avalon took the tasks of registering them with the MBeansServer.
According to the JMX spec, for this to work, only java classes named
"*MBean" are needed, no dependencies on any of the JMX interfaces are
needed in our code.
This is all still in place and unchanged.

Now, when we want to have one Mailet MBean per Mailet instance, we
have to register them ourselves at run-time (cause the exact number
and structure is not known at build-time). This requires generating
ObjectNames and accessing the MBeanServer in ProcessorManagement. This
creates a dependency on javax.managment.

For me this is no big deal, because it is becoming a standard API
anyway and makes it possible to use more features from the JMX tool

The next step is to add statistics. A simple getter
   int getProcessedMailsPerSecond()
externalized as a JMX method is allowing for JConsole to draw nice
graphs with no further coding.

The next next step is to add notifications. You could hook up to a
processor analysing the mail processing process /live/. (No need to
restart in debug mode, possibility to filter only events you need to


> Stefano
> berndf@apache.org wrote:
> > Author: berndf
> > Date: Sun Oct 29 05:43:44 2006
> > New Revision: 468903
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=468903
> > Log:
> > add processor, mailet and matcher management (JAMES-635)
> > [...]
> > +import javax.management.MBeanServer;
> > +import javax.management.MBeanServerFactory;
> > +import javax.management.MalformedObjectNameException;
> > +import javax.management.ObjectName;
> > +import java.util.ArrayList;
> > +import java.util.Iterator;
> > +import java.util.List;
> > +
> > +/**
> > + * manage processors, mailets and matchers
> > + */
> > +public class ProcessorManagement implements Serviceable, ProcessorManagementService,
ProcessorManagementMBean {
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message