Announcement Announcement Module
No announcement yet.
Spring Integration Thread Model and CommonJ Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration Thread Model and CommonJ

    I'd like to use Spring Integration in Weblogic and WAS application servers. I'm using CommonJ to treat a threads.
    please help me to understand the thread model of the Spring Integration.
    Please answer to my questions:
    What thread model used in Spring Integration?
    What is the right way to use Spring Integration within application servers like WAS and WLS(weblogic server)?

    thank you.

  • #2
    Spring provides abstractions over CommonJ for those scenarios; TimerManagerTaskScheduler and WorkManagerTaskExecutor.

    At a minimum, Spring Integration needs a task scheduler.

    Unless you define your own, Spring Integration creates a default TaskScheduler (called "taskScheduler").


    So, the first thing to do is define a bean called taskScheduler that is an instance of TimerManagerTaskScheduler (which wraps the commonj TimerManager).

    For elements that need a task executor, use a WorkManagerTaskExecutor.


    • #3
      thank you for your prompt response.
      What is the thread model or which thread runs in case of usage

      i've run my spring integration application within WAS container.


      • #4
        It depends on your application. gateway, channel, filter, service activator are usually passive components (run on the calling thread). The poller is scheduled by the taskScheduler bean and can have an optional task-executor. Other components are active (such as the TCP/UDP adapters) and can be supplied with an external task-executor (such as the WMTE I mentioned).

        If you have an SI application that is invoked by a web thread, and all the channels are direct, and all the components are passive, then no other threads are used; everything runs on the container thread.

        As soon as you go async (or use an active component), you need a task-scheduler or executor that is compatible with your environment.

        To be safe in WAS, just do as I suggested in post #2.
        Last edited by Gary Russell; May 26th, 2012, 04:41 PM.


        • #5
          thank you for your comprehensive answer.
          no its clear for me