Bookmark Topic Watch Topic
  • New Topic

maintaining transaction while updating two different databases

 
Anand Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
posted Yesterday 16:48 GMT+0100 (GMT Standard Time)
I am listing down my requirement. Please advise me on how to achieve the desired functionality.

I have two database systems. One is of a ERP package hosted on JBOSS and other is a standalone database with UIs to change data using ejb hosted on Oracle application server. Now the requirement is that whenever I make any change in the stand alone database through its UIs it should be updated in the ERP package in the same transaction boundary and if it is not updated in any one of them the full transaction should be roll-backed. The ERP package has provided APIs to access its database and directly accessing the database is not advisable. Same should be done when I am making any change in the ERP database through its apis same should be replicated in the Standalone database in the same transaction. How should I ensure transaction completeness in this case?
Various options I am looking at are-
1. Invoking the apis of ERP and ejbs of standalone database through web services. Not sure how transaction can be managed through this.
2. Exposing ejbs across ERP database and then invoking both the ejbs together using JTA to ensure transaction completeness.

Other problem is that when I am making the change through the ERP I have to update its database through its provided apis only and I will be inside the JBOSS transaction boundary.
Please guide me on how to achieve this.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
"andyjhs andyjhs", please check your private messages.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Anand,

Welcome to javaranch. Please do not cross post the same question in different forums.
Let us continue the discussion on this duplicate thread.
 
    Bookmark Topic Watch Topic
  • New Topic