Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8259647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:54:48+00:00 2026-06-08T02:54:48+00:00

I have a spring integration flow triggered by the cron expression like follows: <int-ftp:inbound-channel-adapter

  • 0

I have a spring integration flow triggered by the cron expression like follows:

<int-ftp:inbound-channel-adapter id="my-input-endpoint" ...>
    <int:poller trigger="my-trigger"/>
</int-ftp:inbound-channel-adapter>

<bean id="my-trigger"
   class="org.springframework.scheduling.support.CronTrigger">
  <constructor-arg value="0 * * * * *" />
</bean>

It works fine. But now I have to extend the implementation to make it cluster ready (job execution on only one cluster node at the same point of time).

My wish would be to use the Quartz framework in the cluster mode (persisting the job status in the database) to trigger this integration flow. Quartz provides a beautful solution out of the box. The only problem is how to integrate the Quartz with the existing inbout-channer-adaptor? The “trigger” attribute of the “poller” accepts only the subclasses of the org.springframework.scheduling.Trigger. I could not find any bridge between “poller trigger” and the Quartz framework.

many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:54:49+00:00Added an answer on June 8, 2026 at 2:54 am

    Here’s one way…

    Set the auto-startup attribute on the inbound-adapter to false.

    Create a custom trigger that only fires once, immediately…

    public static class FireOnceTrigger implements Trigger {
    
        boolean done;
    
        public Date nextExecutionTime(TriggerContext triggerContext) {
            if (done) {
                return null;
            }
            done = true;
            return new Date();
        }
    
        public void reset() {
            done = false;
        }
    }
    

    In your quartz job, get a reference to the trigger and the SourcePollingChannelAdapter.

    When the quartz trigger fires, have the quartz job

    1. adapter.stop()
    2. trigger.reset()
    3. adapter.start()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Spring Integration. I've configured a Spring file inbound-channel-adapter, e.g. <file:inbound-channel-adapter
I want to have a payload-expression in spring integration that does this: #{T(java.util.Arrays).asList(#args[0],#args[1],#args[2])} I
I'm developing web app using Spring Integration to route my messages, but I have
I have a Spring JUnit test with configuration files and @ContextConfiguration parameters: package ru.csbi.registry.domain.envers.integration;
I have Spring web application. I would like to put some common piece of
I have spring 2.5 application and several pages in the flow work perfectly -
I have two spring beans as follows: @Component(A) @Scope(prototype) public class A extends TimerTask
I have a spring bean that I get like this within a method- repAppCaller
I have a self-executable jar program that relies heavily on Spring Integration. The problem
I have an event-driven application based on MDB, spring integration and JPA for persistence.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.