-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: javax.persistence.PersistenceUtil
PostPosted: Sat Mar 29, 2008 11:24 am 
Beginner
Beginner

Joined: Tue Sep 02, 2003 9:28 pm
Posts: 25
I just upgraded to Hibernate Annotations 3.3.1.GA and EntityManager 3.3.2.GA and I noticed that in ejb3-persistence.jar there is a new class named javax.persistence.PersistenceUtil. This class isn't specified in the JPA specification (at least from what I see) and it looks like its api (at least partially) is similar to javax.persistence.Persistence.


I didn't expect ejb3-persistence.jar to change. The reason I'm asking is that I have a project with a class named PersistenceUtil and I'm now getting collisions since both packages are imported throughout the project. Before I rename my PersistenceUtil I was wondering what the story is behind javax.persistence.PersistenceUtil.

-Jay


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 12:22 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

I cannot tell you were this class comes from, but why do you use the javax.persistence package anyway? I would recommend renaming at least your package. Generally I would stay away from using javax or java as package prefix. Provided the packages differ there should be no problem anymore with two PersistenceUtil classes.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 12:34 pm 
Beginner
Beginner

Joined: Tue Sep 02, 2003 9:28 pm
Posts: 25
Sorry, my PersistenceUtil class is in my own package, not javax.persistence. The collision occurs because my code imports my package and javax.persistence. I either have to rename my class or fully qualify my use of it.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 6:00 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
javax.persistence.PersistenceUtil is a mistake on my side. The latest maven version should have it fixed

http://repository.jboss.org/maven2/org/hibernate/ejb3-persistence/1.0.2.GA/

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.