-
1. Re: MS SQL Server Config on NT
drcharris Apr 5, 2002 9:23 AM (in response to katakyie)The JDBCProvider is simply to load JDBC drivers - you only need to supply the driver class names you want to use in your server, separated by commas. So for your config, you don't need the lines for URL, Password, JDBCUser etc.
These extra lines go into your datasource configuration, which tells JBoss how to create connections using the driver. Look in your jcml file for something beginning with
and edit the properties under there. Note that since this mbean represents the DefaultDS datasource, it is set up to use Hypersonic by default. By editing this mbean configuration you would be *replacing* the default datasource for that instance of JBoss. You can, if you like, copy the configuration and change the 'name=DefaultDS' to e.g. 'name=MyDS' to create a second datasource - preserving the original one. You would also need to change the PoolName attribute appropriately.
Then you need to add properties to that datasource to get it to run. We use SQL 2000 here and we set it up as follows:
DefaultDS
com.inet.tds.XDataSource
my.db.username
my.db.password
false
host=my.db.ip.address;database=my.sql.database.name
1200000
20
false
false
false
true
120000
1800000
false
1.0
0
Notes: this uses the tds datasource object which will do proper XA transactions (i.e. will coordinate with other resource managers across transaction boundaries). I've only managed to get this to work with the Tyrex transaction manager - your mileage may vary. If you can't get it to work then fall back to the jboss XADataSourceImpl class which is a 'fake-XA' implementation. It may be enough for your needs.
Of course you may not need XA transactions at all - in which case you need to set up a non-XA datasource. I can't help you there.
Once you get this set up, look up your datasource in JNDI under e.g. java:/DefaultDS - this is a java.sql.DataSource which you can use to get JDBC connections etc.