|
RE: ColdFusion detection in Connector/J 5.1.2 beta - ATTN Mysql team!: msg#00011db.mysql.java
I am curious if this list is monitored by anyone on the MySQL team? Is there another more appropriate contact person or list I should send this information to? Help and/or acknowledgement of receipt are appreciated! -- Tom Jordahl Adobe ColdFusion Team -----Original Message----- From: Tom Jordahl [mailto:tjordahl@xxxxxxxxx] Sent: Wednesday, July 11, 2007 3:52 PM To: java@xxxxxxxxxxxxxxx Subject: ColdFusion detection in Connector/J 5.1.2 beta Hello, I noticed that the latest Connector/J version auto-detects ColdFusion and does some configuration, which is great. The code for doing this in com.mysql.jdbc.Util.java isn't so great however: // // Detect the ColdFusion MX environment // // Unfortunately, no easy-to-discern classes are available // to our classloader to check... // String loadedFrom = stackTraceToString(new Throwable()); if (loadedFrom != null) { isColdFusion = loadedFrom.indexOf("coldfusion") != -1; } else { isColdFusion = false; } Might I suggest something like the following code? try { Class cf = Class.forName("coldfusion.Version"); isColdFusion = true; // Methods available are: // String getProductName() // String getMajor(); // String getMinor(); // String getServicePack(); Method getMajor = cf.getMethod("getMajor", new Class[] {} ); String version = (String) getMajor.invoke(null, null); if (Integer.getInteger(version).intValue() >= 8) { // We can turn back on the calls to isCaseSensitive() in CF System.setProperty("coldfusion.mysql.enableiscasesensitive", "true"); } } catch (Exception e) { // ignore, default is isColdFusion = false; } Also note that in the next major release of ColdFusion (8.0) which will be released very soon we have worked around the MySql problem of round tripping to the server when isCaseSensitive() is called by detecting a mysql ResultSet and not doing this. Using the new driver this isn't necessary and you can turn back on the behavior by defining a Java System property -Dcoldfusion.mysql.enableiscasesensitive=true In any case, thanks for adding this configuration optimization - this will make our mutual customers happy! I would be happy to answer any other ColdFusion specific questions the MySQL team might have - contact me at tjordahl at adobe.com. Thanks! -- Tom Jordahl Adobe ColdFusion Team -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java?unsub=gcdmj-java@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure, AlexeySmirnov |
|---|---|
| Next by Date: | Re: ColdFusion detection in Connector/J 5.1.2 beta - ATTN Mysql team!, Martin MC Brown |
| Previous by Thread: | ColdFusion detection in Connector/J 5.1.2 beta, Tom Jordahl |
| Next by Thread: | Re: ColdFusion detection in Connector/J 5.1.2 beta - ATTN Mysql team!, Martin MC Brown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |