Hello

D&J Gredler a écrit :
I haven't used EntityManagers directly, but your code looks fine to me,
especially if it works ;-)
You may want to wrap your flush( ) call in a try/catch block in case
something goes wrong, and roll back the transaction in the catch block.
It works, but I've made change because I've got only one EntityManager for all the application. In Toplink's examples I see that the create an EntityManager each time they make a query. So I've change flush() to merge(this_product) because object was "detached" ...
Sorry, I'm not very clear ...

Once you get more comfortable with things (and if you're using Hibernate),
you may want to check out some of the integration packages (Tapernate,
Honeycomb, etc) that handle transaction scoping for you.
hmmm... Which scope ?
I could not imagine what they do. I'm to beginner with Java & Co.
Please, can you explain me a beat what a package like Tapernate or Honeycomb will do.

For da moment I'm using JPA (TopLink Essential).

Spring might also
be a good option if you end up splitting your app up into presentation /
service / persistence layers.
At the beginning of my exploration, I've try Spring with Tapestry and I did not see what it will bring to me more than Hivemind. Perhaps because I only the the object injection, and not other things that Spring bring to us.

Thanks for you support ;o)
Cyrille



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to