05-26-2014 10:24 AM
05-29-2014 10:01 AM
public NodeRef transaccionCreateNode(final NodeRef parent, final Map<QName, Serializable> properties, final String name, final QName tipus) throws Exception {
NodeRef nodeRef = null;
try {
RetryingTransactionCallback<Object> txnWork = new RetryingTransactionCallback<Object>()
{
public Object execute() throws Exception
{
NodeRef nodeRef = createNode(parent, properties, name, QName.createQName(Constants.modelClassificacioNS, Constants.tipusNodeClassificacio));
return nodeRef;
}
};
TransactionService transactionService = serviceRegistry.getTransactionService();
nodeRef = (NodeRef)transactionService.getRetryingTransactionHelper().doInTransaction(txnWork, true);
} catch(Throwable e) {
logger.error("transaccionCreateNode - ERROR: " + e);
throw new Exception(e);
}
return nodeRef;
}
public NodeRef transaccionCreateNode(final NodeRef parent, final Map<QName, Serializable> properties, final String name, final QName tipus) throws Exception {
NodeRef nodeRef = null;
UserTransaction trx = serviceRegistry.getTransactionService().getUserTransaction();
try {
trx.begin();
nodeRef = this.createNode(parent, properties, name QName.createQName(Constants.modelClassificacioNS, Constants.tipusNodeClassificacio));
trx.commit();
} catch(Throwable e) {
trx.rollback();
logger.error("transaccionCreateNode - ERROR: " + e);
throw new Exception(e);
}
return nodeRef;
}
05-30-2014 04:48 AM
// We found properties associated with a different node ID and version
invalidateNodeCaches(nodeId);
throw new DataIntegrityViolationException(
"Detected stale node entry: " + nodeVersionKey +
" (now " + propsRawByNodeVersionKey.keySet() + ")");
06-04-2014 01:18 PM
11-03-2014 05:04 AM
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.