[jboss-user] Datasource aliases
zagu at bigstring.com
zagu at bigstring.com
Mon Nov 9 12:07:00 EST 2009
Is it possible to have datasource aliases in JBoss? E.g. instead of:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-1</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-2</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
have something like:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-1</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-2</jndi-name>
<alias>ds-1</alias>
</local-tx-datasource>
</datasources>
or something in that fashion. This would allow for:
- Not having duplicate information (e.g. connection URLs, usernames, passwords, etc.)
- Supporting legacy or just other applications that require the same logical connection, but use different data-source names
- 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)
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">
<img src="http://www.bigstring.com/refer.php?img=69" width="1" height="1">Start making money with PeopleString!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20091109/3f3adba3/attachment.html
More information about the jboss-user
mailing list