[jboss-jira] [JBoss JIRA] Commented: (AS7-928) integrate hibernate-envers

Scott Marlow (JIRA) jira-events at lists.jboss.org
Sat Jun 4 12:38:59 EDT 2011


    [ https://issues.jboss.org/browse/AS7-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606478#comment-12606478 ] 

Scott Marlow commented on AS7-928:
----------------------------------

Well, org.hibernate.infinispan is covered in as7/build/build.xml.  Your right, that could of been its own module but probably wouldn't ever be directly referenced by anything else besides the org.hibernate module.

It seems that Envers will be referenced directly by applications.  The customer application (module) could also add a dependency on the Envers module and for that reason, having it be its own module, makes sense.  The alternative would be to have the org.hibernate module export the envers (so that modules that depend on org.hibernate also see envers classes).

I would create the envers module as planned.

Sure, also create a hibernate-tools module.  Only the envers module will depend on it.

By the way, I noticed some errors in the current org.hibernate module and have a commit pending for resolving that (removing cglib and some other dependencies).

A good resource for modules in general (IMO) is here http://community.jboss.org/wiki/ModuleCompatibleClassloadingGuide.

Keep in mind that each module has its own classpath (classloader) and that you are specifying what will be resolvable from that module.  You will create the org.hibernate.envers module.  When we add a org.hibernate.envers dependency to org.hibernate, that means the hibernate classloader will have access to the envers module classloader.

Take your best shot, commit it to your repo and have me review it (we can discuss further changes then, including a unit test).  Thanks for helping!  :)


> integrate hibernate-envers
> --------------------------
>
>                 Key: AS7-928
>                 URL: https://issues.jboss.org/browse/AS7-928
>             Project: Application Server 7
>          Issue Type: Feature Request
>          Components: JPA / Hibernate
>            Reporter: Strong Liu
>            Assignee: Strong Liu
>             Fix For: 7.0.0.CR1
>
>
> hibernate-envers now is part of hibernate-core, which provides auditing/versioning function for entities.
> it is well used by the hibernate community, so AS 7 should (consider) integrate it.
> thanks to org.hibernate.integrator.spi.Integrator, envers can be automatic enabled if the user's application has @Audit annotation and envers jar is on the classpath with hibernate-core. (which also means application classloader needs to see envers class)
> p.s. i'm setting the fix version to 7.0.0.CR1 here, just because i'd really like it goes into this release, and i would like help as much as i can to make it happen, but feel free to remove it if this can't happen :)
> Steps to complete task:
> 1.  Create a "org.hibernate.envers" module by creating a module.xml in as7/build/src/main/resources/modules/org/hibernate/envers/main.
> To get an idea of what this looks like, first see as7/build/src/main/resources/modules/org/hibernate/main/module.xml contents and model the new module after one of the current modules listed there (perhaps org.javassist).  org.javassist is in as7/build/src/main/resources/modules/org/javassist/main).  
> 2.  Update as7/build pom.xml and build.xml for envers
> 3.  Update as7/pom.xml adding in version information for the new artifact (should be able to use Hibernate version def unless envers has its own version)
> 4.  If you build AS7, the envers jars should end up in as7/build/target/jboss-7.0.0.Beta4-SNAPSHOT/modules
> 5.  Next, add the "org.hibernate.envers" dependency to the "org.hibernate" module (in as7/build/src/main/resources/modules/org/hibernate/main.xml)
> I'll add further steps for adding a unit test after you reach this far.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list