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

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.1
    • None
    • Hibernate
    • None
    • Release Notes
    • Workaround Exists
    • Hide

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

      Show
      A workaround is to make these queries not cacheable for now.
    • 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. .
    • 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();

      Attachments

        Activity

          People

            shaozliu Strong Liu(刘少壮) (Inactive)
            shaozliu Strong Liu(刘少壮) (Inactive)
            Misty Stanley-Jones Misty Stanley-Jones (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: