mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar

 

<dependency>

            <groupId>com.microsoft.sqlserver</groupId>

            <artifactId>sqljdbc4</artifactId>

            <version>4.0</version>

        </dependency>


SQLServerXADataSource oraXaDataSource = new SQLServerXADataSource();

oraXaDataSource.setUser("abc");

oraXaDataSource.setPortNumber(1234);

oraXaDataSource.setServerName("localhost");

oraXaDataSource.setPassword("1234");

oraXaDataSource.setDatabaseName("sss");


AtomikosDataSourceBean xaDataSource = new AtomikosDataSourceBean();

xaDataSource.setXaDataSource(oraXaDataSource);

xaDataSource.setTestQuery("select 1");

xaDataSource.setUniqueResourceName("phyDataSourceS");

xaDataSource.setMaxPoolSize(999);  // <1000

xaDataSource.setMaintenanceInterval(60);