Posts

Showing posts with the label open source

Quartz - Run Now

Quartz is an open source job scheduling system written in Java. Executing a job in quartz is based on the definition of triggers. But what if you are in a development environment where you don't want to schedule jobs and want to be able to run them on demand? The API of version 1.6.0 tells us that the triggerJob method in the Scheduler class can be used for that. Great! But the triggerJob method also seems to throw away your job from the scheduler. So the second time you run the job it's bingo! A possible workaround we figured out for this is to reschedule the job with a simple trigger which will run immediatly: scheduler.deleteJob(jobName, groupName); scheduler.scheduleJob( jobDetail, new SimpleTrigger(jobName, groupName) ); You could of course also use the rescheduleJob method but then you have to be sure the job is already scheduled. In our situation this was not the case.  

Lucene uses Google

Today I was figuring out how to integrate the Hibernate search API in one of my projects. At a certain point the docs referred to the Lucene documentation. My old pal Google provided me the link to the Lucene homepage and when I opened it up I saw something very weird in the upper right corner: "Search the site with Google"  Yep, Lucene seems to be using Google as a search engine! At first I was a bit astonished about it. But why bother about it, the Google service is out there and it just works. After all Lucene is a great tool and I hope to tell you more about it in the near future.