For the DB configuration you might want to first have a look at
Note, because you are on a very old release of JBoss, some of these configuration options will not be available to you. However, the basic pooling functionality hasn't changed from release to release.
If you could be a bit more specific about what you view as 'not working well' we could be of a bit more help. Most concepts in JBoss have a one to one parallel with WAS, at least in terms of JCA.