Hi, i need to publish an event after commiting a transaction.
I'm doing Something like this
[Transaction]
public void HandleObject(ObjectDTO dto)
{
MyObject myObject = GetMyObjectFromDto(dto);
transactionManager.RegisterSynchronization(new MySynchronization
(myObject))
ActOnMyObject(myObject)
}
Inside the MySynchronization i send the event through the bus After
Commit
I don't like so much having am explicit dependency on the
transactionManager and having to write this inside my code, but i
don't see another way to register my synchronization...
How may i improve this?
Gustavo.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---