db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Andrew McIntyre <fuzzylo...@nonintuitive.com>
Subject [PATCH] allow demo compilation without db2jcc.jar
Date Mon, 24 Jan 2005 09:53:17 GMT
Attached is a patch to allow the network server demo to compile without 
db2jcc.jar. With the patch, the demo can compile without db2jcc.jar 
present, and the resulting demo classes will run when db2jcc.jar is 
present in the classpath at runtime.

In NsSample.java,
- the connection URL is corrected so that there is a semicolon after 
'create=true'
- references to DB2Connection are replaced with java.sql.Connection.

In SimpleNetworkClientSample.java
- the client's DataSource and its properties are accessed via 
reflection to avoid referencing DB2SimpleDataSource directly.
- the connection is instantiated via reflection to avoid referencing 
the DB2Connection class directly.

In NsSampleClientThread.java
- references to DB2Connection are replaced with java.sql.Connection

Please let me know if you have concerns regarding this patch. My only 
concern at the moment is that the reuse of variable names may lead to 
confusion when reading the sample code.

Thanks,
andrew


Mime
View raw message