07-17-2012 11:39 AM
17 Jul 2012 11:21:13,483 DEBUG http-8080-7 [copyEFRAttrs] Entering getDocSequence for: 56401908-e10e-460d-ac04-588eb9fc9b69
17 Jul 2012 11:21:13,498 INFO http-8080-23 [copyEFRAttrs] substObjName: ENTERING…
17 Jul 2012 11:21:13,498 DEBUG http-8080-23 [copyEFRAttrs] Entering getDocSequence for: 56401908-e10e-460d-ac04-588eb9fc9b69
17 Jul 2012 11:21:13,498 DEBUG http-8080-5 [copyEFRAttrs] Saved attribute successfully for parent 56401908-e10e-460d-ac04-588eb9fc9b69 = 10
17 Jul 2012 11:21:13,498 DEBUG http-8080-5 [copyEFRAttrs] Leaving getDocSequence
17 Jul 2012 11:21:13,498 DEBUG http-8080-5 [copyEFRAttrs] Sequence set to: 10
17 Jul 2012 11:21:13,498 DEBUG http-8080-7 [copyEFRAttrs] Got value from attribute: 9
If you look at the code in my previous thread (about behaviour threading…will try to link it) it will help explain the logged statements.07-17-2012 07:33 PM
07-18-2012 04:22 AM
07-18-2012 05:03 AM
07-18-2012 08:38 AM
By default, each invocation of a Service method is wrapped in its own transaction.With the accompanying example, I took this to mean that a "Service method" was a call such as attributeService.setAttribute(). If that is so, then the attribute should be committed immediately, and any future call to .getAttribute() for that particular attribute should return the updated value, regardless of thread or client.
07-18-2012 11:18 AM
If the call is always going back to the DB, then it is almost-certainly always to be correct.
If Alfresco is implementing a cache in front of the DB and this is causing stale data to be returned, then this is not a developer-problem, I'm wondering if it's a bug.
By default, each invocation of a Service method is wrapped in its own transaction.
07-18-2012 11:39 AM
07-18-2012 12:58 PM
07-18-2012 01:14 PM
07-18-2012 02:14 PM
// your custom behaviour code
// nested new write transaction
String uuid = transactionService.getRetryingTransactionHandler().doInTransaction(new RetryingTransactionCallback<String>(){
public String execute() {
// do something, e.g. get/set attribute
String uuid = attributeService.get….;
return uuid;
}
}, false, true);
// continue your custom code, using uuid as an up-to-date value
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.