-->
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.  [ 2 posts ] 
Author Message
 Post subject: Automatically discover JPA annotated entities in jar files
PostPosted: Mon Nov 05, 2007 10:46 am 
Newbie

Joined: Mon Nov 05, 2007 10:41 am
Posts: 3
I am using JPA and have the problem that some of my @Entity annotated classes are in jar files imported by my application and are therefore not automatically discovered and mapped when the application server (tomcat) loads the application.

What is the best way to load these classes? Do i need to add them to persistence.xml or is there any other way that they can be automatically discovered within the jar without using xml configurations.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 10:42 am 
Newbie

Joined: Mon Nov 05, 2007 10:41 am
Posts: 3
The solution (pretty obvious really) was to create persistence.xml within META-INF in the jar containing the entities.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.