Skip to main content

Posts

Showing posts with the label quartz

Is there a way to make drawRect work right NOW?

The original question............................................... If you are an advanced user of drawRect on your ipop*, you will know that of course drawRect will not actually run until "all processing is finished." setNeedsDisplay flags a view as invalidated and the OS, in a word, waits until all processing is done. This can be infuriating in the common situation where you want to have: a view controller 1 starts some function 2 which incrementally 3 creates a more and more complicated artwork and 4 at each step, you setNeedsDisplay (wrong!) 5 until all the work is done 6 Of course, when you do that, all that happens is that drawRect is run once only after step 6. What you want is for the ^&£@%$@ view to be refreshed at point 5. This can lead to you smashing your ipops on the floor, scanning Stackoverflow for hours, screaming at the kids more than necessary about the dangers of crossing the street, etc etc. What

Spring 2.5 + quartz java.lang.NoClassDefFoundError: org/quartz/JobDetail

I have an issue with quartz library. I'm using it with spring 2.5: <bean id="reminderBean" class="com.mail.timexis.ReminderBean"> <property name="mailSender"> <ref local="timexisMailSender" /> </property> </bean> <bean id="jobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="reminderBean" /> <property name="targetMethod" value="execute" /> </bean> <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="jobDetail" /> <!-- run every morning at 6 AM --> <property name="cronExpression" value="* * * * * ?" /> </bean>

Is possible to postpone trigger fire in Quartz?

I have two processes: Process 1 - implements runnable and can run forever. Process 2 - fires at fixed hour and minute of day (i've created a job that run with Quartz). To warn the process 1 that the other process is running I can use the TriggerListener , but how can I postpone the fire of the second process if the process 1 still doing something? For example: I need to fire the trigger at 2PM, but this need to be done after 2PM if the process 1 isnt idle. Here's some sample: ProcessForever.java import static org.quartz.CronScheduleBuilder.dailyAtHourAndMinute; import static org.quartz.JobBuilder.newJob; import static org.quartz.TriggerBuilder.newTrigger; public class ProcessForever implements Runnable { private boolean processTwoRunning; private Scheduler scheduler; private Trigger trgProcessTwo; private String status; public static final STATUS_PROCESS = "PROCESS"; public static final STATUS_SLEEP = "SLEEP"; private