08-08-2011 03:54 AM
08-10-2011 12:59 PM
private class AccessTransactionListener extends TransactionListenerAdapter {
@SuppressWarnings("synthetic-access")
@Override
public void afterCommit() {
final Map<NodeRef, NodeChange> changedNodes = TransactionalResourceHelper
.getMap(this);
//new transaction is needed - it looks like recordAuditValues executions depends on the db
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>() {
@Override
public Void execute() throws Throwable {
for (Map.Entry<NodeRef, NodeChange> entry : changedNodes
.entrySet()) {
NodeChange nodeChange = entry.getValue();
if (!nodeChange.isTemporaryNode()) {
Map<String, Serializable> auditMap = nodeChange
.getAuditData(false);
recordAuditValues(TRANSACTION, auditMap);
}
}
return null;
}
};
transactionService.getRetryingTransactionHelper().doInTransaction(
callback, false, true);
}
}
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.