Rename your jar-file to *.sar and put your mbean declaration in META-INF/jboss-service.xml.
So I have used the example xml file of the documentation and adapt it to my needs.
But I still got some problems with some declarations (Here is my jboss-service.xml) :
I got these messages when I deploy :
No ClassLoaders found for: org.jboss.util.AirimiScheduler
No ClassLoaders found for: org.jboss.util.Scheduler
jboss:type=example,name=schedulable is not registered.
As my AirimiScheduler class is part of Timer package in Timer.sar, I have tried codebase=org.jboss.util.Timer.AirimiScheduler but it does not work.
I don't understand why there is no SchedulableExample class in org.jboss.util whereas the codebase is org.jboss.util.SchedulableExample...
I am looking for an explanation or an example for a jboss-service.xml file.
I have tried different examples from different documentation and each time there is no deploy descriptor... Why ???
Do I need to change the configuration of jboss to load my own service ???
Answer me please...
This is the XML I use in my jboss-service.xml. I found a couple of things that worked but the easiest thing I found was to package my classes in a jar file and deploy that, then create a sar file with just META-INF/jboss-service.xml in it... it seems to find things reasonably well, that way. Having a bit of weirdness when the app is redeployed, though.
<?xml version="1.0" encoding="UTF-8"?>