I think you want to use the classpath element with a reference to the classes location to make sure it is available before the mbean is created.
Also, for recent versions of jboss 3 (rc2 and 3.1), the deployment of your mbean should just wait until the class is available, without the classpath element or you doing anything else.
Which jboss version are you using? If you deploy your mbean/sar after jboss has completely started does it deploy without error?
I am using 3.0.0RC2 and there is no problems if it is deployed after JBoss has completely started up. But, I cannot deploy it by copying to deploy directory and then starting up JBoss. This gives me ClassDefNoFoundException because the RMIAdaptor class is not loaded up yet. What I want to know is what kind of dependency I can set up in the jboss-service.xml in my SAR file to delay the deployment of my MBean till the server has completely started up.
Hot deployment means the server has never completely
started up. Things can be added at any time.
You can place a dependency on another MBean and your
service will start after it.
You do this by adding the tag (example)
to your *-service.xml
The closest you will get to after the initial start is
to place a dependency on the Deployment Scanner.
It does an initial scan and deploy of "static" deployments
Thank you. I've got it work.