我在jboss 4.0.5上使用目前最新的石英1.8.3.quartz作业是持久的并保存到本地数据库中.当我在执行石英调度程序对象上调用shutdown或standby方法时,调度程序仍继续执行作业,只有作业状态为空且执行失败.
我希望(至少根据石英API文档)当我关闭或使调度程序处于待机状态时,之前调度到数据库中的作业将不会被执行.
如果在调度程序上调用shutdown或standby不是实现它的方法,那是什么?
这些工作不只是完成执行,而是继续触发计划工作.
以下是其他信息:
public class QuartzNotificationsSchedulerBean implements NotificationsScheduler, ServletContextAware {
...
public String scheduleNotification(Notification notification) {
// Schedule the job with the trigger
try {
// Define job instance
String groupName = this.createNotificationGroupName(notification);
String triggerName = this.createNoficationTriggerName(notification);
String jobName = this.createNoficationJobName(notification);
JobDetail job = new JobDetail(jobName, groupName , ScheduledNotificationJob.class);
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.putAll(notification.getContext());
job.setJobDataMap(jobDataMap);
Calendar notificationTime = notification.getTime();
Trigger trigger = new SimpleTrigger(triggerName, groupName , notificationTime.getTime());
scheduler.scheduleJob(job, trigger);
return trigger.getName();
} catch (SchedulerException e) { …Run Code Online (Sandbox Code Playgroud) 我正在尝试为特定的URI设置expire头但由于某种原因它无法正常工作,到目前为止我在httpd.conf文件中所做的是以下内容:
<LocationMatch "/mysite/contentservices/weather/get.json">
ExpiresDefault A86400
</LocationMatch>
<LocationMatch "/mysite/*">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
</LocationMatch>
Run Code Online (Sandbox Code Playgroud)
这根本不适合我.我没有为我指定的内容提供过期日期标题.我还不明白当你有两个LocationMatch重叠的指令时,究竟会发生什么?第一个指令优先?
我在将特定URL请求映射到项目中的某个控制器时遇到问题.
URL为:http://HOSTNAME/api/v1/profiles.json 部署的战争是:api.war
我得到的错误如下:
[PageNotFound]在DispatcherServlet中找不到带有URI [/api/v1/profiles.json]的HTTP请求的映射,名称为"action"
我的配置如下:web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml,/WEB-INF/applicationContext-security.xml</param-value>
</context-param>
<!-- Cache Control filter -->
<filter>
<filter-name>cacheControlFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<!-- Cache Control filter mapping -->
<filter-mapping>
<filter-name>cacheControlFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Spring security filter -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<!-- Spring security filter mapping -->
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Spring listener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Spring Controller -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/v1/*</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
action-servlet.xml:
<mvc:annotation-driven/>
<bean id="contentNegotiatingViewResolver"
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="favorPathExtension" value="true" />
<property …Run Code Online (Sandbox Code Playgroud) Jenkins 在每次构建期间执行的最耗时的任务之一是将工件下载到其删除的本地存储库中。
虽然删除我的工件很好。我不明白删除先前下载到本地 Maven 存储库(.m2)中的 3rd 方工件的必要性。
有什么办法可以防止 Jenkins 在构建之前删除本地存储库。
谢谢