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


Attachment: demo.diff
Description: Binary data

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to