5 Replies Latest reply on Jul 29, 2006 1:42 PM by Scott Marlow

    Data file synchronization

    Andy Andy Newbie

      Dear all,
      I am using JBoss 4.0.3sp1 .
      I have some applications that need to read some xml files in the server. In two nodes, there have 2 set of xml files. I want that if I change the file in 1 node, the other node can also change its local copy. I know I can put in "farm" directory, but there are 2 problems. First is only the file in "farm" would be synchronize, the file in the sub-directory of "farm" would not be updated. Second, there are periodically logging message that indicate the xml files do not have deployer. (So I think it is not the correct approach to put the xml files in "farm" directory)

      I wonder how can I sybchronize my xml files. Can anyone help?
      Thank you!

        • 1. Re: Data file synchronization
          Brian Stansberry Master

          Your XML file is a form of state; the tool we generally recommend for keeping state in sync between servers is JBoss Cache.

          Using the farm service is definitely not the way to go; it's not meant to be a file distribution mechanism.

          • 3. Re: Data file synchronization
            Michael Daleiden Newbie

            If the farm service is not meant for file distribution, is there some other mechanism in JBoss that can be used for this type of service? The reason I ask is that we have a situation that is similar to what andystoy described, where we have some common configuration files that we need to automatically distribute to all servers in the cluster. The main file we want to synchronize between servers is our log4j.xml file, so that all servers have the same logging configuration. All of our other software components are deployable units and we are using farming to do distributed deployment of these components, so that we do not have to manually distribute to each node in the cluster. We would like to have some mechanism to distribute the configuration files (e.g., log4j.xml) from a "master" node to all of the other nodes in the cluster, so that we do not have to copy the files to each server manually (which will not be practical, once we go to a geographically separated environment later this year).

            • 4. Re: Data file synchronization
              Ben Wang Master

              Looks like these are configuration files that you are interested. Can you shared file system to do the job?

              • 5. Re: Data file synchronization
                Scott Marlow Master

                As Ben suggested, others like to use a shared file system (JBoss can be configured to deploy from a shared folder).

                Regarding the "no deployer available" deployment message that you are receiving, it is true as we expect to only share applications via farm deployment.

                After farm deployment, is the xml configuration file accessible to your application on each of the cluster nodes?