Chances are it's a matter of catching the errors or augmenting a logging/debugging level. Make sure you read through the documentation. And, if I'm not mistaken this is really the JPA persistence mechanism that came with Java 6.
The above statemenst are in try catch block
the above two statements executes successfully but the third one didn't get me the results ( i checked during debugging)
anyways thanks for your suggestion and i will look into the docs for jpa