OpenJPA
  1. OpenJPA
  2. OPENJPA-422

Calendar objects contained in a detached Entity still have a "live" StateManagerImpl

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1, 1.1.0
    • Component/s: kernel
    • Labels:
      None

      Description

      When Entities are detached, normally the StateManagerImpl instance associated with this Entity is replaced with a DetachedStateManager. Not only with the Entity itself, but also with the proxied attributes (Date, Calendar, Collection, and Map types). But, somehow the Calendar object type was forgotten in the code for this processing. So, the Calendar proxy type was left with a "live" StateManagerImpl instance. If the owning Broker (EntityManager) for this Entity was closed, then the use of this "live" StateManagerImpl would end up with an IllegalStateException. And, even if the owning Broker (EntityManager) was still open, this "live" StateManagerImpl should not have been tracking the state since the enclosing Entity was detached.

      A simple one-line update to DetachManager$DetachFieldManager.reproxy() method will now process the Calendar proxies as well as the other proxies it was already doing.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Kevin Sutter
            Reporter:
            Kevin Sutter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development