Package commonj.work

Examples of commonj.work.WorkItem


  }

 
  public WorkItem runWithReturnWI(Work job, WorkListener listener) throws Exception {
    logger.debug("IN");
    WorkItem workItem=null;
    try {
      workItem  = wm.schedule(job, listener);

    } catch (Exception e) {
      logger.error("Exception", e);
View Full Code Here


      // Check if work was accepted
      if(fooRemoteWorkItem.getStatus()==WorkEvent.WORK_ACCEPTED){
        container.setFooRemoteWorkItem(fooRemoteWorkItem);
        // run work!
        WorkItem workItem=(WorkItem)wm.runWithReturnWI(workToDo, listener);
        container.setWorkItem(workItem);
        statusWI=workItem.getStatus();
        // put new Object in singleton!!!

        processesStatusContainer.getPidContainerMap().put(pId, container);
        //session.setAttribute("SBI_PROCESS_"+document_id, container);
View Full Code Here

      auditServiceProxy.notifyServiceStartEvent();
    } else {
      logger.warn("Impossible to log START-EVENT because the audit proxy has not been instatiated properly");
    }

    WorkItem wi=event.getWorkItem();

    if(eventServiceProxy != null) {
      String pars=builParametersString();     
      eventServiceProxy.fireEvent("Event of work "+workName+" launching class "+workClass+": Started",pars,COMMONJ_ROLES_HANDLER_CLASS_NAME, COMMONJ_PRESENTAION_HANDLER_CLASS_NAME)
    } else {
View Full Code Here

      if(o!=null){      // object found in session, work could be not started, running or completed

        container=(CommonjWorkContainer)o;
        FooRemoteWorkItem fooRwi=container.getFooRemoteWorkItem();
        WorkItem wi=container.getWorkItem();

        // if WorkItem is not set means work has never been started
        if(fooRwi!=null && wi!=null){
          statusWI=wi.getStatus();
          // if finds that work is finished delete the attribute from session
          if(statusWI==WorkEvent.WORK_COMPLETED){
            logger.debug("Work is finished - remove from session");
            //session.removeAttribute("SBI_PROCESS_"+document_id);
            processesStatusContainer.getPidContainerMap().remove(pid);
View Full Code Here

        job.setWorkerAttribute(ACCESS_CONTROL_CONTEXT_WORKER_ATTR, context);
       
        try
        {
            RenderingJobCommonjWork jobWork = new RenderingJobCommonjWork(job);
            WorkItem workItem = this.workManager.schedule(jobWork, this);
            job.setWorkerAttribute(COMMONJ_WORK_ITEM_ATTR, workItem);
           
            if (this.jobWorksMonitorEnabled)
            {
                this.jobWorksMonitored.put(workItem, jobWork);
View Full Code Here

   
    // commonj.work.WorkListener implementations
   
    public void workAccepted(WorkEvent we)
    {
        WorkItem workItem = we.getWorkItem();
        if (log.isDebugEnabled())
        {
            log.debug("[CommonjWorkMonitorImpl] workAccepted: " + workItem);
        }
    }
View Full Code Here

        }
    }

    public void workRejected(WorkEvent we)
    {
        WorkItem workItem = we.getWorkItem();
        if (log.isDebugEnabled())
        {
            log.debug("[CommonjWorkMonitorImpl] workRejected: " + workItem);
        }
       
View Full Code Here

        }
    }

    public void workStarted(WorkEvent we)
    {
        WorkItem workItem = we.getWorkItem();
        if (log.isDebugEnabled())
        {
            log.debug("[CommonjWorkMonitorImpl] workStarted: " + workItem);
        }
    }
View Full Code Here

        }
    }

    public void workCompleted(WorkEvent we)
    {
        WorkItem workItem = we.getWorkItem();
        if (log.isDebugEnabled())
        {
            log.debug("[CommonjWorkMonitorImpl] workCompleted: " + workItem);
        }
       
View Full Code Here

                while (!this.renderingJobs.isEmpty())
                {
                    for (Iterator<RenderingJob> it = this.renderingJobs.iterator(); it.hasNext(); )
                    {
                        RenderingJob job = it.next();
                        WorkItem workItem = (WorkItem) job.getWorkerAttribute(COMMONJ_WORK_ITEM_ATTR);
                        int status = WorkEvent.WORK_ACCEPTED;
                       
                        if (workItem != null)
                        {
                            status = workItem.getStatus();
                        }
                       
                        boolean isTimeout = job.isTimeout();
                       
                        if (isTimeout)
View Full Code Here

TOP

Related Classes of commonj.work.WorkItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.