首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > PowerDesigner >

Quartz and the update checker(封锁Quartz update checker)

2013-07-16 
Quartz and the update checker(关闭Quartz update checker)转自:http://www.korri.net/blog/2011/9/7-qua

Quartz and the update checker(关闭Quartz update checker)

转自:http://www.korri.net/blog/2011/9/7-quartz-and-the-update-checker.html

?

Every programmer has probably at some point used a timer to run a piece of code at some exact time or after some exact interval. If you've used java, you've probably heard about Quartz scheduler.

I've used Quartz in couple of my own projects, but I haven't followed the project recently. Today I decided to rewrite some of my old code and update Quartz to the latest version. Ealier I've used Quartz version 1.6.1 and today when I checked the current stable version is 2.0.2.

I update the quartz jar and refactored the old scheduler code. All in all, everything went quite easily, although at one point I had to look at the example source code to figure out how the new builders are used. Eventually the code compiled and the jobs fired as they should.

One really surprising thing is that TerraCotta has added and update checker feature to the library and it's turned on by default. The update checker contacts the TerraCotta servers and asks for the newest version of Quartz. If you're running an older version, the checker prints a message to the log. It's not obtrusive at all but it's still wholly unnecessary thing to do.

Fortunately the update checker can be turned of but it isn't as easy as it could be. You can add a

  1. -Dorg.terracotta.quartz.skipUpdateCheck=true

startup parameter or you can add

  1. org.terracotta.quartz.skipUpdateCheck=true

to

  • System.setProperty("org.terracotta.quartz.skipUpdateCheck","true");

    call to the initialization code. This is basicly the same thing as adding the startup parameter, but this way you don't have to fiddle with application server startup parameters.

    ?

    --end

    ?

    ?

  • 热点排行