I have written a Jboss4 MBean which relies on other JNDI resource named XAOracleDS and defined in an xml datasource file (*-ds.xml). But when I restart my JBoss instance, I have a
javax.naming.NameNotFoundException: XAOracleDS not bound
due to the implementation of my service. I tried to fix this by updating my jboss-service.xml file adding a dependency to the Jboss naming service
...
<depends>jboss:service=Naming</depends>
...
, but it didn't work. Here is my jboss-service.xml
<server>
<classpath codebase="lib" archives="scheduler-plugin.jar" />
<mbean code="org.jboss.varia.scheduler.Scheduler" name="DefaultDomain:service=MigrationScheduler">
<attribute name="StartAtStartup">true</attribute>
<attribute name="SchedulableClass">MyScheduler</attribute>
<attribute name="InitialStartDate">NOW</attribute>
<attribute name="InitialRepetitions">1</attribute>
<attribute name="SchedulePeriod">1000</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
Does anyone have an idea of what's wrong?