I have a question about how beans work and why user a looks at product A 
and user b looks at product B. Randomly but usually when the multi request 
for same page happen user b will see product a. kind of like the beans are 
getting overwritten. 

Here is how i have my setup 

in coldspring.xml i have 
productAssignment contains storedprocs to sql
productHolder getters and setters
appSettings contain variables based on serverlocation to set sql to look at 
live dev or staging servers.


  <bean id="productAssignment" class="model.product.assignmentt">
    <constructor-arg name="appSettings">
      <ref bean="appSettings" />
    </constructor-arg>
  </bean>


  <bean id="productHolder" class="model.product.holder">
    <constructor-arg name="appSettings">
      <ref bean="appSettings" />
    </constructor-arg>
  </bean>
  
  
  <bean id="appSettings" class="model.settings.appSettings">
  </bean>



in controller.cfc 
<cfcomponent output="false" hint="I am a Model-Glue controller."  
extends="ModelGlue.gesture.controller.Controller" 
beans="productAssignment,productHolder">


<cffunction name="getProduct" access="public" returnType="void" 
output="false">
                <cfargument name="event" type="ModelGlue.Core.Event" 
required="true">
<cfset var product_id = arguments.event.getValue("product_id")>
<cfset var rtproducts  = 
beans.productAssignment.getProductByID('#product_id#')>
                        <cfif rtproducts.recordcount>
                            <cfset 
beans.productHolder.setord_invoicestatus(rtproducts.ord_invoicestatus)>
                            <cfset 
beans.productHolder.setordernumber(rtproducts.ord_number)>
                    </cfif>
<cfset arguments.event.setValue("rtProducts", beans.productHolder)>
</cffunction>
</cfcomponent>

So user goes to page to view Product i pass product_id in. it goes to 
beans.productAssignment.getProductByID to return a query then i set query 
results to beans.productHolder.

If multi people hit the page and run this function sometimes if i ask for 
product A i get someone elses results back like for product B.

Am i using beans the wrong way? Why are peoples requests getting mixed 
up/overwritten by someone elses.

thanks 

-- 
-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to