In fact, if these three objects are typically used in conjunction like this than it would probably be best to have one manager that handles the persistence for all three objects. When Matt first made AppGen to simplify the creation of the classes and files needed to do basic CRUD on an object, he initially left out the creation of managers because of this issue. Matt has stated on several occasions that most of his applications have far fewer managers than POJO's.

Nathan

Matt Raible wrote:
I would a single method in a manager to call the three DAOs you need to.

Matt

On 3/21/07, romsrini <[EMAIL PROTECTED]> wrote:

Hello,

We have a situation where we have to create new rows in three different
tables for a given user action. For example, we have to create a new row in
a message table, and using the id of that row, create new rows in a
messageComponent table and a messageRecipient table. Right now we have
managers for each of those tables (each maps directly to a model and dao
class) and our struts action makes calls to all three managers to control
the transaction.

I know there has to be a better way to do this. Either using config files or
just one method in one manager. Any suggestions would be greatly
appreciated.

Thanks,
Rom
--
View this message in context: http://www.nabble.com/Whats-the-best-way-to-create-a-transaction-spanning-multiple-tables--tf3444205s2369.html#a9604678
Sent from the AppFuse - User mailing list archive at Nabble.com.

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





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

Reply via email to