After reading the JTA/J2EE Connector specs, I've decided the problem is indeed in the PostgreSQL JDBC driver. It sets autocommit to false and assumes it remains false indefinitely. tranql is (correctly) re-enabling autocommit in its ManagedConnection.cleanup method.
So I patched up PGXAConnection so its autocommit handling is a bit more sane... i.e. it's on by default and is only turned off within XA transactions. Outside of XA transactions, it's re-enabled.
Anyway, quite an educational experience... I now know a little more about JTA/XA/resource connectors. More than I really wanted to, actually.
I'll have to clean up my patch (and re-do it against HEAD), but it's available
here along with a re-compiled jar.
Here's a bug/email
about the problem brought up a few months ago. I don't think anything was ever done.
Now hopefully I can move on to actually writing apps...