Spring LDAP transactional manager
-
11-12-2019 - |
Question
I have a confusing scenario regarding transaction rollbacks with Spring.
I am successfully creating a new user, adding it to a group and assigning a role, however when I try to test the transaction rollback for exceptions such as "User already exists" I run into my issues.
So, when I try to create an existing user Spring triggers an exception and a rollback operation is started but, nothing happens and the user remains in the user list.
My question is, should I create the method for rollback, or should spring handle this on my behalf.
I have spent a good amount of time in the docs but am struggling as I'm a bit of a Spring / LDAP newbie
Thanks in advance
Ian
Solution 2
P.I.C.N.I.C - It was a config file issue in the end.. d'oh!!
OTHER TIPS
So you try to add a user that already exists.
This fails, of course.
Spring LDAP then tries to rollback all that happened before. Since the user creation is the first step of your transaction, I don't get what you expect to be rolled back.
Did I misunderstand something?