[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-712) Maven pom.xml should (in time) depend on javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence

Emmanuel Bernard (JIRA) noreply at atlassian.com
Tue Mar 18 18:01:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29830 ] 

Emmanuel Bernard commented on ANN-712:
--------------------------------------

If you look at the history of ejb3-persistence and javax.persistence, they have not always been aligned. And yes there were TCK issues, ask Shelly.

Think about it, what will we do the minute we start implementing JPA 2? Change the dependency from javax.persistence to org.hibernate then move back once java.net catches up? What if a TCK bug is blocking us, should we wait for weeks for java.net to catch up as well?

Yes in a perfect pink world full of should have would have, we would use this package. But reality is different.

> Maven pom.xml should (in time) depend on javax.persistence:persistence-api instead of org.hibernate:ejb3-persistence
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: ANN-712
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-712
>             Project: Hibernate Annotations
>          Issue Type: Task
>    Affects Versions: 3.3.1.GA
>            Reporter: Geoffrey De Smet
>            Priority: Minor
>
> Now it's possible to get the same classes (for example javax.persistence.Entity) twice in the classpath:
> - one from persistence-api-1.0.jar
> - and another from ejb3-persistence-1.0.1.GA.jar.
> Mix that with classloaders and you get bugs like A extends B but an A is not instance of B (because B.class is loaded twice from different jars). Otherwise you can get this too, but if the groupId:artifactId match, maven deals with it.
> In theory, replace:
>                 <dependency>
> 			<groupId>org.hibernate</groupId>
> 			<artifactId>ejb3-persistence</artifactId>
> 			<version>1.0.1.GA</version>
> 		</dependency>
> with:
>             <dependency>
>               <groupId>javax.persistence</groupId>
>               <artifactId>persistence-api</artifactId>
>               <version>1.0</version> <!-- FIXME -->
>             </dependency>
> It looks like org.hibernate:ejb3-persistence is just a copy of javax.persistence:persistence-api, but with a hot-fix applied to it:
> probably because javax.persistence:persistence-api:1.0.1 isn't deployed to the central repo yet.
> So the JCP might need to be poked to put javax.persistence:persistence-api:1.0.1 on the central repo :) Which is probably not an easy thing to do...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list