This is with jaybird 2.2.5 JDK 7. I use JBoss App server 4.2.3 on JDK 1.7.0-40
My datasource definition is:
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<tx-connection-factory>
<jndi-name>DSoftDS</jndi-name>
<xa-transaction/>
<track-connection-by-tx/>
<rar-name>jaybird-2.2.5.rar</rar-name>
<connection-definition>javax.sql.DataSource</connection-definition>
<config-property name="Database"
type="java.lang.String">localhost/3050:powerpro_clean</config-property>
<user-name>sysdba</user-name>
<password>masterkey</password>
<config-property name="Encoding">UNICODE_FSS</config-property>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<metadata>
<type-mapping>PowerPro</type-mapping>
</metadata>
</tx-connection-factory>
</connection-factories>
this works without problem with Jaybird 2.1.6. I see the only difference in
the code path is that there is an extra check in
AbstractConnection.setAutoCommit that checks is this connection is part of
distributed transaction and triggers this error.
If I don't call close I get error message that connection was closed for me
when transaction was committed.