Skip to content

Removed Requirement of transactions on ORL, added SCN code. - #32

Open
alosix wants to merge 6 commits into
linkedin:masterfrom
sovrn-archive:master
Open

Removed Requirement of transactions on ORL, added SCN code.#32
alosix wants to merge 6 commits into
linkedin:masterfrom
sovrn-archive:master

Conversation

@alosix

@alosix alosix commented Apr 28, 2014

Copy link
Copy Markdown

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.
sovrn-archive@a997948

This change has made the relay a lot easier to use:
sovrn-archive@061475e

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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants