Look at user-service.xml for example config
A possible implementation would be
public class MyService extends org.jboss.system.ServiceMBeanSupport
public String getMyAttribute()
public void setMyAttribute(String myAttribute)
this.myAttribute = myAttribute;
protected void startService()
log.info("Called at startup");
log.info("The attribute has already been set " + myAttribute);
protected void stopService()
log.info("Called at shutdown");
public interface MyServiceMBean extends org.jboss.system.ServiceMBean
void setMyAttribute(String myAttrbiute);
NOTE: I haven't tested this code so it probably
doesn't compile but you get the idea.
It's fairly trivial.
For more info just look at the JBoss source
or buy Juha's book.
Thanks a lot Adrian, that did help, I have it working only I haven't got my depends set up correctly. I want to make it start after all my EJBs have been deployed ....
The easiest way to do that is to put
a dependency on the URLDeployment scanner.
The hard way is to list every ejb in the depends
You will get a warning saying it is not completly
deployed (which is true - it hasn't started when
the scanner finishes starting). But you can
Do you really want to depend on every EJB?
I suspect what you really want to know is
what ejbs are deployed.