private void TaskManagerInitialisation() { final TaskManager taskManager = TaskManager.getManager() ; taskManager.setMinimumWorkerCount(taskManagerMinWorkerCount) ; taskManager.setMaximumWorkerCount(taskManagerMaxWorkerCount) ; }
/** * Execute the tasks. */ public void run() { while(true) { final Task task = taskManager.getTask() ; if (task == null) { break ; } try { task.executeTask() ; } catch (final Throwable th) { WSCLogger.i18NLogger.error_services_framework_task_TaskWorker_run_1(th); } } } }
/** * Create and register a task worker. */ private void createWorker() { final TaskWorker taskWorker = new TaskWorker(this) ; final String name ; synchronized(workerPool) { name = "TaskWorker-" + ++taskCount ; } final Thread thread = new Thread(taskWorker, name) ; thread.setDaemon(true) ; synchronized(workerPool) { workerPool.add(thread) ; } thread.start() ; } }
/** * * @param parameters */ @WebMethod(operationName = "CloseOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Close") @Oneway public void closeOperation( @WebParam(name = "Close", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); final NotificationType close = parameters; final MAP inboundMap = AddressingHelper.inboundMap(ctx); final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx); TaskManager.getManager().queueTask(new Task() { public void executeTask() { TerminationCoordinatorProcessor.getProcessor().close(close, inboundMap, arjunaContext) ; } }) ; }
public void stop() throws Exception { XTSLogger.logger.info("JBossTS XTS Transaction Service - stopping"); TaskManager.getManager().shutdown() ; // com.arjuna.services.framework.admin.TaskManagerInitialisation // shutdown the activity service reaper ActivityReaper.shutdown(); // execute shutdown for all registered initialisations Iterator<XTSInitialisation> iterator = xtsInitialisations.iterator(); while (iterator.hasNext()) { XTSInitialisation xtsInitialisation = iterator.next(); xtsInitialisation.shutdown(); } xtsInitialisations.clear(); }
/** * Execute the tasks. */ public void run() { while(true) { final Task task = taskManager.getTask() ; if (task == null) { break ; } try { task.executeTask() ; } catch (final Throwable th) { WSCLogger.i18NLogger.error_services_framework_task_TaskWorker_run_1(th); } } } }
/** * * @param parameters */ @WebMethod(operationName = "CompletedOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Completed") @Oneway public void completedOperation( @WebParam(name = "Completed", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); final NotificationType completed = parameters; final MAP inboundMap = AddressingHelper.inboundMap(ctx); final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx); TaskManager.getManager().queueTask(new Task() { public void executeTask() { TerminationParticipantProcessor.getProcessor().handleCompleted(completed, inboundMap, arjunaContext); } }) ; }
private void TaskManagerInitialisation() { final TaskManager taskManager = TaskManager.getManager() ; taskManager.setMinimumWorkerCount(taskManagerMinWorkerCount) ; taskManager.setMaximumWorkerCount(taskManagerMaxWorkerCount) ; }
public void stop() throws Exception { XTSLogger.logger.info("JBossTS XTS Transaction Service - stopping"); TaskManager.getManager().shutdown() ; // com.arjuna.services.framework.admin.TaskManagerInitialisation // shutdown the activity service reaper ActivityReaper.shutdown(); // execute shutdown for all registered initialisations Iterator<XTSInitialisation> iterator = xtsInitialisations.iterator(); while (iterator.hasNext()) { XTSInitialisation xtsInitialisation = iterator.next(); xtsInitialisation.shutdown(); } xtsInitialisations.clear(); }
/** * Create and register a task worker. */ private void createWorker() { final TaskWorker taskWorker = new TaskWorker(this) ; final String name ; synchronized(workerPool) { name = "TaskWorker-" + ++taskCount ; } final Thread thread = new Thread(taskWorker, name) ; thread.setDaemon(true) ; synchronized(workerPool) { workerPool.add(thread) ; } thread.start() ; } }
/** * Execute the tasks. */ public void run() { while(true) { final Task task = taskManager.getTask() ; if (task == null) { break ; } try { task.executeTask() ; } catch (final Throwable th) { WSCLogger.i18NLogger.error_services_framework_task_TaskWorker_run_1(th); } } } }
/** * * @param parameters */ @WebMethod(operationName = "CompletedOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Completed") @Oneway public void completedOperation( @WebParam(name = "Completed", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); final NotificationType completed = parameters; final MAP inboundMap = AddressingHelper.inboundMap(ctx); final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx); TaskManager.getManager().queueTask(new Task() { public void executeTask() { TerminationParticipantProcessor.getProcessor().handleCompleted(completed, inboundMap, arjunaContext); } }) ; }
/** * Create and register a task worker. */ private void createWorker() { final TaskWorker taskWorker = new TaskWorker(this) ; final String name ; synchronized(workerPool) { name = "TaskWorker-" + ++taskCount ; } final Thread thread = new Thread(taskWorker, name) ; thread.setDaemon(true) ; synchronized(workerPool) { workerPool.add(thread) ; } thread.start() ; } }
/** * Execute the tasks. */ public void run() { while(true) { final Task task = taskManager.getTask() ; if (task == null) { break ; } try { task.executeTask() ; } catch (final Throwable th) { WSCLogger.i18NLogger.error_services_framework_task_TaskWorker_run_1(th); } } } }
/** * * @param parameters */ @WebMethod(operationName = "CancelledOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Cancelled") @Oneway public void cancelledOperation( @WebParam(name = "Cancelled", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); final NotificationType cancelled = parameters; final MAP inboundMap = AddressingHelper.inboundMap(ctx); final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx); TaskManager.getManager().queueTask(new Task() { public void executeTask() { TerminationParticipantProcessor.getProcessor().handleCancelled(cancelled, inboundMap, arjunaContext); } }) ; }
/** * Create and register a task worker. */ private void createWorker() { final TaskWorker taskWorker = new TaskWorker(this) ; final String name ; synchronized(workerPool) { name = "TaskWorker-" + ++taskCount ; } final Thread thread = new Thread(taskWorker, name) ; thread.setDaemon(true) ; synchronized(workerPool) { workerPool.add(thread) ; } thread.start() ; } }