08-10-2012 05:13 AM
/ / Use to wrap TransactionWork service calls in a user transaction
TransactionService transactionService serviceRegistry.getTransactionService = ();
RetryingTransactionCallback <Object> exampleWork RetryingTransactionCallback <Object> = new ()
{
public Object execute () throws Exception
{
doExample (serviceRegistry);
return null;
}
};
transactionService.getRetryingTransactionHelper (). doInTransaction (exampleWork);
08-15-2012 01:15 PM
RetryingTransactionCallback<Object> exampleWork = new RetryingTransactionCallback<Object>()
{
public Object execute() throws Exception
{
doExample(serviceRegistry);
return null;
}
};
transactionService.getRetryingTransactionHelper().doInTransaction(exampleWork);
class ExampleWork implements RetryingTransactionCallback<Object> {
private ServiceRegistry serviceRegistry;
public ExampleWork(ServiceRegistry serviceRegistry) {
this.serviceRegistry = serviceRegistry;
}
// doExample method should be added here
public Object execute() throws Exception
{
doExample(serviceRegistry);
return null;
}
}
…
RetryingTransactionCallback<Object> exampleWork = new ExampleWork(serviceRegistry);
transactionService.getRetryingTransactionHelper().doInTransaction(exampleWork);
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.