Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2281

SimpleStatefulCache$RemovalTimeoutTask never removes ProxiedStatefullBeanContext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.22
    • ejb3
    • None
    • Hide

      One stateful bean (the one proxied) is injected (@EJB) into another stateful bean that is never removed explicitely after being used.

      Show
      One stateful bean (the one proxied) is injected (@EJB) into another stateful bean that is never removed explicitely after being used.
    • Hide

      none

      Show
      none

      ProxiedStatefulBeanContext doesn't externalize property 'lastUsed' (inherited from StatefulBeanContext), which upon de-externalization gets default value of System.currentTimeMillis().
      This makes SimpleStatefulCache$RemovalTimeoutTask think that this Context has just been used and thus cannot be removed.

      Suggested fix: add 'lastUsed = in.readLong();' to readExternal and 'out.writeLong(lastUsed);' to writeExternal methods of ProxiedStatefulBeanContext

            Unassigned Unassigned
            meye1 Mirosław Michalski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: