views:

426

answers:

2

Hi all

I'm working on a project which is just about to start, and since I was busy with another one my colleagues went ahead and started working on the specs to the new one. When I came in, they had just chosen to do persistence with plain SQL (promptly accepted my suggestion to add Hibernate, though) but insisted in that data replication should be performed using a tool called Symmetric DS, of which I had never heard about.

I am concerned because, as far as I know, having a JBoss server (current plans are to use Tomcat only) with EJB3 handles all of the transaction/replication hassle, and should spare us from a lot of headaches.

How do you guys see this Symmetric DS? (note that I have nothing against it whatsoever, it's just that I know JBoss to be around for a long while and it has a quite respectable reputation)

How would you compare the two solutions?

Thanks!

EDIT: By the way, how does SymmetricDS deal with duplicate primary keys? I mean, if I add a row in database A and another in database B, both will probably be added with the same primary key, right? How does SymmetricDS handle that so as to avoid conflict? This forum discussion seemed at first to address some of that, but it doesn't quite answer my question.

+2  A: 

I think EJB and SymmetricDS are trying to solve different problems. EJB is a framework that provides (among many things) persistence to the database. SymmetricDS is an application that captures changes made to a database and applies them to another database in an asynchronous manner. In fact, the two work together, enabling you to easily persist data from a Java Bean to the database and have it replicated to other remote databases.

You can deploy SymmetricDS to JBoss or Tomcat (there are standalone and embedded options as well), and all it cares about is the database. Under the covers, it is using the Spring framework to access the database. It installs database triggers to capture changes, and it applies changes to the target database exactly the same way. So, if rows A and B were committed together on the source database, then they commit together on the target.

I hope that helps to clarify the two technologies. There is an active community on SourceForge for SymmetricDS that is more than happy to answer questions and give examples of successful deployments:

http://sourceforge.net/projects/symmetricds

Good luck on your project!

Eric

A: 

Hi..Can you please tell me the detailed steps of deploying SymmetricDS to Tomcat?

Thanks

asdf2341
Sorry, I ended up not using SymmetricDS after accepting the answer since a teammember took to himself to reimplement the whole thing for our needs.
schonarth