Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PersistenceService

 
Florian Marquardt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI!

I have a problem!


I have got the Exception


if i tried to make this:



and when i try to do this:



i get the value null back!

What did i wrong?
Has anyone experiences with PersistenceService?

thanks a lot
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I can tell you at least what I did.

First, I set the PersistenceService as an instance variable (but that's more because I needed to use it in multiple places. Then, in my constructor for the object in question, I did:



Then, each time when I tried to use the PersistenceService, I simply tested against null first to ensure that it was initialized. It seems to work fine.

Hope that helps!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic