We have a cluster, and I have errors setup to email to me.  Here is the
code I am going to stick into onApplicationStart to get a unique value
for each server:


<!---// If a server.server_name value is not defined, go get it from
c:\name.txt //--->
<cflock scope="server" timeout="3">
        <cfif not structKeyExists(server, "server_Name")>
                <cftry>
                        <cffile action="read" file="c:\name.txt"
variable="tmp_name">
                        <cfset server.server_name = trim(tmp_name) />
                        <cfcatch type="any">
                                <cfset server.server_name = 'Unknown
Server' />
                        </cfcatch>
                </cftry>
        </cfif>
</cflock>

I have a file in the c:\ of each server with its name, so If I get tons
of errors or machine specific errors, I know right where to go.  Is my
lock setup properly, or does anyone else address this problem a
different way? 

Chris

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276028
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to