We have a query we are trying to execute on JBoss AS 5.1 with a MS SQL datasource configured as an XA resource. In this case the query is taking more then 40 minutes to execute when invoking it via tha app where invoking it via a SQL client is take 1-4 minutes. We are using MS SQL JDBC driver 2.0. Are there any performance issues with this configuration? Are there any tuning tips anyone can offer. My initial thought is to update the driver as from some information I have gathered indicates ms sql driver 2.0 may have issues with XA transactions. Any input is welcome.