…/…
TransactionService transactionService = serviceRegistry.getTransactionService();
trx = serviceRegistry.getTransactionService().getUserTransaction();
try
{
trx.begin();
if (debug) System.out.println("-transaction commence");
bp=baseParam.traitParam(req);
if (debug) System.out.println("-transaction finit");
trx.commit();
}
catch(Throwable e)
{
try
{
trx.rollback();
System.out.println("rollback sur baseParam.traitParam(req))");
System.out.println("EXCEPTION : "+e);
e.printStackTrace();
}
catch(Throwable ee)
{
System.out.println("erreur de rollback sur baseParam.traitParam(req))");
System.out.println("EXCEPTION : "+ee);
ee.printStackTrace();
}
bp=true;
}
…/…
transactionService = (TransactionService)serviceRegistry.getTransactionService();
RetryingTransactionCallback<Object> cr2 = new RetryingTransactionCallback<Object>()
{ public Object execute() throws Exception
{
if (debug) System.out.println("-la transaction commence");
boolean bp=creer(nodeRef, fileName);
if (debug) System.out.println("-la transaction finit");
return bp;
}
};
bp=(Boolean) transactionService.getRetryingTransactionHelper().doInTransaction(cr2);
if (bp)
{
System.out.println("!!!!!!!!!!!! incident sur création du document "
+ fileName + " - node="+nodeRef
+" - on continue la route\n");
}
else
{
if (debug) System.out.println("$$$$$$$$"
+ "\n$$$$$$$$ création traitée avec succès - on continue la procédure"
+ "\n$$$$$$$$\n");
}
boolean bp=false;
…
transactionService = (TransactionService)serviceRegistry.getTransactionService();
RetryingTransactionCallback<Object> cr2 = new RetryingTransactionCallback<Object>()
{ public Object execute() throws Exception
{
if (debug) System.out.println("-la transaction commence");
boolean bp=creer(nodeRef, fileName);
if (debug) System.out.println("-la transaction finit");
return bp;
}
};
bp=(Boolean) transactionService.getRetryingTransactionHelper().doInTransaction(cr2);
if (bp)
{
System.out.println("!!!!!!!!!!!! incident sur création du document "
+ fileName + " - node="+nodeRef
+" - on continue la route\n");
}
else
{
if (debug) System.out.println("$$$$$$$$"
+ "\n$$$$$$$$ création traitée avec succès - on continue la procédure"
+ "\n$$$$$$$$\n");
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.