Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout mechanism for transactions using the spring-scheduler API #61

Closed
wants to merge 3 commits into from

Conversation

fasseg
Copy link
Contributor

@fasseg fasseg commented May 16, 2013

Created a REST endpoint for transaction creation/commit/rollback at "/rest/fcr:tx" and a dummy method for object creation which can be wrapped inside a tx.

Transaction tx = txs.next().getValue();
if (tx.getExpires().getTime() <= System.currentTimeMillis()) {
logger.debug("timeout for transaction " + tx.getId());
txs.remove();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the transaction be rolled back on remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment there is no rollback() method on transactions since a rollback in the current semantics means just not to save the session.
It would certainly make sense to do a rollback though if there is anything to clean up

@fasseg fasseg closed this May 17, 2013
@fasseg
Copy link
Contributor Author

fasseg commented May 17, 2013

I added a retry method in the integration test and rollback and commit methods to the Transaction as suggested. The branch has been rebased onto master.

@fasseg fasseg reopened this May 17, 2013
@fasseg
Copy link
Contributor Author

fasseg commented May 17, 2013

grml i completey messed up the git history illl reopen this soon...

@fasseg fasseg closed this May 17, 2013
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.

None yet

2 participants