aspose file tools*
The moose likes JDBC and the fly likes Transaction management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Transaction management" Watch "Transaction management" New topic
Author

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.

Steps
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134

Raj,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction management
 
Similar Threads
Attribute type/schema of LDAP Attribute
Websphere Security Caching
Case insensitive match
LDAP for Authentication
LDAP Authentication in Websphere 7