File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Transaction management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Transaction management" Watch "Transaction management" New topic

Transaction management

Raj Joe
Ranch Hand

Joined: Oct 15, 2004
Posts: 41
I have a scenerio as below

I have two data stores one is SQL Server and other LDAP.
When I insert a record in SQL Server and should also insert into LDAP.

I am calling a stored procedure to insert into SQL Server database
After that I call LDAP API to insert into LDAP
I should roll back SQL server insert??
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
yeah, if LDAP insert failed.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33125

As LDAP is a database, you should be able to use an XA driver and 2 phase commit to avoid having to do this explicitly.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Transaction management
It's not a secret anymore!