Implement ejbCreate() and ejbRemove() in your session bean, and publish the respective event there. Your MBean is suppose to listen to the message (onMessage()).
this is just something on paper. I am about to implement it today.
thanks for your answer.
I think I read somewhere on this forum that this could be done automatically with JBoss3.0, putting in relation a MBean with an EJB. Anybody confirm it?