-->
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: Persistence.xml and J2SE
PostPosted: Tue Aug 25, 2009 4:57 am 
Newbie

Joined: Wed Nov 15, 2006 8:51 am
Posts: 12
Hi all,

I have a question on setting the persistence.xml
since I'm not using a J2EE container, I must config the <class>xxx.yyy.SomeEntityClass</class>

but the question is... if I have 100s of such entity classes... I need to setup 100s of lines of <class>xxx.yyy.zzz</class> ???

are there any shortcuts? such as wildcards or just identify the Java Package containing the entities???

any idea would be appreciated~

thx~


Top
 Profile  
 
 Post subject: Re: Persistence.xml and J2SE
PostPosted: Tue Aug 25, 2009 7:25 am 
Beginner
Beginner

Joined: Wed Jul 09, 2008 5:34 am
Posts: 41
Location: Brno, Czech Republic
If they are all in the same package, try using <class>xxx.yyy</class>


Top
 Profile  
 
 Post subject: Re: Persistence.xml and J2SE
PostPosted: Tue Aug 25, 2009 8:15 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Hibernate Tools has some facilities for creating these types of files, but, if that doesn't fit your needs, well, yes, it sounds like alot of work!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Re: Persistence.xml and J2SE
PostPosted: Tue Aug 25, 2009 10:24 am 
Newbie

Joined: Wed Nov 15, 2006 8:51 am
Posts: 12
Cameron McKenzie wrote:
Hibernate Tools has some facilities for creating these types of files, but, if that doesn't fit your needs, well, yes, it sounds like alot of work!


ya, indeed.

and <class>xxx.yyy</class> <-- assume xxx.yyy is a package... it doesn't work "ClassNotFoundException"


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.