Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
DataSourceUtils.isConnectionTransactional always returns false Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • DataSourceUtils.isConnectionTransactional always returns false

    I have created a transactional datasource using the jtdsDataSource for Sybase. I actually get a pooled connection from a XAConnection as follows;

    HTML Code:
    private void initDNADataSource(){
    		ApplicationContext ac = new ClassPathXmlApplicationContext(
    		JtdsDataSource ds=(JtdsDataSource)ac.getBean("datasource2");
    		try {
    			System.out.println("Supports Transactions is "+ds.getXAConnection().getConnection().getMetaData().supportsTransactions());
    			boolean b=DataSourceUtils.isConnectionTransactional(ds.getXAConnection().getConnection(), ds);
    			System.out.println("DataSource is transactional is "+b);
    		} catch (SQLException e) {
    			// TODO Auto-generated catch block
    However, the isConnectionTransactional always returns false even though I am clearly obtaining a transactional connection. Does anyone know why this so? I am using the jtds sybase driver.