I think you mean to have a statistic how the pool is used, right?
I do something like that with cron:
bin/twiddle.sh -s localhost:1099 get "jboss.jca:service=ManagedConnectionPool,name=DefaultDataSource" MaxSize MaxConnectionsInUseCount
You can get the attributes you want and write it to a logfile.
If you want more you may interested in JON (JBoss Operation Network).