Skip to main content
Carmem_BR
Participant
February 3, 2021
Question

Instantiate object in cfoutput

  • February 3, 2021
  • 1 reply
  • 155 views

Hello, good morning everyone.

I wonder if the code below will consume coldfusion 9 resources,
since we have more than 40 simultaneous users in the routine.

<cfoutput query = "qryItens">

<cfset obj = createObject ("component", "cfcs.PrestadorPrecoIten">

<cfset obj.setid_prestador (id_prestadorItem)>


<cfset obj.setid_item (id_item)>

<cfset variables.preco = obj.getPreco ()>

# variable.preco #

</cfoutput>

That is, instantiate an object within a loop and the routine is being accessed by 40 users on average.
can cold fusion stop?

    This topic has been closed for replies.

    1 reply

    Community Expert
    February 3, 2021

    This is a really difficult question to answer, because no one knows what's in that object or what it's doing, etc. The object could be a singleton, for example. That would prevent you from having two people use it simultaneously, much less than forty. I'm not sure why that would cause CF to stop, but it's not clear whether you mean "CF will stop serving this page to multiple users" or "CF will stop working altogether".

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC