how to manage the transactions in wso2esb or wso2dss we have option to create a datasource in wso2esb.While i am creating external datasource with xadatasource but its unable to create its giving issue i created with below configuration
Data Source Type*=RDBMS
Name*=USCProduction
Data Source Provider*=External Data Source
Data Source Class Name*=org.postgresql.xa.PGXADataSource
Data Source Properties
====================
url=jdbc:postgresql://localhost:5432/USCProduction
user=admin
password=admin
bbut its unable to create giving error like this
ERROR: Error in creating external data source: org.postgresql.xa.PGXADataSource
ERROR - DataSourceRepository Error in creating external data source: org.postgresql.xa.PGXADataSource
org.wso2.carbon.ndatasource.common.DataSourceException: Error in creating external data source: org.postgresql.xa.PGXADataSource
at org.wso2.carbon.ndatasource.rdbms.utils.RDBMSDataSourceUtils.handleExternalDataSource(RDBMSDataSourceUtils.java:323)
at org.wso2.carbon.ndatasource.rdbms.utils.RDBMSDataSourceUtils.createPoolConfiguration(RDBMSDataSourceUtils.java:283)
at org.wso2.carbon.ndatasource.rdbms.RDBMSDataSource.<init>(RDBMSDataSource.java:42)
at org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader.createDataSource(RDBMSDataSourceReader.java:58)
at org.wso2.carbon.ndatasource.core.DataSourceRepository.createDataSourceObject(DataSourceRepository.java:202)
at org.wso2.carbon.ndatasource.core.DataSourceRepository.registerDataSource(DataSourceRepository.java:359)
at org.wso2.carbon.ndatasource.core.DataSourceRepository.addDataSource(DataSourceRepository.java:473)
at org.wso2.carbon.ndatasource.core.services.NDataSourceAdminService.addDataSource(NDataSourceAdminService.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
how we can do this and try with this also copied this into datasources file
<datasource>
<name>sample</name>
<xa-datasource jndi-name="java:jboss/PostgresXADS" pool-name="PostgresXADS">
<driver>postgresql</driver>
<xa-datasource-property name="ServerName">localhost</xa-datasource-property>
<xa-datasource-property name="PortNumber">5432</xa-datasource-property>
<xa-datasource-property name="DatabaseName">USCProduction</xa-datasource-property>
<security>
<user-name>admin</user-name>
<password>admin</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker">
</valid-connection-checker>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter">
</exception-sorter>
</validation>
</xa-datasource>
<drivers>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasource>
how can i create xa datasource in wso2esb to use transaction mediator