Use the connection pool? Then you can limit the number of used connections. There should be example -ds.xml files to follow.
Thanks for help
Somehow I was under the impression that if I didn't specify anything,
a default pool of size 20 would get used, but I guess that's not the case.
Now I'm looking into two solutions. One is to make the JBOSS automatically disconnect idle connections, say after 1 minute. The other is to use the '<check-valid-connection-sql>' -directive. As I understand it, that should close 'broken' connections if they exist in the pool. But I'm not sure what a 'broken connection' means. If a query is going on for a long time, would that qualify as a broken connections, and thus be cleaned out by check-valid-connection-sql ?