0 Replies Latest reply on Mar 27, 2002 12:00 PM by bartman

    Duplicating transactions across multiple JBoss application s

    bartman

      Hi All,


      This may fall into the category of "distributed transaction" but I don't really know because I've always thought of a distributed transaction as involving heterogeneous writes to multiple databases. What I want to do here is somewhat different however.

      I've been using CMP for all my entity beans up until now, and don't really want to change (because I'm the laziest person on the planet, but also because we haven't settled on a particular database platform yet). We're developing a system that will use multiple "community" JBoss application servers and a single central server. When changes are committed to community servers then SOME of these changes will need to be reflected identically in the central server. The way it works is that communities are self-contained, self-managing entities but need outside access for certain services. If a community customer wants to subscribe to one of these services then all their data needs to be added to the central database (whose structure is identical to the community database and which uses exactly the same EJBs).

      Likewise if changes are made to data held on the central server then those changes also need to be reflected exactly in the corresponding community server. And just to make things a little more exciting the (physical) connections between the central and community servers are "unreliable" (actually we hope they're NOT that unreliable... but there are situations where they might be) yet the data must still be consistent across servers. Now actually we could just cheat by not letting changes be made that will affect both servers when the connection is down -- because the transaction will fail if both commits don't happen I presume -- but I might have to sell that to my boss (because otherwise we've got to worry about ensuring consistency when the connection is restored, which I'm not sure is possible (?)).

      So can I do this? And if I can, can I do it with CMP? My target platform is JBoss 3 since this supports the EJB 2.0 specification, which is what I've been working with using J2SDKEE 1.3 RI from Sun.

      Ultimately I can see us needing to mirror identical data across multiple servers. I know that DBMSs like Oracle allow you to do this but we really want to go open source for reasons of cost, and it would be nice to be able to use hsqldb or MySQL or whatever if the feature is in the J2EE platform itself.

      Any thoughts, suggestions, relevant URLs gratefully accepted.

      Thanks,
      Bart Read