• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Spring 3 and JDO (Java Data Objects)

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where I work, we use Java Data Objects, using DataNucleus as the provider. At the outset of my project, I visited Spring in Action, and POJOs in Action, and a couple other books, to try and get up to speed. And oh, yeah, I read the JDO specifications (in shifts--I kept falling asleep!). We settled on JDO because it was 1) more mature then JPA, and 2) it works with our legacy data model with very little work-around. JPA would simply not be able to handle our data model and its old-style relationships without a HUGE amount of coding to manage the relationships.

What I had wanted to do with our app was use Spring as the transaction manager, connection manager, etc. I had two problems, however: JDO is very poorly documented and examples are quite lacking (and we had a short timeline), and I need to retrieve the database URL via a Web server (long story there, the retrieval method isn't going to change, can't have the URL statically configured in a bean, etc.). In JDO, once the PersistenceManagerFactory has been configured, certain properties are immutable. E.g., the DB URL.

So, the problem was, Spring would load the JDO beans and I couldn't set the URL that was retrieved from the Web service. What we ended up doing was creating a custom PersistenceManagerFactory wrapper that loaded all the basic properties, retrieved the URL, and instantiated the Factory. Works OK, I guess, but we would've saved some time in both coding and testing if we could've just autowired it all together.

My questions for Craig (or anybody who knows) are, does the new book have a more in-depth treatment of JDO and other persistence specifications (e.g., JPA, EJB3). And does Spring 3 provide expanded capabilities for managing JDO providers and resources, over Spring 2? And are those resources any better documented than in Spring 2.x?

I don't want to start any JDO vs. JPA discussions (EJB3 is totally out--not running in a container)--I just want to know if Spring 3 expands JDO-provider management any over Spring 3, and if the book has more in it than the last Spring in Action book I got, which had only a few pages touching JDO.

Thanks,
Matt
 
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic