<h2 dir="auto">Bug Report</h2>
<p dir="auto">Postgresql database + ShardingSphere using the following SQL times wrong:  nested exception is org.postgresql.util.PSQLException: 未设定参数值 5 的内容。</p>
<p dir="auto">The sample：<br>
INSERT INTO xxx(c1,c2,c3,c4,c5)VALUES (#{c1},#{c2},#{c3},#{c4},lower(#{c5}))<br>
ON conflict(id) DO<br>
UPDATE SET c1=#{c1},appdes=#{c2},c4=lower(#{c5})</p>
<p dir="auto">Through the debug code, is a postgresql parse SQL syntax tree, unable to properly resolve the insert at the back of the parameters, lead to the JDBC insert data, tip missing parameters</p>
<p dir="auto">I'll refactor sharding-transaction-2pc-xa, here is the detail design, please feel free to give me some advices.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8317649/50502306-3b240080-0a99-11e9-9518-b98e4da3bd43.png"><img src="https://user-images.githubusercontent.com/8317649/50502306-3b240080-0a99-11e9-9518-b98e4da3bd43.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">changes</h3>
<ul dir="auto">
<li>faced to XA DataSource to handle XA Connection instead of AtomikosDataSourceBean</li>
<li>adapt Connection to XAConnection if needed</li>
<li>Get XAResource, then inject it into XA transactionManager if needed</li>
<li>Add ShardingTransactionAPI to handle all transaction operation, this can be used in other transaction type</li>
</ul>