Have you ever wondered if you could determine programmatically what version of BlueDragon you're running? Of course, you can open the BlueDragon Administrator and the first page tells you what product you're running (Server, Server JX, etc.) and the release (3.0, 3.02, etc.). It also tells you if you're running the free developer edition, a full production release, or are in evaluation mode.
But what if you wanted to know these things programmatically for some reason? You may know that CF has always had variables like server.coldfusion.productlevel, server.coldfusion.productversion, etc. We support those, but they don't provide the information above. Consider the following code:
<cfoutput>
#Server.ColdFusion.ProductLevel#<br>
#Server.ColdFusion.ProductVersion#<br>
#Server.ColdFusion.ProductName#<br>
</cfoutput>
On my BlueDragon Server JX running 3.02, the output of this is:
BlueDragon Server Server JX
5,0,0,0
BlueDragon
This is useful information, and it may be worth noting that we report the Server.ColdFusion.ProductVersion as 5,0,0,0 to maintain compatibility with code that checks for that to determine if CF5 or CFMX tags can be used. Since we're more closely aligned with CF5 than MX, we report that value. (That may change as future releases support more MX tags.)
Anyway, it doesn't tell you as much about the BD environment as you may like. Instead, you should look at the corollary variables we offer in the server.bluedragon scope. Yep, we have those! For now, we have server.bluedragon.edition and mode, which report back numbers. Here's what they currently mean (quoted from a recent note on the BD-interest list by our fearless leader, Vince):
Server.BlueDragon.Edition identifies the edition; here are the values:
6 - BlueDragon Server (free edition)
7 - BlueDragon Server JX
8 - BlueDragon/J2EE
9 - BlueDragon for .NET
Server.BlueDragon.Mode tells you the license mode:
0 - development
1 - evaluation (time-limited)
2 - full production
Both of these variables are read-only, of course. :-)
I'll add (this is Charlie speaking again) that you may notice above that #Server.ColdFusion.ProductLevel# reports "Server Server" twice. That is a bug that will be fixed in the next patch/release. And also, you may notice that none of these report the actual engine revision. This can be useful when determining the exact patch/revision you're running.
I'll share how to find that in the next blog entry.
A way to see all server variables and settings is via the following code
fragment:
<cfset x = duplicate(server)> cfdump
Since cfdump does not show the server structure by default.
Kirk Benson [kirk.benson@magnetbanking.com]