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]
