Is it possible to have datasource aliases in JBoss? E.g. instead of:<br /><br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;datasources&gt;<br />&nbsp;&nbsp; &nbsp;&lt;local-tx-datasource&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jndi-name&gt;ds-1&lt;/jndi-name&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;connection-url&gt;jdbc:abc&lt;/connection-url&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;user-name&gt;def&lt;/user-name&gt;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;password&gt;ghi&lt;/password&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;...<br />&nbsp;&nbsp; &nbsp;&lt;/local-tx-datasource&gt;<br />&lt;/datasources&gt;<br /><br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;datasources&gt;<br />&nbsp;&nbsp; &nbsp;&lt;local-tx-datasource&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jndi-name&gt;ds-2&lt;/jndi-name&gt;<br
/>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;connection-url&gt;jdbc:abc&lt;/connection-url&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;user-name&gt;def&lt;/user-name&gt;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;password&gt;ghi&lt;/password&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;...<br />&nbsp;&nbsp; &nbsp;&lt;/local-tx-datasource&gt;<br />&lt;/datasources&gt;<br /><br />have something like:<br /><br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;datasources&gt;<br />&nbsp;&nbsp; &nbsp;&lt;local-tx-datasource&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jndi-name&gt;ds-1&lt;/jndi-name&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;connection-url&gt;jdbc:abc&lt;/connection-url&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;user-name&gt;def&lt;/user-name&gt;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&lt;password&gt;ghi&lt;/password&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;...<br />&nbsp;&nbsp; &nbsp;&lt;/local-tx-datasource&gt;<br />&lt;/datasources&gt;<br /><br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;datasources&gt;<br />&nbsp;&nbsp; &nbsp;&lt;local-tx-datasource&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jndi-name&gt;ds-2&lt;/jndi-name&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &lt;alias&gt;ds-1&lt;/alias&gt;<br />&nbsp;&nbsp; &nbsp;&lt;/local-tx-datasource&gt;<br />&lt;/datasources&gt;<br /><br />or something in that fashion. This would allow for:<br />- Not having duplicate information (e.g. connection URLs, usernames, passwords, etc.)<br />- Supporting legacy or just other applications that require the same logical connection, but use different data-source names<br />- Easy testing of multiple data-sources on one database (i.e. on the same data, even though the apps were designed to use physically different
DBs)<br /><br />Any ideas appreciated. Also - as a general thing - is it possible to have aliases for other things (e.g. MQ topic aliases, etc.).<img src="http://recallable.bigstring.com/Tx6tx7e1257786420.gif" alt="" width="0" height="0"><br><hr><img src="http://www.bigstring.com/refer.php?img=69" width="1" height="1"><a href='http://www.peoplestring.com/refer.php?ref=69'>Start making money with PeopleString!</a>