-->
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.  [ 6 posts ] 
Author Message
 Post subject: Using Spring with Hibernate-JPA ?
PostPosted: Sun Aug 30, 2009 12:12 am 
Newbie

Joined: Sun Aug 30, 2009 12:07 am
Posts: 9
Hey Guys,

I am exploring Spring with hibernate-JPA.I understand some basics.I have questions regarding configuration files.

How does Persistence.xml fit in with applicationContext.xml(Spring config file).
Is there any good tutorial with respect to configuring Spring and Hibernate-JPA.

Any details on this would be greatly appreciated.

Thanks !
Deepak.


Top
 Profile  
 
 Post subject: Re: Using Spring with Hibernate-JPA ?
PostPosted: Sat Sep 05, 2009 9:15 pm 
Newbie

Joined: Sun Aug 30, 2009 12:07 am
Posts: 9
Guys,

I got the Hibernate-JPA stuff working with Spring.Let me know if you need any help!

Thanks,
DS.


Top
 Profile  
 
 Post subject: Re: Using Spring with Hibernate-JPA ?
PostPosted: Sun Sep 06, 2009 11:51 pm 
Newbie

Joined: Fri Sep 04, 2009 10:04 am
Posts: 10
can you that link or reference with me


Top
 Profile  
 
 Post subject: Re: Using Spring with Hibernate-JPA ?
PostPosted: Mon Sep 07, 2009 12:42 am 
Newbie

Joined: Sun Aug 30, 2009 12:07 am
Posts: 9
Mahesh,

Let me know what you need? I dont have any particular article or link.I read through lot of articles..didnt find any complete description.
I am thinking of writing a blog on this so that more ppl can benefit.

Thanks,
DS.


Top
 Profile  
 
 Post subject: Re: Using Spring with Hibernate-JPA ?
PostPosted: Mon Sep 07, 2009 3:03 am 
Newbie

Joined: Fri Sep 04, 2009 10:04 am
Posts: 10
I have one doubt here,

While working with JPA I created persistence.xml and I mentioned all my mapping classes in it, my application has created the tables for what ever I have given in peristence.xml , all my mapping classes are annotated with @Entity . I thought that the tables were created based on the entries that we have defined in persistence.xml, but when I removed the entries of some of the classes, then also those tables are getting created , but when I commented the annotation @Entity for what ever the classes that I want to ignore , then those tables are not created. So what my doubt is , even though tables are created with out giving their entries in the persistence.xml by giving @Entity annotation on classes, what should be the use of providing entity classes in to persistence.xml


Top
 Profile  
 
 Post subject: Re: Using Spring with Hibernate-JPA ?
PostPosted: Mon Sep 07, 2009 12:08 pm 
Newbie

Joined: Sun Aug 30, 2009 12:07 am
Posts: 9
Mahesh,

I am new to Hibernate and JPA as well.So I may not know all the aspects.
However As I understand Persistence.xml defines all the entities which needs to be managed by Hibernate.This is analogous to Hibernate mapping files (hbm files - used in case of no annotations).This just defines the relationship between different entities and hence tables in DB.These annotated classes tell hibernate how and what to persist.

I am/wasnt aware that you could create tables through defining entities in Persistence.xml.
I created my tables on my own however I am able to persist data in DB.

Thanks,
Deepak.


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