I am creating two datasources in a file named mssql-ds.xml as follows. The 
databases are on different servers, and have different names.

<?xml version="1.0" encoding="UTF-8"?>
  | <datasources>
  |         <local-tx-datasource>
  |                 <jndi-name>jdbc/one</jndi-name>
  |                 
<connection-url>jdbc:microsoft:sqlserver://myserver1:1433;DatabaseName=one</connection-url>
  |                 
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
  |                 <user-name>user</user-name>
  |                 <password>password</password>
  |         </local-tx-datasource>
  |         <local-tx-datasource>
  |                 <jndi-name>jdbc/two</jndi-name>
  |                 
<connection-url>jdbc:microsoft:sqlserver://myserver2:1433;DatabaseName=two</connection-url>
  |                 
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
  |                 <user-name>user</user-name>
  |                 <password>password</password>
  |         </local-tx-datasource>
  | </datasources>
  | 

When I lookup "jdbc/one", the connection I get from the datasource is connected 
to "jdbc/two". When I remove the second data source definition from the 
mssql-ds.xml file, the connection is made to the correct database.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3905108#3905108

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3905108


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to