• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Using ORM Data Access in Spring Framework

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone!

I was wondering if anyone could point me to some simple codes along with configuration setups that uses specifically ORM data access of JPA, EntityManagerFactory, EntityManager etc. to do a database transaction in the Spring Framework. I already have some existing entity POJOs which is been used using JPA to do database transactions under the JBoss Seam Framework. I want to use those entities in the Spring Framework code. By the way do I need to have all these on an application server like to do a simple run? Or I can just execute the code with a client app?

Thanks
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Docs
http://static.springsource.org/spring/docs/2.5.x/reference/orm.html

A little old, but still valid
http://blog.springsource.com/2006/05/30/getting-started-with-jpa-in-spring-20/

Basically you configure a TransactionManager which you pass the EntityManagerFactory configuration bean, in that you include the list of Annotated beans or xml mapping files.

You also need a DataSource.

In the short and sweet version that is all you really need. You can have a persistence.xml file if you want or not.

Mark
 
Tariq Ahsan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Mark!!! I'll check out those links.
 
Tariq Ahsan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One other thing. Is it possible to get a source where I can get a sample codes specifically using JPA, EntityManager?

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic