Scott,
Yeah close, when I first saw this snippet of code and I'll have to go
looking for it now. Meant that I was thinking I could make a control panel
and at the flick of a button select which website I wanted to stop or enable
for maintenance, rather than editing code killing the session etc. Or even
kill a user session from a website, the ideas became endless after that.
But on another note has anyone actually tried this..
Application.cfc
<cffunction name="Request">
<cfdump var="#Application#">
</cffunction>
Not sure I have the right method, but when I was playing around with this a
few months ago, I was able to list every application scope that was running
before the application name was changed.
Regards
Andrew Scott
Technical Consultant
NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205
Phone: 03 9686 0485 - Fax: 03 9699 7976
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes
Sent: Thursday, 31 March 2005 1:46 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Accessing application vars from a diff Application.
Q. If you were to store the application scope by reference into the
server-scope, won't that be a painful way?
Instead why not simply have a Application Name registry, where all it does
is store names, then using steves method simply copy from one to the other
via this named scope.
In order to copy, you're gonna have to provide a source and target, thats a
given and not knowing your source is will "eh?" - even then you could loop
the name registry and pull that in dynamically (if your hard pressed to
couple your applications with names and what not).
Catch22 is if you clear your application scope, using StructClear etc you
will also wipe the Application Name - from memory i think that once you do
that, your application name is gone until your actual application.cfm times
out... (ie refresh won't bring it back..its
gawwwwwwn.....)
To me storing your entire application scope or anything but bar miniums
inside server-scope seems like a big ol waste.
I like (think this was what Andrew was hinting at) the idea of
CFAdministrator having an Application Scope Profilier so you can view an
application scope remotely or stuff like that...some sort of recursion
ui/ide/profiler thingy.
On Thu, 31 Mar 2005 12:29:43 +1000, Andrew Scott <[EMAIL PROTECTED]> wrote:
> Steve,
>
> The point is very clear that you need to know the application name to
> change it too, and if you don't know then your in trouble!! Either
> way, its another solution to using the application name. Because if
> your like me and I am looking at doing this, is that if you have many
> websites and you want to kill a specific session, your able to by
> getting a list of the applications that are running, then delve a
> little further into and kill the variable or even add to the variables.
>
> The reason I say this is that in a control panel situation I can add a
> variable to the application structure, which can be checked by the
> application to see if it exists and holds a particular value, and
> place a hold on that website so that I can do maintenance to the
> website then when I am finished I can click another button on the
> control panel and its back online again.
>
> This is not a shot at you Steve, but I suggested that because others
> might not know about it and in this case it wasn't very clear as the
> reason behind what it is he wanted to do.
>
>
> Regards
> Andrew Scott
> Technical Consultant
>
> NuSphere Pty Ltd
> Level 2/33 Bank Street
> South Melbourne, Victoria, 3205
>
> Phone: 03 9686 0485 - Fax: 03 9699 7976
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Steve
> Onnis
> Sent: Thursday, 31 March 2005 11:51 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] RE: Accessing application vars from a diff
Application.
>
> grrrrrrrrr
>
> Just change the name of the application in the application tag
>
> <cffunction name="copyApplication">
>
> <cfargument name="sourceApplication" type="string" required="Yes"
/>
> <cfargument name="destinationApplication" type="string"
> required="Yes" />
>
> <cfapplication name="#arguments.sourceApplication#" />
> <cfset source = duplicate(Application)>
>
> <cfapplication name="#arguments.destinationApplication#" />
> <cfset structAppend(application, source)>
>
> </cffuntion>
>
> <cfset
> copyApplication(sourceApplication="blip",destinationApplication="blop"
> )>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
> unsubscribe send a blank email to
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>
--
Regards,
Scott Barnes
http://www.mossyblog.com
http://www.flexcoder.com (Coming Soon)
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe
send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/