Hi Dan,

I'm confused, how is this code intended to work? Does it keep the connection
with the new principle? What is the server was restarted. 

blists

-----Original Message-----
From: Dan Plesse [mailto:[EMAIL PROTECTED] 
Sent: October 7, 2006 11:36 PM
To: CF-Talk
Subject: Re: SQl Server 2005 w/ Mirroring. How does CF know when to 'failo
ver' to the mirror?

You can also use java util props and keep shrinking the code until you get
one line.

Like the CF classLoader, one line is all you need!

<cfset application.sqlserver_connection = createObject("java", "
java.lang.Class").forName("macromedia.jdbc.MacromediaDriver").newInstance().
connect("#jdbc_str#",
props)>

It would interesting if you load these lines into CF from a props file.
Call it sql_server.properties

 <cfset props = createObject("java", "java.util.Properties")>
 <cfset props.setProperty("netAddress", "000000000000")>
 <cfset props.setProperty("portNumber", "1433")>
 <cfset props.setProperty("maxPooledStatements", "0")>

<cfif NOT isdefined("application.sqlserver_connection") OR
application.sqlserver_connection.isClosed() EQ "YES">

<cfset application.sqlserver_connection.close()>

</cfif>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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

Reply via email to