This week's book giveaway is in the XML and Related Technologies forum.
We're giving away four copies of Java XML & JSON and have Jeff Friesen on-line!
See this thread for details.
Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

spring transacion listener  RSS feed

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a custom transaction manager in use in most of our apps that does a bit of work in the doBegin but otherwise just defers everything to it's superclass (the spring class).  This little bit of work is necessary for an audit logging requirement.

However, we have one app that uses spring-ldap, and that transaction manager has no attribute that allows us to specify an alternate class.  So I am looking for how to get my hooks in to run my bit of code before every transaction.  The transaction manager class seems to be determined internal to sping-ldap when we make this declaration:



If there's a way other than subclassing, like registering a listener somewhere that can give us access to the jdbc connection early enough in the transaction, we can use that.  Of if someone knows how to make spring-ldap use a custom subclass, that would work.
 
Bartender
Posts: 20307
110
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um, you do realize that LDAP doesn't use jdbc, don't you? LDAP is a completely different protocol from jdbc.
 
Brian Mulholland
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Yes, but spring-ldap supports BOTH a jdbc transaction and an ldap connection that it simulates transactional control over by using an offsetting transaction when you want to rollback.  Thus it simulates an XA transactional environment even though LDAP doesn't support it.

But because our regular jdbc transactions all need this audit logging code, we want this one to have it too.  It's just proving harder to get my claws into the spring workings so that I can make it work like the jdbc one works.

If you know anything, even just a lead it might get me closer?
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!