1)  I _could_ create a persistence based version if you guys would find
value in it.  Generally, we don't persist our CFCs as a rule due to some of
their less attractive quirks and because we use them a lot for WS calls.
This isn't a high - volume feature for us, so we don't mind the overhead.

2) Hmmm . . . I'm not sure about that CFAPPLICATION tag way of doing it . .
. I could try, but you also run the risk in this method of creating a
billion different applications if you pass in app names that don't already
exist.  I'm not sure how you would avoid that using CFAPPLICATION other than
using Java, so I'm inclined to stay in Java.
 
3) We use this because we have an app that needs to be disabled during our
data load process.  We have a central administrative server that makes WS
calls into the app from the data load process.  The switch to disable each
app is just an application level variable, so this method worked out pretty
well.  We don't want to maintain a server.enabledapps array or structure
because our app is not always installed on a server we're allowed to use
that scope on.

I'll take a look at the persistence/init stuff though for sure.  Sounds like
it could be useful.

Thanks for the suggestions! :)
Roland

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nathan Dintenfass
Sent: Wednesday, March 03, 2004 2:25 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Setting an app variable on ANY app on the server

A couple suggestions, while we're looking at some working code:

1) How about adding an init() method that creates the necessary java
objects -- that way you can stay consistent with the increasingly popular
"constructor" methodology being adopted and, more importantly, save your end
users the overhead of having to create those java objects every time they
want to get/set.

2) Couldn't you accomplish the same thing with a lot less overhead by just
using the CFAPPLICATION tag?  Something like:

<cfset var currentActiveApplication = application.applicationName>
<cfset var toReturn = "">
<cfapplication name="#arguments.appName#">
<cfset toReturn = application[arguments.varName]>
<cfapplication name="#currentActiveApplication#">
<cfreturn toReturn>

3) Isn't this what server variables are for? ;)





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Roland Collins
> Sent: Wednesday, March 03, 2004 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Setting an app variable on ANY app on the server
>
>
> Hi all,
>
> We needed to be able to get and set an application variable on ANY
> application on our server, so I whipped up these functions.  Thought they
> may be of use to some of you.  Feel free to share :)
>
> Cheers,
> Roland
>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to