Instantiate object in cfoutput

New Here ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

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?

Views

53

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines