Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1085

Add toString() method to PCState classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.0.0-beta
    • kernel
    • None

    Description

      Currently the subclasses of PCState don't implement a toString() method, so debug messages look like this:
      FINEST: NdbOpenJPAStoreManager.beforeStateChange: objectId: 1 PCState: org.apache.openjpa.kernel.PNonTransState@96a21e
      from PCState: org.apache.openjpa.kernel.PNonTransState@96a21e to PCState: org.apache.openjpa.kernel.TransientState@51e0c4

      I'd like to add toString() to these classes so the messages look like this:
      FINEST: NdbOpenJPAStoreManager.beforeStateChange: objectId: 1 PCState: PNonTrans
      from PCState: .PNonTrans to PCState: Transient

      So the toString() would return PNonTrans, or PNONTRANS or Persistent Nontransactional or some user-friendly string.

      Attachments

        Activity

          People

            clr Craig L Russell
            clr Craig L Russell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: