Description
http://db.apache.org/derby/docs/dev/adminguide/radminnsdatasourcexmp.html
Shows an example for getting a connection through a DataSource by setting databaseName to "mydb;create=true". It should be changed to use "mydb" and use setCreateDatabase("create"). Also the comment that user/password are required is not correct.
I think the getDS method can be removed and the example can just look like:
org.apache.derby.jdbc.ClientDataSource ds =
new org.apache.derby.jdbc.ClientDataSource();
// DatabaseName can include Derby URL Attributes
ds.setDatabaseName("mydb");
ds.setCreateDatabase("create");
ds.setUser("user");
ds.setPassword("mypass");
// The host on which Network Server is running
ds.setServerName("localhost");
// port on which Network Server is listening
ds.setPortNumber(1527);
Connection conn = ds.getConnection();