Announcement Announcement Module
Collapse
No announcement yet.
TwoPhaseCommit Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TwoPhaseCommit

    Hi,
    - I have two datasources(SQLServer and Oracle9i)
    - Using XA Datasources for both SQLServer and Oracle9i;
    - Using jta as transaction management
    - Using websphere appserver 5.1
    - using spring+hibernate(using getHibernateTemplate() in HibernateDAO)

    I call a method which is defined as PROPOGATION_REQUIRED
    and which inserts records into two tables which were reside in SQLServer and Oracle9i.

    When I start the application and call the method, it works fine. But after some time passes like 1 hour, calling the same method behaves abnormally. It inserts the record into SQLServer but doesn't insert into Oracle 9i. I didn't get an exception. Shouldn't the operations inside this method be rolledbacked if something happens in one datasource. What might be happened? How can I guarantee commit?

    Thanks in advance...

  • #2
    Are you saying that when the method is initially used, data gets inserted into both DBs, but later, only into SQL Server?

    Yes, if you are using two XA compatible jdbc drivers, datasources, and databases, a failure in one should rollback the other. But regardless of whether the rollback worked, you should have some sort of indication of a failer. If you are seeing no error in the log, then you are either not logging properly, or there is in fact no error and the issue is not that simple, i.e. things are not what you think they are. Unfortunately there's not really any information at a detailed enough level for me to have an idea as to what could be going on...

    Comment

    Working...
    X