While setting up a derby connection if we use plain java code we can specify the schema for given connection using
conn.setSchema("APP");
When we using JDBCTemplate
we have to specify DataSource
object to this template. There is no setSchema
method in DataSource class.
DriverManagerDataSource dataSource=new DriverManagerDataSource();
dataSource.setDriverClassName(driver);
dataSource.setUrl(url);
dataSource.setUsername(username);
dataSource.setPassword(password);
Also i could not specify it as derby properties. Derby properties mentioned in the DOCs.
bootPassword=key
create=true
databaseName=nameofDatabase
dataEncryption=true
encryptionProvider=providerName
encryptionAlgorithm=algorithm
territory=ll_CC
logDevice=logDirectoryPath
createFrom=BackupPath
restoreFrom=BackupPath
rollForwardrecoveryFrom=BackupPath
password=userPassword
shutdown=true
user=userName
What is the best way to overcome this issue. Is there any solution to specify schema?