简体   繁体   中英

XA Datasource using Oracle DB links in Java EE Container managed transactions

I have following environment:

EAR application on WebSphere 9, container managed transactions using XA datasource for Oracle 19c database (let's name it database "A").

The problem is that datasource (in some transactions), ie database "A" is calling database "B" via database link (database "B" is also Oracle 19c).

Connection pool gets "Too many database links in use" error message because of 2 phase commit. Let's say max. number of database links in use is 4, if i refresh screen 5th time i get SQL exception.

Setting maximum database links in use parameter in database properties only delays the problem.

I am in no control (from application perspective) of closing database links.

ATM we've set datasource to non-XA and everything works fine, but in some time we'll need to manualy handle transaction that include one datasource and WebSphere MQ.

Anyone got any ideas or experience with this setup?

EDIT: I'm trying to get this working with JPA 2.0.

You have two options:

  1. If not you, then the developers of the application need to make sure the database links get closed. If your max number of active database links is 4, then you can only have 4 active sessions/users in your application.
  2. Increase the allowed number of database links

This article describes the fixes/workarounds in greater detail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM