Package org.ofbiz.service.job

Examples of org.ofbiz.service.job.JobManager


        // locate the dispatcher to use
        LocalDispatcher dispatcher = this.getDispatcher();

        // get the job manager
        JobManager jm = dispatcher.getJobManager();
        if (jm == null) {
            throw new WfException("No job manager found on the service dispatcher; cannot start activity");
        }

        // using the StartActivityJob class to run the activity within its own thread
        try {
            Job activityJob = new StartActivityJob(activity, req);
            jm.runJob(activityJob);
        } catch (JobManagerException e) {
            throw new WfException("JobManager error", e);
        }

        // the GenericRequester object will hold any exceptions; and report the job as failed
View Full Code Here


        // locate the dispatcher to use
        LocalDispatcher dispatcher = this.getDispatcher();

        // get the job manager
        JobManager jm = dispatcher.getJobManager();
        if (jm == null) {
            throw new WfException("No job manager found on the service dispatcher; cannot start activity");
        }

        // using the StartActivityJob class to run the activity within its own thread
        try {
            Job activityJob = new StartActivityJob(activity, req);
            jm.runJob(activityJob);
        } catch (JobManagerException e) {
            throw new WfException("JobManager error", e);
        }

        // the GenericRequester object will hold any exceptions; and report the job as failed
View Full Code Here

                throw new GenericServiceException("Persisted job not created");
            } else {
                Debug.logInfo("Persisted job queued : " + jobV.getString("jobName"), module);
            }
        } else {
            JobManager jMgr = dispatcher.getJobManager();
            if (jMgr != null) {
                String name = Long.toString(new Date().getTime());
                String jobId = modelService.name + "." + name;
                job = new GenericServiceJob(dctx, jobId, name, modelService.name, context, requester);
                try {
View Full Code Here

        // locate the dispatcher to use
        LocalDispatcher dispatcher = this.getDispatcher();

        // get the job manager
        JobManager jm = dispatcher.getJobManager();
        if (jm == null) {
            throw new WfException("No job manager found on the service dispatcher; cannot start activity");
        }

        // using the StartActivityJob class to run the activity within its own thread
        try {
            Job activityJob = new StartActivityJob(activity, req);
            jm.runJob(activityJob);
        } catch (JobManagerException e) {
            throw new WfException("JobManager error", e);
        }

        // the GenericRequester object will hold any exceptions; and report the job as failed
View Full Code Here

                throw new GenericServiceException("Persisted job not created");
            } else {
                Debug.logInfo("Persisted job queued : " + jobV.getString("jobName"), module);
            }
        } else {
            JobManager jMgr = dispatcher.getJobManager();
            if (jMgr != null) {
                String name = Long.toString(new Date().getTime());
                String jobId = modelService.name + "." + name;
                job = new GenericServiceJob(dctx, jobId, name, modelService.name, context, requester);
                try {
View Full Code Here

                throw new GenericServiceException("Persisted job not created");
            } else {
                Debug.logInfo("Persisted job queued : " + jobV.getString("jobName"), module);
            }
        } else {
            JobManager jMgr = dispatcher.getJobManager();
            if (jMgr != null) {
                String name = Long.toString(new Date().getTime());
                String jobId = modelService.name + "." + name;
                job = new GenericServiceJob(dctx, jobId, name, modelService.name, context, requester);
                try {
View Full Code Here

            }
        }

        // job manager needs to always be running, but the poller thread does not             
        try {
            this.jm = new JobManager(this.delegator, enableJM);
        } catch (GeneralRuntimeException e) {
            Debug.logWarning(e.getMessage(), module);
        }

        // make sure we haven't disabled these features from running
View Full Code Here

       
        // locate the dispatcher to use
        LocalDispatcher dispatcher = this.getDispatcher();
       
        // get the job manager
        JobManager jm = dispatcher.getJobManager();
        if (jm == null) {
            throw new WfException("No job manager found on the service dispatcher; cannot start activity");
        }
         
        // using the StartActivityJob class to run the activity within its own thread             
        try {           
            Job activityJob = new StartActivityJob(activity, req);                                  
            jm.runJob(activityJob)
        } catch (JobManagerException e) {
            throw new WfException("JobManager error", e);
        }
        
        // the GenericRequester object will hold any exceptions; and report the job as failed      
View Full Code Here

        }

        // make sure we haven't disabled these features from running
        if (enableJM) {
            try {
                this.jm = new JobManager(this.delegator);
            } catch (GeneralRuntimeException e) {
                Debug.logWarning(e.getMessage(), module);
            }
        }
View Full Code Here

TOP

Related Classes of org.ofbiz.service.job.JobManager

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.