>Hi all,
>
>We run a load balanced env with 6.1 standalone edition, and I was just
>setting up a cferror template and trying to identiy the server that
>the template or error occurs on.
>
>I used this:
>
><cfobject action="create" type="java" class="jrunx.kernel.JRun" name="jr">
><cfset servername = jr.getServerName()>
>
>but it always returns 'default'. How can I change this?
>
>Thanks!
>--
>Duncan I Loxton
>[EMAIL PROTECTED]

Duncan,

This might work for you:

<cfscript>
machineName  = createObject("java", 
"java.net.InetAddress").localhost.getHostName();
// get this instance name
instanceName = createObject("java", "jrunx.kernel.JRun").getServerName();
</cfscript>

<cfoutput>
     Machine: #machineName#<br>
    Instance: #instanceName#
</cfoutput> 

I can't take credit for this, I got it off someone's blog or a posting here.

hth,
larry
--
Larry C. Lyons
Web Analyst
BEI Resources
American Type Culture Collection
email: llyons(at)atcc(dot)org
tel: 703.365.2700.2678
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230409
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to