You could write something like a
JDBC Driver/Connection, and support all the transactional behavior of JDBC. Then you could connect to it via a datasource and the container would know how to talk to it. You'd need to do some sort of translation between LDAP and JDBC, including support of an sql-like language. Qutie a lot of work.
I am not too familiar with JCA, but you might also be able to make your LDAP thingy a JCA adapter. Not sure about this.
The problem is that you need some way to interact with the transaction via the container. That means you have to get some kind of callbacks from the transaction manager.
No matter how you implement things, in order to support the transactional behavior you will have to maintain some state somewhere to remember the things that happened during the transaction. Why not let the container manage this for you with a Stateful Bean. As for clustering, the container is supposed to support that for you if you stick with supported APIs.
Without container support (like a stateful bean), you will need to write a lot of transaction code plus the state management code plus whatever you might need to support clustering (possibly appserver specific). There's probably more to it than that. Why not let the container help you with the supported SessionSynchronization API?