Hi Mr. Shin!

In this opportunity i write you to ask you about how to do the persistence 
using DAO pattern (like we used in J2EEHomework-hibernatebasics - Lab 3514), 
but when interpose several entities in ONE transaction (which respective dao 
interfaces are in different scopes). To make myself more clear i propound the 
following example:

When is neccesary to process a workorder and generate the corresponding bill 
(only if the workorder was successfully updated). Using DAO Pattern this will 
be like this:

    ...
    order.setState("processed");
    workrorderDao.update(order);
    billDao.create(billFromOrder);
    ...

It is possible that (obviously because they are in different transaction by 
using DAO, thereby different sessions) that one gets processed and not the 
other (e.g. because it was throw an execption), which should not happen.

In the example above i make an update and an insert, but the idea is to know 
how to do this with other scenes (deleting and updating, etc.).


Thanks in advance!

Federico Miralles
Mendoza, ARGENTINA

P.S.: sorry my english :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to