Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

LDAP Transaction / Java / RDBMS

Thread view: 
75blured@gmail.com - 30 Jan 2006 16:37 GMT
Hi,

Do you know if there is any way to use transaction between a RDBMS
backend like Oracle or MySql & an OpenLDAP directory ? Indeed, I've got
a process which make some updates on Database1 then on LDAP then on
Database2. So, if the LDAP update fails then the Database1 data should
be rollbacked. And if the Database2 fails the ldap update should be
rollbacked.

The commit should be done only if DB1, LDAP and DB2 updates are OK. So,
it really looks like 2PC transaction. However, the fact is the
transactions are supported only on RDBMS or JMS queues. The LDAP does
not support transactions of that sort.

I've looked on forums however don't find any solutions. I found the
ldapjdbc bridge driver from Novell / openLDAP, however it doesn't
support transaction at all cause it wraps a LDAPConnection from JLDAP
which wrap a connection from standard LDAP which doesn't natively
support those transactions.

Another clue is to develop a XAResource by hand, but this seems
overcomplicated.

Does anybody here already have done this stuff ?

Regards,
blured75.
Raymond DeCampo - 30 Jan 2006 18:20 GMT
> Hi,
>
[quoted text clipped - 20 lines]
>
> Does anybody here already have done this stuff ?

Unfortunately I think you pretty much have it covered.  My impression is
that most LDAP interaction is read-only (at least from a J2EE
application) so I don't think there will be a clamor for this anytime soon.

If you find anything, let us know.  It might be a good open source
project to start as well...

Ray

Signature

This signature intentionally left blank.

75blured@gmail.com - 01 Feb 2006 10:03 GMT
I think I found something but it is not really lightwight... However it
seems to work (in theory). I'm just testing it. The idea is to use an
Application Server and use Session Statefull EJB, and implement the
SessionSynchronization interface
(http://jonas.objectweb.org/current/doc/PG_Session.html) which have
hook methods called when the container launch a transaction (prepare),
commit and after commit. In that way it should be possible to use those
methods to implements rollback capability in external DB for example. I
don't really know for the moment which will be the behaviour in
clustered environnement neither with lot of users cause a user using a
Session Statefull = one instance of Session Statefull in memory. If 2
peoples are working on the same data, how will the data consistency be
?

see you.

blured75.
slippymississippi@yahoo.com - 01 Feb 2006 11:49 GMT
http://swik.net/penrose

Penrose (currently at revision 0.9) sits on top of ApacheDS (also
currently at revision 0.9).  ApacheDS offers the LDAP interface,
Penrose server connects it to your database.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.