As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/ / Use to wrap TransactionWork service calls in a user transactionTransactionService transactionService serviceRegistry.getTransactionService = ();RetryingTransactionCallback <Object> exampleWork RetryingTransactionCallback <Object> = new (){public Object execute () throws Exception{doExample (serviceRegistry);return null;}};transactionService.getRetryingTransactionHelper (). doInTransaction (exampleWork);
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);