3 Replies Latest reply on Oct 13, 2005 4:41 PM by manik

    writing file in a cluster

    alflaro

      Hi,
      I have a simple J2EE web application developed with Struts and with POJO for business logic (no EJB). Now I have to deploy the application on a cluster of two Jboss 3.2.6 servers.
      The problem is that the application writes files on server file system, like Excel files and XML files.
      Which is the best solution on a cluster ? Do I have to insert in the database the data that now are in the files or JBoss supports in some way to replicate directories contents?
      Thanks a lot.

      Alf

        • 1. Re: writing file in a cluster
          manik

          Your problem is in no way JBoss specific.

          You have a number of options open to you:

          1. Write to a shared file system(e.g., NFS, Samba, etc)
          2. Write to a JDBC database
          3. Use JBossCache - write the contents as Objects (or maybe byte[]'s if they have no specific Java representations). JBossCache can then be configured to replicate contents across server instances. And if you wish, JBossCache can be configured with a cache loader (see manual) so that the cache can be backed up to a file system, database, etc.

          Once written to disk, are these files accessed by other systems?

          • 2. Re: writing file in a cluster
            alflaro

             

            "manik.surtani@jboss.com" wrote:
            Your problem is in no way JBoss specific.

            Once written to disk, are these files accessed by other systems?



            No the files are written and read only by the application.

            • 3. Re: writing file in a cluster
              manik

              JBossCache (perhaps backed by a JDBC cache loader) would be ideal for this then ...