-
1. Re: How to configure a ConnectionPool?
mccaffc Jun 26, 2002 12:56 PM (in response to tdang)You need to describe your DB2 database to JBoss. Look in the deploy directory of your server, you'll see an example one for hsqldb: it's called hsqldb-service.xml
You need to create one for DB2: look at this location for examples:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/
There's one called db2-service.xml
Add any specific driver details, put in your target host, username and password (the dbrealm stuff's doesn't seem essential if you're starting out and appears to be commented out anyway).
Put this file in your deploy directory as MyVeryOwn-db2-service.xml and watch the log as it deploys. (Pretty cool). Fix any minor errors.
You'll need to make sure you have the JDBC driver for DB2 : put this jar file in the jboss server's lib directory (e.g. server/default/lib)
I'd write a bean or something to check the database access as well, just to be certain you've set everything up properly end-to-end.
There really should be a sort of HOWTO for this, but I haven't found one that gathers the details in one place. I don't really understand the structure of the service files and most people seem to just copy examples.
Cheers,
Chris -
2. Re: How to configure a ConnectionPool?
tdang Jul 2, 2002 4:26 AM (in response to tdang)Hi mccaffc!
First, thanks a lot for your very helpful answer. I downloaded the db2-service from this site http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/
and I could test my bean very well. I want to ask you if JBoss support MS-Access too? Is there any service file for this database system.
Regards -
3. Re: How to configure a ConnectionPool?
mccaffc Jul 2, 2002 5:53 AM (in response to tdang)Hi,
Glad that worked.
I don't see any reason why you couldn't connect to Access. I haven't done it myself, but I guess with JDBC it's just another database. I remember reading you had 2 options: the JDBC-ODBC bridge or a native Access JDBC driver (if one exists). Either way, it just boils down to changing the connection url in the xxx-service.xml file and making sure the driver jar is on jboss' class path.
All the basic xxx-service.xml files in the example-config directory are pretty similar - only the 'XA' style files are different (they are there to handle distributed transactions I believe).
If you get it working, why not post the file in the forums?
Cheers,
Chris -
4. Re: How to configure a ConnectionPool?
tdang Jul 12, 2002 12:00 PM (in response to tdang)I just downloaded the file from the above website and replaced the database source in the file. So I did not have any big changes
-
5. Re: How to configure a ConnectionPool?
tdang Jul 15, 2002 4:23 AM (in response to tdang)Is there a dtd for xxx-service.xml?