title: Encryption of datasource password in JBoss without the application policy
body: <p>The main restriction is that for different clients I must have different databases with different credentials.
  So I must create, for new clients, data sources on the fly (without restarting JBoss):</p>
  
  <pre><code>&lt;datasources&gt;
     &lt;xa-datasource&gt;
       &lt;jndi-name&gt;jdbc/1349173612812_ARCHIVE_001DS&lt;/jndi-name&gt;
       &lt;isSameRM-override-value&gt;false&lt;/isSameRM-override-value&gt;
       &lt;xa-datasource-class&gt;com.microsoft.sqlserver.jdbc.SQLServerXADataSource&lt;/xa-datasource-class&gt;
       &lt;xa-datasource-property name="URL"&gt;jdbc:sqlserver://DEVDB\MYDB;databaseName=DEV_ARCHIVE_001&lt;/xa-datasource-property&gt;
       &lt;xa-datasource-property name="DatabaseName"&gt;DEV_ARCHIVE_001&lt;/xa-datasource-property&gt;
       &lt;xa-datasource-property name="SelectMethod"&gt;cursor&lt;/xa-datasource-property&gt;
       &lt;xa-datasource-property name="User"&gt;admin&lt;/xa-datasource-property&gt;
       &lt;xa-datasource-property name="Password"&gt;plain text password&lt;/xa-datasource-property&gt;
    &lt;/xa-datasource&gt;
  &lt;/datasources&gt;
  </code></pre>
  
  <p>Everything works fine, but know I must encrypt the passwords, for security measures.</p>
  
  <p>I found the solution using <code>application policy</code> but in order for a policy to be visible to JBoss the server must be restarted - which is not an option for me.</p>
  
  <p>Is there another method of securing the password?</p>