3 Replies Latest reply on Jul 16, 2008 11:17 AM by peterj

    web service configuration

    jahhaj

      I've written a web service using JAX-WS. The service needs to load data from a file when it starts. I want to be able to specify when I deploy the web service what file to load the data from.

      Seems like a simple enough task but I've not been able to figure it out. What's the best way to do this?

        • 1. Re: web service configuration
          peterj

          Here's one possibility. Have the web service open a properties file and get the info about the file to load from there. You can either place the properties file in the web service archive, in which case you would load it as any other resource (and you would probably want to deploy using an exploded archive), or you could place the properties file in the server/xxx/conf directory and use the jboss.server.config.url property to access it.

          • 2. Re: web service configuration
            jahhaj

            Thanks Peter,

            I don't want to put a property file in the archive (not accessible enough), but a file in the conf directory would work. I thought of something like that but was looking at the data directory. I suppose the the conf directory is the 'official' place to put such things?

            • 3. Re: web service configuration
              peterj

              Either conf or data would work.