Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-4353

Allow retrieval of current object cache digest in CommonCache

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: EJBCA 6.3.2.1
    • Fix Version/s: None
    • Component/s: PKI core
    • Labels:
      None
    • Issue discovered during:
      Ad Hoc

      Description

      When org.cesecore.keys.token.CryptoTokenSessionBean.getCryptoToken(int) discovers that the cache data is stale it currently creates a new instance of the CryptoToken before checking if the object has changed in the database compared to the one in the cache.

      This leads to spammed log and (low but) unnecessary use of resources. E.g.

      INFO [org.cesecore.keys.token.SoftCryptoToken] (EJB default - 1) Activated Crypto Token with id -338601433.

      Adding a
      int CommonCache<T>.getCurrentDigest(int id)
      method would allow the
      CryptoTokenSessionBean.getCryptoToken
      to compare digests right after reading the database object and refrain from trying to update the cache (and instantiate a new CryptoToken that is never used).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                johan Johan Eklund
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: