take a look at this
<cfobject action="create" type="java" class="jrunx.kernel.JRun" name="jr" />
<cfoutput>#jr.getServerName()#</cfoutput>

The cool thing about this is if you have multiple instances on one server -
it returns the instance name.

Also works for CF Standard.

On 4/23/07, Peterson, Chris <[EMAIL PROTECTED]> wrote:
>
> 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
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276033
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