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 9155305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:34:04+00:00 2026-06-17T12:34:04+00:00

I am working with preparing a solution for one of my uscases. My solution

  • 0

I am working with preparing a solution for one of my uscases.
My solution is something that might look like this in abstract.

My question here is, when the two main flows are calling the same sub-flow cuncurrently,
it is going to work without any issues ?

Also do I need to write the code as thread safe for all the classes that are being used as
custom components/trnasformers in the sub-flow ?

My abstract configuration looks as given below.

<flow name="mainflow_1" >
    <inbound-endpoint/>
    <transformer ....>
    <component ....>
        <flow-ref name="subflow_1"></flow-ref>
    <transformer ....>
    <component  ...>
    <outbound-endpoint ....>
</flow>

<flow name="mainflow_2" >
    <inbound-endpoint  type="request-response" />
    <transformer ....>
    <component ....>
        <flow-ref name="subflow_1"></flow-ref>
    <transformer ....>
    <component  ...>            
</flow>

<sub-flow name="subflow_1" >        
    <transformer ....>
    <component ....>
        <outbound-endpoint  call to some service >
    <transformer ....>
    <component  ...>        
</sub-flow>

Please guide me.

  • 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-17T12:34:05+00:00Added an answer on June 17, 2026 at 12:34 pm

    A sub-flow acts like a macro: execution wise, it’s as if the elements of the sub-flow were copied in the calling flow.

    Thus it’s the threading behaviour of the calling flow that will determine the threading behaviour of the sub-flow.

    Whether they’re used in sub-flows or main flows, you should write your component classes to be thread safe if you use singleton instances of them (the common use case). If you use prototype instances (one instance created per request) or pooled instances (limited number of instances, bottlenecks the threads), your component classes can be thread unsafe.

    As a rule of thumb, strive for thread-safe stateless component classes as much as you can to save you potential optimization pain down the road.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on one project in which I am preparing API to interact
Working with an undisclosed API, I found a function that can set the number
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with H2 I get this error when I try to write a row
FINAL NOTE Final solution found in another post Although I appreciated the clarification that
I'm working through some optimization work, and I've noticed that in some mysql dumps
I am working on a Windows MFC application. I am preparing a report list
I'd like to create a resource file (in the process of preparing for deployment),
I'm preparing to embark on a web app development that will make little to
I found a snippet similar to this in some (C++) code I'm preparing for

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.