Mappings, of course! *facepalm*... my brain is fried.
Thanks again for taking the time, Ezra. On Jan 25, 6:14 pm, Ezra Parker <[email protected]> wrote: > No problem. > > Regarding an application-specific path, you can do this without moving > any files or changing the application's URL by using a mapping. > Assuming that you are using Application.cfc, then an > application-specific mapping will do the trick. > > In Application.cfc, add this to the pseudo-constructor area (outside > of any functions): > > <cfset this.mappings["/application1"] = > getDirectoryFromPath(getCurrentTemplatePath()) /> > > And then you can use "application1" (or whatever mapping you define) > as a prefix to your component paths, so model.security.SecurityService > would become application1.model.security.SecurityService -- note that > this assumes that Application.cfc and the model directory are > contained within the same parent directory, i.e.: > > /application1/Application.cfc > /application1/model/security/SecurityService.cfc > > Once you've done this, application1.model.security.SecurityService and > application2.model.security.SecurityService will be different > component paths, and therefore component caching can be used without > problems. > > -- > Ezra Parker > > > > > > > > On Tue, Jan 25, 2011 at 5:43 PM, theinternot <[email protected]> wrote: > > OK. Turning off component caching fixed it! > > > Thanks again, Ezra! You saved me a lot of time and frustration. > > > Dan, thanks for replying and for all the contributing to the cf > > community you do. > > > Sincerely, > > > John > > > On Jan 25, 5:05 pm, Ezra Parker <[email protected]> wrote: > >> I am guessing that the key here is this: > > >> > - although the are in different folders with different ip's, the paths > >> > for object instantiation are the same in coldspring: > >> > model.security.SecurityService, etc... > > >> As you mentioned that you're using CF 9, I'm betting that the new > >> component cache setting is enabled (it is by default, I believe), and > >> that this is the cause of the behavior you are seeing. As the > >> description for this setting indicates: > > >> "When checked, component path resolution is cached and not resolved again." > > >> Therefore, if your component paths in ColdSpring are identical, then > >> when one of these objects is instantiated by the first application to > >> spin up, the resolved path will be cached, and when the second > >> application instantiates an object with the same path, it uses the CFC > >> from the first application's directory. > > >> If this is indeed the case, then once you disable this setting and > >> reinitialize the applications the issue should be resolved. Do note > >> that this will result in some level of decrease in performance, as > >> this is one of the optimizations in CF 9 that speeds up object > >> creation. > > >> Your other option would be to use an application-specific path instead > >> (e.g., app1.model.security.SecurityService), which would allow you to > >> continue to keep component caching enabled without causing these sorts > >> of conflicts. > > >> HTH, > > >> -- > >> Ezra Parker > > > -- > > 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 -- 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
