Marcin, welcome to
Java Ranch!
Please use the "code" tags when posting source code or XML text - I edited your post for you to include the tags.
I'm not sure what it is that you are asking. According to the *-ds-xml file you posted, JBoss AS will create 5 connections in the pool the first time your code asks for a connection. And will create at most 20 connections in that pool. Why do you think that multiple pools are being created (posting the "suspicious" log message would have been helpful)