Atomikos Forum

Problem with Spring integration and multiple data sources

I detailed in this question: http://stackoverflow.com/questions/42373533/spring-mvc-multiple-data-sources-jta-atomikos-in-same-transaction
that I integrated Atomikos with my Spring MVC project. The problem is that if I create transaction that access only to one data source, everything is fine, but if I create a transiction with both, I have a very long log with postgres errors like:
Caused by: org.postgresql.util.PSQLException: ERROR: prepared transactions are disabled
  Suggerimento: Set max_prepared_transactions to a nonzero value.

Caused by: org.postgresql.util.PSQLException: ERROR: prepared transactions are disabled
  Suggerimento: Set max_prepared_transactions to a nonzero value.

ERROR XAResourceTransaction - XA resource 'first': prepare for XID '3139322E3136382E322E322E746D313438373639323737373736333030303032:3139322E3136382E322E322E746D33' raised -3: the XA resource detected an internal error
org.postgresql.xa.PGXAException: Error in preparing transaction

So it seems it needs prepared transaction, but because only for transaction that include both of them? And it is mandatory enable them? Can I avoid this?
Giangiot Send private email
Tuesday, February 21, 2017
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics