Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titlePollingComponentSupport.java,
borderStyle=solid
           timerTask = new TimerTask() {
                public void run() {
                    try {
                        // lets run the work inside the JCA worker pools to ensure
                        // the threads are setup correctly when we actually do stuff
                        getWorkManager().scheduleWork(PollingComponentSupport.this);
                    }
                    catch (Throwable e) {
                        log.error("Failed to schedule work: " + e, e);
                    }
                }
            };
            if (firstTime != null) {
                timer.scheduleAtFixedRate(timerTask, firstTime, period);
            }
            else {
                timer.scheduleAtFixedRate(timerTask, delay, period);
            }
        }
        super.start();

...