XAresource Leaks XID instances If Equivalent (but different) XID Instances Are Used (Doc ID 1960827.1)

Last updated on JANUARY 15, 2015

Applies to:

JDBC - Version 11.2.0.3.0 and later
Information in this document applies to any platform.

Symptoms

XAResource methods such as start, end, prepare, commit, etc. each take an Xid argument.

Per Xid API Specification, javax.transaction.xa.Xid is an interface which defines transaction identity using 3 methods:
- getGlobalTransactionId()
- getBranchQualifier()
- getFormatId()

Using different instances which have identical values for the global transaction ID, branch qualifier and format ID, during the course of a transaction in calling the XAResource methods, Xid instances leaks.
After a long XA application run,  memory profile shows a huge collection XID objects.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms