• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java MessageServiceExecutorJobListener类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener的典型用法代码示例。如果您正苦于以下问题:Java MessageServiceExecutorJobListener类的具体用法?Java MessageServiceExecutorJobListener怎么用?Java MessageServiceExecutorJobListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

MessageServiceExecutorJobListener类属于org.kuali.rice.ksb.messaging.quartz包,在下文中一共展示了MessageServiceExecutorJobListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: scheduleExecution

点赞 3

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
       PersistedMessageBO messageCopy = message.copy();
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, messageCopy);
	JobDetail jobDetail = new JobDetail("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);
	if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}
	jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
	Trigger trigger = new SimpleTrigger("Exception_Message_Trigger " + Math.random(), "Exception Messaging", messageCopy
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
	scheduler.scheduleJob(jobDetail, trigger);    
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:19,
代码来源:DefaultExceptionServiceImpl.java

示例2: scheduleMessage

点赞 3

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
protected void scheduleMessage(PersistedMessageBO message) throws SchedulerException {
 LOG.debug("Scheduling execution of a delayed asynchronous message.");
 Scheduler scheduler = KSBServiceLocator.getScheduler();
 JobDataMap jobData = new JobDataMap();
 jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);

    JobDetailImpl jobDetail = new JobDetailImpl("Delayed_Asynchronous_Call-" + Math.random(), "Delayed_Asynchronous_Call",
  MessageServiceExecutorJob.class);
 jobDetail.setJobDataMap(jobData);

    scheduler.getListenerManager().addJobListener( new MessageServiceExecutorJobListener());

    SimpleTriggerImpl trigger = new SimpleTriggerImpl("Delayed_Asynchronous_Call_Trigger-" + Math.random(),
  "Delayed_Asynchronous_Call", message.getQueueDate());

    trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
 scheduler.scheduleJob(jobDetail, trigger);
}
 

开发者ID:kuali,
项目名称:rice,
代码行数:19,
代码来源:DelayedAsynchronousServiceCallProxy.java

示例3: scheduleExecution

点赞 3

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
       PersistedMessageBO messageCopy = message.copy();
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, messageCopy);
	JobDetailImpl jobDetail = new JobDetailImpl("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);

       if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}

       scheduler.getListenerManager().addJobListener( new MessageServiceExecutorJobListener());

       SimpleTriggerImpl trigger = new SimpleTriggerImpl("Exception_Message_Trigger " + Math.random(), "Exception Messaging", messageCopy
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke

       scheduler.scheduleJob(jobDetail, trigger);
}
 

开发者ID:kuali,
项目名称:rice,
代码行数:23,
代码来源:DefaultExceptionServiceImpl.java

示例4: scheduleExecution

点赞 3

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);
	JobDetail jobDetail = new JobDetail("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);
	if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}
	jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
	Trigger trigger = new SimpleTrigger("Exception_Message_Trigger " + Math.random(), "Exception Messaging", message
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
	scheduler.scheduleJob(jobDetail, trigger);    
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:18,
代码来源:DefaultExceptionServiceImpl.java

示例5: scheduleMessage

点赞 2

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
protected void scheduleMessage(PersistedMessageBO message) throws SchedulerException {
LOG.debug("Scheduling execution of a delayed asynchronous message.");
Scheduler scheduler = KSBServiceLocator.getScheduler();
JobDataMap jobData = new JobDataMap();
jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);
JobDetail jobDetail = new JobDetail("Delayed_Asynchronous_Call-" + Math.random(), "Delayed_Asynchronous_Call",
	MessageServiceExecutorJob.class);
jobDetail.setJobDataMap(jobData);
jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
Trigger trigger = new SimpleTrigger("Delayed_Asynchronous_Call_Trigger-" + Math.random(),
	"Delayed_Asynchronous_Call", message.getQueueDate());
trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
scheduler.scheduleJob(jobDetail, trigger);
   }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:15,
代码来源:DelayedAsynchronousServiceCallProxy.java

示例6: createScheduler

点赞 2

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJobListener; //导入依赖的package包/类
/**
 * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#createScheduler(org.quartz.SchedulerFactory, java.lang.String)
 */
@Override
protected Scheduler createScheduler(SchedulerFactory schedulerFactory, String schedulerName) throws SchedulerException {
    Scheduler scheduler = super.createScheduler(schedulerFactory, schedulerName);
    scheduler.addJobListener(new MessageServiceExecutorJobListener());
    return scheduler;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:10,
代码来源:SchedulerFactoryBean.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)