This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling jdbc drivers


> How about MySQL. Didn't that compile succeed for Erik Poupaert at some
> point, with some hacks? Could it be included in RHUG for a broader
> audience?

I used com.mysql.jdbc.3.1.nightly.20030316, because previous versions
contain a bug that make the connector inoperable with gcj. The current
release is 3.0.8 and cannot be used with gcj. You must emerge the
sources directly from CVS.

Further, I couldn't be bothered to make SSL work. I guess it must be
possible. Anyway, there are numerous well-understood and well-researched
security protocols through which you can tunnel the connection, if need
be. Why build it in?

Therefore, I disabled it:

MysqlIO.java:716://X                javax.net.ssl.SSLSocketFactory
sslFact = (javax.net.ssl.SSLSocketFactory)
javax.net.ssl.SSLSocketFactory MysqlIO.java:717://X                   
.getDefault(); MysqlIO.java:718://X                this.mysqlConnection
= sslFact.createSocket(this.mysqlConnection, MysqlIO.java:719://X       
                this.host, this.port, true); MysqlIO.java:723://X       
        ((javax.net.ssl.SSLSocket) this.mysqlConnection)
MysqlIO.java:724://X                .setEnabledProtocols(new String[] {
"TLSv1" }); MysqlIO.java:725://X               
((javax.net.ssl.SSLSocket) this.mysqlConnection).startHandshake();

I've also junked all subdirectories underneath com.mysql.jdbc, except
for "profiler", because it compiled without complaining (so I could as
well leave it in). The other subdirectories do not seem to contribute
directly to the stated purpose of the connector, but create
compilation problems, and can therefore be dismissed.

If you apply these changes to a recent nightly version in CVS, the
connector should work fine. I have used it in production for over
3 months now, and we haven't had any issues with it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]