Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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

yet another Spring-JPA-Hibernate config question

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings all,

I have decided to upgrade a functioning standalone desktop Java/Spring3x/Hibernate3x/Maven/MySQL5x/Eclipse app from using Hibernate for my ORM to JPA2.

Here's what I've got so far

src/main/resources/ApplicationContext.xml


/src/main/resources/persistenceB.xml


ActivityCodeDAOImpl


and a simple test program


The test program belches on this line with the message


Now I know my persistence file isn't in the standard place but it =seems= to be getting found at least - changing the value of

to some other directory where the file is not will cause a FileNotFound error. So maybe there's some flaw in pu2 that causes IAE error?

I've structured my configuration this way for I plan to add support for multiple databases via multiple EntityFactories and DataSources.

So can anyone spot what I've done wrong/not done right? And are there any improvements to be made? What's the 'best-practices' zen of achieving multiple database transaction management with JPA2/Hibernate ?

TIA,

Still-learning Steve
 
    Bookmark Topic Watch Topic
  • New Topic