did you find a solution to this? I've got a similar problem. I can't reproduce the error on my local JBoss server no matter how many hot deployments of the application (not the -ds.xml) file I do. However, every now and then, I get the "You are trying to use a connection factory that has been shut down" error. It's as if the ManagedConnectionFactory is timeing out after a couple of days for some reason.