I'm also experience problems when the database (Oracle 9i) goes down and then up. It seems to me that JBoss still thinks the Connections work and ds.getConnections() returns broken ones.
I get SQLException (Socket closed) in my code.
If I remember right, I think I read something about a cache invalidaton framework (indeed, there is a cache invalidation manager mbean installed) since JBoss 3.2 .
Perhaps you should check out this if it fits your needs.