Archive for January, 2004

MySql And WSAD 5 in A J2EE 1.3 Project

Sunday, January 18th, 2004

I got MySQL working with WSAD 5 in a WebSphere 5 test environment. 

First I added mysql-connector-java-3.0.9-stable.bin.jar to the ws.ext.dirs section of the Paths section of the server config.  Then I added a JDBC provider to the Data source section.  I used the implementation class name: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.  I added the mysql-connector-java-3.0.9-stable.bin.jar to the class path here again out of paranoia.  It didn’t work with the jar just here until I added the ws.ext.dirs entry.  I’ll clean this up later. I had luck with the v4 datasources before, but in this case I wanted to do a WAS5 project and use J2EE 1.3.  An exception is thrown when I try to get a V4 DataSource in this case.  So, I added a V5 DataSource.  The non-obvious thing was to set the helper class name to:  It’s not in the drop down list in my copy of WSAD.  After a bit of searching, I found this:

It’s been working pretty well.

Java Code

Tuesday, January 13th, 2004

Comment on this code:

while (gotPassword == false)
  if (line.toString().toLowerCase().indexOf(”password:”) != -1)
    gotPassword= true;
  System.err.println(host+”: failed to get ‘password:’ prompt”);
  throw new Exception(host+”: Failed to get password prompt”+line);