1 Reply Latest reply on Aug 30, 2006 9:05 PM by weston.price

    How do I make a file available to a startup task - use a Res

    bobsmith

      I have a WAR file containing an XML file and I have a singleton class that, on first access, opens the xml file and configures itself from it.

      org.xml.sax.InputSource is = new InputSource("http://localhost:8080/mywar/myfile.xml");
      


      That was fine until I needed to perform a startup task that relied on information in the XML file. The problem being that mywar.war has not been deployed at the point the startup service executes. It seems that I cannot put a dependency in the startup service on mywar.war, I can only specify dependencies on other services, not on wars (I am using JBoss 3.2.6, so Barrier Control is not an option).

      I though that perhaps I should write a ResourceAdapter that would provide access to my XML file, but this seems overkill and I'm not convinced it is the way to go.

      Is there anyone out thee who has experienced the same dilemma, and could perhaps advise me on the way to address my problem?
      - write my own ResourceAdapter implementation?
      - use a freely available ResourceAdapter implementation?
      - or perhaps there is a really obvious way that I am missing of making my XML file available to a startup task?

      Many thanks for any help.
      Bob