Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-596

Fix Race condition using the toArray(Object[]), where nulls end up in the returned array.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.GA_CP05
    • 4.2.0.GA, 4.2.0.GA_CP01
    • System
    • None
    • Release Notes

      When toArray is called on the list of Xids in the Txmanager and an array is passed in, it is possible, that the size might not be the same, which will leave nulls in the array being returned.
      change....
      public Xid[] recover(ConnectionToken dc, int flags) throws Exception

      { Set preparedXids = prepared.keySet(); Xid[] xids = (Xid[]) preparedXids.toArray(new Xid[preparedXids.size()]); return xids; }

      to
      public Xid[] recover(ConnectionToken dc, int flags) throws Exception

      { Set preparedXids = prepared.keySet(); Xid[] xids = (Xid[]) preparedXids.toArray(); return xids; }

      This was related to the patches that we made in the Oswego libraries in JBPAPP-355

            rhn-support-jhowell William Howell
            rhn-support-jhowell William Howell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: