1 2 Previous Next 18 Replies Latest reply on Dec 13, 2008 8:19 AM by adamw

    Envers future...

    dyahav

      Hi,
      I'm considering to adopt the Envers mechanism for my application and I want to know what is the road map for this great project.
      Are the full three inheritance strategies going to be supported?
      Thanks!!
      dyahav

        • 1. Re: Envers future...
          adamw

          Hello,

          yes, certainly.
          The 1.1 release will cover persistent collections.
          The 1.2 release will cover inheritance.
          Right now, the single-table strategy works. User morman reported some problems with the joined strategy: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175511#4175511. But I hope that the problems will be possible to overcome :).

          I don't think there's a JIRA issue for that, so please create it :).

          --
          Adam

          • 2. Re: Envers future...
            morman

             

            "adamw" wrote:
            I don't think there's a JIRA issue for that, so please create it :).


            Create JIRA for unsupported joined-inheritance strategy? :)

            Could you estimate time when 1.1, 1.2 releases will be released? :)

            • 3. Re: Envers future...
              adamw

              Hello,

              yes, for the joined and table-per-class strategy. (You can attach a patch there also, if you have one ready ;) )

              The releases are visible also in JIRA; I'd like to release 1.1.ga in the beginning of october and 1.2.beta1 towards the end. But these are just estimation, it can be sooner or later :).

              Adam

              • 4. Re: Envers future...

                I almost jumped for joy when I saw this project. However, my application relies heavily on joined and table-per-class strategy.

                What is the status of these items?

                I am posting a ref to this project on the Seam list because I read all the posts there and have never seen one for this.

                • 5. Re: Envers future...
                  adamw

                  Well, they're first on the list for being developed, but I'm short of time currently, so ... whenever I have time or when someone contributes a patch for this :)

                  Adam

                  • 6. Re: Envers future...
                    adamw

                    Hello,

                    it turned out that adding support for table-per-class inheritance is easy, so I added that to trunk.

                    "joined" can pose some difficulties however.

                    --
                    Adam

                    • 7. Re: Envers future...
                      adamw

                      Hello,

                      I got some time this weekend and it turned out that joined wasn't that hard, I had almost all of the code written ;) It's in trunk, and if you've got time, please test :).

                      --
                      Adam

                      • 8. Re: Envers future...

                        Where can I download the table-per-class / joined version? I searched, checked out your blog, and looked here: http://www.jboss.org/envers/downloads/

                        Thanks,
                        Dave

                        • 9. Re: Envers future...

                          Never mind. I found the source trunk. Thanks.

                          • 10. Re: Envers future...
                            adamw

                            Hello,

                            on http://www.jboss.org/envers/ you'll also find an uploaded jar of the hibernate-envers module (should work fine with Hibernate 3.3)

                            --
                            Adam

                            • 11. Re: Envers future...

                              I am running on Jboss 4.2.3, Seam, 2.1, and Hibernate 3.3, with table-per-class and joined mapping I going to try your preview version now.

                              Thank Adam!

                              • 12. Re: Envers future...
                                adamw

                                Ok, hope it will work well :)

                                --
                                Adam

                                • 13. Re: Envers future...

                                  Adam,

                                  I found one thing I don't quite understand. I have a MappedSuperClass, which is subclassed by several entities. The MappedSuperClass has an embeddable object set, defined by @CollectionOfElements and @JoinTable.

                                  @MappedSuperclass
                                  public abstract class AbstractSystemEntity {
                                  ...
                                  @CollectionOfElements
                                  @JoinTable(name="systemcomponent", joincolumns = @JoinColumn(name="system_id"))
                                  private Set components;
                                  ...
                                  }

                                  @Embeddable
                                  public class ComponentObject implements Serializable{
                                  ...
                                  }


                                  After reading the docs and some trial and error, I assume that under the current Envers (preview), that I need to promote the object to and entiry and change the annotations to @OneToMany and @AuditJoinTable.

                                  Is this correct?

                                  Dave

                                  • 14. Re: Envers future...

                                    More info... I converted the embeddable to an entity, and switch to @OneToMany and used @AuditJoinTable, but then I get an exception from Envers...

                                    Caused by: org.hibernate.HibernateException: could not init listeners
                                    at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
                                    at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1338)
                                    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
                                    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:854)
                                    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
                                    ... 164 more
                                    Caused by: java.lang.NullPointerException
                                    at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addValueToMiddleTable(CollectionMetadataGenerator.java:380)
                                    at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addWithMiddleTable(CollectionMetadataGenerator.java:303)
                                    at org.hibernate.envers.configuration.metadata.CollectionMetadataGenerator.addCollection(CollectionMetadataGenerator.java:152)
                                    at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:136)
                                    at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:155)
                                    at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:343)
                                    at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:96)
                                    at org.hibernate.envers.configuration.AuditConfiguration.(AuditConfiguration.java:86)
                                    at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
                                    at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:232)
                                    at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
                                    at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
                                    at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:1
                                    94)
                                    ... 168 more

                                    1 2 Previous Next