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

HHH-4011 ChainedPropertyAccessor is not serializable, which breaks caching to disk and replicated caches.

    XMLWordPrintable

    Details

    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      A workaround is to make these queries not cacheable for now.

      Show
      A workaround is to make these queries not cacheable for now.
    • Release Notes Text:
      Hide
      ChainedPropertyAccessor was used by AliasToBeanResultTransformer. ChainedPropertyAccessor was not serializable. Therefore, any cacheable queries using AliasToBeanResultTransformer broke during cache replication. For example, this query could not be replicated or cached to disk:

      session.createQuery("select foo").setResultTransformer(new AliasToBeanResultTransformer(SimpleCount.class)).setCacheable(true).list();

      The behavior of AliasToBeanResultTransformer has been changed. When the AliasToBeanResultTransformer is created/deserialized, it recreates the ChainedPropertyAccessor instance according to the cached resultClass. Cacheable queries using AliasToBeanResultTransformer continue to work during cache replication.




      .
      Show
      ChainedPropertyAccessor was used by AliasToBeanResultTransformer. ChainedPropertyAccessor was not serializable. Therefore, any cacheable queries using AliasToBeanResultTransformer broke during cache replication. For example, this query could not be replicated or cached to disk: session.createQuery("select foo").setResultTransformer(new AliasToBeanResultTransformer(SimpleCount.class)).setCacheable(true).list(); The behavior of AliasToBeanResultTransformer has been changed. When the AliasToBeanResultTransformer is created/deserialized, it recreates the ChainedPropertyAccessor instance according to the cached resultClass. Cacheable queries using AliasToBeanResultTransformer continue to work during cache replication. .
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      http://opensource.atlassian.com/projects/hibernate/browse/HHH-4011
      ---------------
      ChainedPropertyAccessor is used by AliasToBeanResultTransformer. Since ChainedPropertyAccessor is not serializable any cacheable queries using AliasToBeanResultTransformer break during cache replication.

      For example, this query cannot be replicated or cached to disk:

      session.createQuery("select foo").setResultTransformer(new AliasToBeanResultTransformer(SimpleCount.class)).setCacheable(true).list();

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                stliu Strong Liu
                Reporter:
                stliu Strong Liu
                Writer:
                Misty Stanley-Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: