Huw, Peter, Folks,
I have to say I dislike the MBean suffix for JMX enabled beans. In fact
it is my principle objection to JMX (yes I know it is anal).
Would it be possible to generate them?
Consider that a simple Service could be :
interface MyThing {
/** @phoenix:manage-me */
void hello();
}
And its class could be :
class MyThingImpl implements MyImpl, Startable {
public MyThingImpl() {
}
public void start() {}
public void stop() {}
// etc.
}
Perhaps, we could use xdoclet to make :
interface MyThingMBean {
void hello();
}
And :
class MyThingImplMBean extends MyThingImpl implements MyThingMBean {
}
Thus we could hide the MBean stuff. This could either be done as part
of the regular Ant compile target, or be done at runtime by Phoenix
using BCEL.
It would also be possible to model some nice things like a state machine
for blocks. For example start() and stop() hint at a state change. BCEL
could generate
class GeneratedBlockNNNN extends MyThingImpl {
boolean blockStarted;
public void start() {
super.start();
blockStarted = true;
}
public void stop() {
super.stop();
blockStarted = false;
}
public isStarted() {
return blockStarted;
}
}
It would be useful for the BeanShell enabled kernel which can traverse
objects without constraint.
- Paul
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>