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

  • Home
  • SEARCH
  • 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 7682413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:33:48+00:00 2026-05-31T18:33:48+00:00

In our ColdFusion application we have stateless model objects. All the data I want

  • 0

In our ColdFusion application we have stateless model objects.
All the data I want I can get with one method call (it calls other internally without saving the state).

Methods usually ask the database for the data. All methods are read only, so I don’t have to worry about thread safety (please correct me if I’m wrong).

So there is no need to instantiate objects at all. I could call them statically, but ColdFusion doesn’t have static methods – calling the method would mean instantiating the object first.

To improve performance I have created singletons for every Model object.
So far it works great – each object is created once and then accessed as needed.

Now my worry is that all requests for data would go through only 1 model object.
Should I? I mean if on my object I have a method getOfferData() and it’s time-consuming.
What if a couple of clients want to access it?
Will second one wait for the first request to finish or is it executed in a separate thread?
It’s the same object after all.

Should I implement some kind of object pool for this?

  • 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-05-31T18:33:49+00:00Added an answer on May 31, 2026 at 6:33 pm

    The singleton pattern you are using won’t cause the problem you are describing. If getOfferData() is still running when another call to that function gets called on a different request then this will not cause it to queue unless you do one of the following:-

    1. Use cflock to grant an exclusive lock
    2. Get queueing connecting to your database because of locking / transactions
    3. You have too many things running and you use all the available concurrent threads available to ColdFusion

    So the way you are going about it is fine.

    Hope that helps.

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

Sidebar

Related Questions

We have an application that generates simulated data for one of our services for
We have a medium sized ColdFusion code base for our Intranet and Website. For
Our application is interfacing with a lot of web services these days. We have
I have an application that uses coldfusion's session management (instead of the J2EE) session
We've noticed something odd with our Coldfusion 8 client variables DB. We have many
I’m migrating one of our ColdFusion 8 servers to a 64-bit server and was
We have a number of web servers, each running one version of ColdFusion. The
We are working on standardizing our Bugzilla application across all projects. The default installation
Our company uses an app that was originally ColdFusion + Access later converted to
Our flex project, which works fine in its current environment with coldfusion 7 single

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.