Hi,
Have a question as to handling transactions across a CoreSession and a
Directory Session.
If I have the following (pseudo-code):
1. try {
2. coreSession = getCoreSession()
3. coreSession.createDocument(documentA)
4. directorySession = directoryService.open(mydirectory)
5. directorySession.createEntry(entry1)
6. directorySession.commit()
7. coreSesson.createDocument(documentB)
8. coreSession.save()
9. } catch {
10. TransactionHelper.setTransactionRollbackOnly()
11.}
Now if line 7 throws an Exception, how is one meant to roll-back the
directory commit of line 5 as the setTransactionRollbackOnly on line 10?
Or by design, are directory sessions isolated?
(I am running within 5.4.2-tomcat)
Thanks and regards,
Sean
--
Dr. Sean Radford, MBBS, MSc
http://www.tacola.com/
http://www.tacolaecm.com/
t: +44 (0)845 KEY HELP
t: +44 (0)845 539 4357
m: +44 (0)7802 24 24 86
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/