0

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?

1tox
  • 327
  • 1
  • 4
  • 14

1 Answers1

0

I ran into a similar issue a while back and not 100% sure whether it applies to you. Found that the files are deployed alphabetically. So try renaming your *-ds.xml files with say abc-ds.xml and see if it helps.

souser
  • 5,868
  • 5
  • 35
  • 50
  • Thanks for the tip. I tried this solution by prefixing my *-ds.xml with aaa, but I had the same error. – 1tox Mar 07 '12 at 08:58