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.
Um, you do realize that LDAP doesn't use jdbc, don't you? LDAP is a completely different protocol from jdbc.
An IDE is no substitute for an Intelligent Developer.
posted 3 weeks ago
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