title: Spring JDBCTemplate Specify Schema for Derby
body: <p>While setting up a derby connection if we use plain java code we can specify the schema for given connection using</p>
  
  <pre><code>conn.setSchema("APP");
  </code></pre>
  
  <p>When we using <code>JDBCTemplate</code> we have to specify <code>DataSource</code> object to this template. There is no <code>setSchema</code> method in DataSource class.</p>
  
  <pre><code>DriverManagerDataSource dataSource=new DriverManagerDataSource();
  dataSource.setDriverClassName(driver);
  dataSource.setUrl(url);
  dataSource.setUsername(username);
  dataSource.setPassword(password);
  </code></pre>
  
  <p>Also i could not specify it as derby properties. Derby properties mentioned in the DOCs.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>What is the best way to overcome this issue. Is there any solution to specify schema?</p>