I forgot to mention, programmatic ways using the JBoss API or hinds in that direction are welcome as well. I don't expect an out of the box solution.
I also would like to do that: reuse that jboss code to distribute my config files to all nodes in the cluster.
What i currently do is this: i just put them in the farm folder, and ignore the deployment-errors about them :)
then i make a softlink deploy/data.war to the farm folder; this way, my remote java client application can also download these config files (but of course also my ear file huh)
I read the file in my server code like this:
properties.load(new FileInputStream(new File(System.getProperty("jboss.server.home.dir") + "/deploy/data.war/config.properties")));
I have another workaround. I have a replicated TreeCache in my Cluster. I read the Files on one node, and put them as byte into the cache, with an aditional String what the Filename is.
The Array is instantlly replicated to the other nodes. There I take the File from the Cache and write it to the Disk again.
I have a little more Code, which checks the timestamp of all Files in the Cluster, so a new one is replicated instanttly, and some other to clean the cache after Transfer, because I don't want to keep the byte in the cache for the whole time.
But whats the benefit in using the TreeCache? I don't have to care about the network.