oh yeah... d'oh, me being a muppet -----Original Message----- From: Rich Wild [mailto:r.wild@;e-mango.com] Sent: 17 October 2002 12:32 To: '[EMAIL PROTECTED]' Subject: RE: [ cf-dev ] Good/Bad?
I think you're probably asking for trouble using the word session... I usually create a struct in the session scope eg session.myvars = structnew(); for instance - and then put all your variables in there, copy the struct, not the scope into the request scope: so: cfset request.myvars = duplicate(session.myvars); and then back again cfset session.myvars = duplicate(request.myvars); also, try putting your variables in structure groups within the main struct, just so that you could copy over some of them, not all of them. Its like havign a good filing system vs a heap of paper on the floor, it means you can get to what you want easily, and prob more importantly, so can other developers. > -----Original Message----- > From: Robertson-Ravo, Neil (REC) > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > Sent: 17 October 2002 12:39 > To: '[EMAIL PROTECTED]' > Subject: RE: [ cf-dev ] Good/Bad? > > > going back Rich, you will still have to reference the variable as > request.session.x > > ? > > -----Original Message----- > From: Rich Wild [mailto:r.wild@;e-mango.com] > Sent: 17 October 2002 11:52 > To: '[EMAIL PROTECTED]' > Subject: RE: [ cf-dev ] Good/Bad? > > > thats why that code I gave you will work for you. > > you only copy what you need into the request scope, not the > whole scope's > contents. > > make the tag a two way tag and then in your onrequestend you > can copy them > all back to the session scope. > > by the way, you're not 'moving' anything, you're copying or > referencing, and > to move the session vars to the request scope in the first > place, you still > need to lock that. > > > -----Original Message----- > > From: Robertson-Ravo, Neil (REC) > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > Sent: 17 October 2002 12:01 > > To: '[EMAIL PROTECTED]' > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > I moving the session struct to the request scope so I do not > > need lock any > > session vars on that particular page request (which could be a lot). > > > > I will then dupe them back into the session scope > > OnRequestEnd.cfm so they > > are back in shared scope. > > > > N > > > > > > -----Original Message----- > > From: Rich Wild [mailto:r.wild@;e-mango.com] > > Sent: 17 October 2002 11:43 > > To: '[EMAIL PROTECTED]' > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > why would you do that? > > > > besides, you'll need to lock the original move to that scope. > > > > but I don't understand why you're trying to put the session > > scope into the > > request scope. > > > > you only need to move the contents of the session scope, not > > the entire > > scope. > > > > > -----Original Message----- > > > From: Robertson-Ravo, Neil (REC) > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > Sent: 17 October 2002 11:55 > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > unless yoou have moved them to the request scope for the > > period of the > > > read/write > > > > > > -----Original Message----- > > > From: Tom Smith [mailto:tomo_smith@;yahoo.co.uk] > > > Sent: 17 October 2002 11:50 > > > To: [EMAIL PROTECTED] > > > Subject: Re: [ cf-dev ] Good/Bad? > > > > > > > > > yes that's right all shared scopes must be locked when > > > writing and reading. > > > ----- Original Message ----- > > > From: "Rich Wild" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, October 17, 2002 11:29 AM > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > > sorry, I think I may be misunderstanding you. > > > > > > > > if you have a variable in a shared scope: > > > > > > > > session.myvar > > > > > > > > then you need to lock and read/write access to it. > > > > > > > > > -----Original Message----- > > > > > From: Robertson-Ravo, Neil (REC) > > > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > > > Sent: 17 October 2002 11:32 > > > > > To: '[EMAIL PROTECTED]' > > > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > > > > > > > thats poppycock :-p, > > > > > > > > > > If you have copied the session scope into the request scope > > > > > and you are > > > > > referencing your session vars as : request.session.myvar you > > > > > do not have > > > > > lock AFAIK > > > > > > > > > > you just have to copy the back into the session scope. > > > > > > > > > > N > > > > > > > > > > -----Original Message----- > > > > > From: Rich Wild [mailto:r.wild@;e-mango.com] > > > > > Sent: 17 October 2002 11:15 > > > > > To: '[EMAIL PROTECTED]' > > > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > > > > > > > you need to lock all shared scope variable access. can't get > > > > > away from it. > > > > > > > > > > > -----Original Message----- > > > > > > From: Robertson-Ravo, Neil (REC) > > > > > > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com] > > > > > > Sent: 17 October 2002 11:25 > > > > > > To: '[EMAIL PROTECTED]' > > > > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > > > > > > > > > > so, all in all; the code I posted is wrong (in that it > > > > > doesnt actually > > > > > > alleviate the fact you need to lock!) > > > > > > > > > > > > -----Original Message----- > > > > > > From: Rich Wild [mailto:r.wild@;e-mango.com] > > > > > > Sent: 17 October 2002 11:01 > > > > > > To: '[EMAIL PROTECTED]' > > > > > > Subject: RE: [ cf-dev ] Good/Bad? > > > > > > > > > > > > > > > > > > I used this method once - Russ suggested an idea for a tag > > > > > > that accepts a > > > > > > list of variable names and then it copies all the those that > > > > > > exist in the > > > > > > session scope into the request scope. > > > > > > > > > > > > I made it into a tag and it worked brilliantly, so that on > > > > > > each page I only > > > > > > needed to name the session or app vars that I needed > > > > > copying into the > > > > > > request scope for that page. > > > > > > > > > > > > eg: > > > > > > > > > > > > <cf_apptap vars="myvar1,myvar2,myvar3" scope="session"> > > > > > > > > > > > > would copy session.myvar1, session myvar2 and > > > session.myvar3 into > > > > > > request.myvar1 etc etc. > > > > > > > > > > > > on another page you might only need to request.myvar1 so you > > > > > > would just do: > > > > > > > > > > > > <cf_apptap vars="myvar1"> > > > > > > > > > > > > it saved duplicating everything all the time. > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Taz -=TT=- [mailto:chris@;cfmaster.co.uk] > > > > > > > Sent: 17 October 2002 11:09 > > > > > > > To: [EMAIL PROTECTED] > > > > > > > Subject: Re: [ cf-dev ] Good/Bad? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks guys you have confirmed what I thought : it is > > > > > all over the > > > > > > > > place...the system is very poor and indeed > needs a rewrite > > > > > > > but thats not > > > > > > > on > > > > > > > > the cards. > > > > > > > > > > > > > > > > what needs to be done is to copy the session > > variables into > > > > > > > the request > > > > > > > > scope to avoud locking them.... > > > > > > > > > > > > > > > > its a nightmare, it really is! > > > > > > > > > > > > > > Its not a bad thing to do... I tend to use this > > approach when > > > > > > > using session > > > > > > > variables instead of client. But I've never had > so many that > > > > > > > I needed to > > > > > > > loop through all values in the scope. Usually I > just stick a > > > > > > > few duplicate > > > > > > > ops in the app_globals.cfm > > > > > > > > > > > > > > <cflock ...blah...> > > > > > > > <cfscript> > > > > > > > Request.Whatever = Duplicate(Session.Whatever); > > > > > > > ... > > > > > > > ... > > > > > > > </cfscript> > > > > > > > </cflock> > > > > > > > > > > > > > > Of course you have to remember to write to the > session scope > > > > > > > when you change > > > > > > > the values, but its way better to do it this way than > > > > > > > constantly locking > > > > > > > session read ops. Same goes for application scope > if you're > > > > > > using it. > > > > > > > > > > > > > > Taz > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > ** Archive: > > > > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > > > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > -- > > > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > > ** Archive: > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > > > ** Archive: > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
