Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: LDAP Transactions

  1. #1
    Join Date
    Jul 2007
    Posts
    22

    Unhappy LDAP Transactions

    Hi everybody.
    I'm new in LDAP, and I've been looking for information about LDAP Transactions but I have not been successful.
    I need to use transaction with Spring to LDAP, and just I have seen the mention of the ContextSourceTransactionManager and ContextSourceAndDataSourceTransactionManager classes but I have not seen how to use them. Could somebody help me please?
    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    Landskrona, Sweden
    Posts
    505

    Default

    Have you checked the reference documentation?

    You might also want to have a look at the transaction chapter of the spring reference documentation.

    If you have any specific questions after this I'll try my best to help.
    Mattias Arthursson
    Jayway AB (www.jayway.se)
    Spring-LDAP project member

  3. #3
    Join Date
    Jul 2007
    Posts
    22

    Default

    Hi rasky

    Thanks for the url. I have already read previously the sites that you recommend.

    In the Reference Documentation I saw that the manner of update my configuration file, and my question is What are the changes that I have to do into my main class? I mean, the use of "commit" or "rollback" actions.

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I've not yet used this myself (although I am hoping to use it soon on a project), but I'd presume Mattias's point is thiat you are dealing with a transaction manager. You would therefore configure and use it in exactly the same way you would for JDBC via something like DataSourceTransactionManager.
    Last edited by karldmoore; Aug 29th, 2007 at 10:25 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  5. #5
    Join Date
    Jul 2007
    Posts
    22

    Default

    In fact, I'm a little confused. I'm following the Spring LDAP Reference Documentation, the Transaction Support topic for LDAP transactions, and I made the changes in my xml file (declarative), but my question is if I have to make changes in my code too (programatic).

  6. #6
    Join Date
    Mar 2005
    Location
    Landskrona, Sweden
    Posts
    505

    Default

    Provided you've configured it properly you shouldn't have to worry about this in your code - it all works automagically.
    Mattias Arthursson
    Jayway AB (www.jayway.se)
    Spring-LDAP project member

  7. #7
    Join Date
    Jul 2007
    Posts
    22

    Default

    Ok Mattias, thank you for all, I like that it all works automagically :-D, and How can I do tests with the rollback action? Must I handle some Exception in my code?

  8. #8
    Join Date
    Mar 2005
    Location
    Landskrona, Sweden
    Posts
    505

    Default

    You don't have to handle Exceptions specifically. The default behaviour is that the current transaction will be rolled back in the case of an Exception.
    Mattias Arthursson
    Jayway AB (www.jayway.se)
    Spring-LDAP project member

  9. #9
    Join Date
    Jul 2007
    Posts
    22

    Default

    I did all necesary in my configuration file and didn't work, I don't know why, I forced my application to fail and the roll back didn't work. I will try to do the programmatic form, but I'm in the same situation, I don't find an sample about it.
    Thanks Mattias and Karldmoore

  10. #10
    Join Date
    Jul 2005
    Location
    Helsingborg, Sweden
    Posts
    504

    Default

    Please post your configuration and we'll have a look. Use the [code][/code] tags.
    Ulrik Sandberg
    Jayway (www.jayway.com)
    Spring LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •