linkedin/databus — pull request #32 by alosix (2014-04-28 18:36:57+00:00)
Title: Removed Requirement of transactions on ORL, added SCN code.

There are 2 specific commits here that others might find useful. If it would help for me to move them over to another branch for the pull, let me know.

This removes the need to use transactions in mysql. Transactions still work, but individual updates will as well. This change also removes an NPE that happens when an un-watched table happens to have an update.
https://github.com/sovrn/databus/commit/a997948c651f85a496fb3f52e6ca608ec8ce6f52

This change has made the relay a lot easier to use:
https://github.com/sovrn/databus/commit/061475e59c9f612347cd42fe979d83ed94b72ee5

We only really need to watch for changes currently, so there's not much of a need to use the file based storage. I found that in-memory didn't work because it would always default the listener to bin file 1 at offset 4. For our longer running servers those files were purged quite some time ago. This change should work for both file and in-memory. If by the end of the method the scn is still 0 or -1, it connects to the DB to look for the current file and position, then turns that into an SCN. I used the raw JDBC code here because I didn't see any connection managers (ie c3p0 or dbcp) in the dependencies. Seemed silly to add one just for this.

This also removes the need to calculate the current SCN by hand when running the example code.