-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problems with distributed transactions!
PostPosted: Sat Sep 22, 2007 10:47 pm 
Newbie

Joined: Sat Sep 22, 2007 10:01 pm
Posts: 1
Hibernate version: 3

Spring 2 with spring JTA transaction manager

[c] Java 1.5 [/c]

[d] Oracle 9g with XA enabled [/d]

Hi,

We have 4 lossely coupled applications that are independent except that at certain points they provide services or use services of other applications. Every application has its own database schema and uses a seperate session factory defined in its own application context. The business methods are wrapped by transactions with taget= PROPAGATION_REQUIRED. We use spring JTA transactions.The different datasources uses XA datasources. The problem that we are having is that if we invoke services of an application that uses a single datasource i.e. is own everything works fine. But if we try to invoke a service that makes calls to other applications and therefore span multiple datasources the transaction is inititated in the caller but at the point where a call to a read/write is involved to another datasource the transaction does not propagate and we get an error "could not invoke transaction on meta ware object"--And the stack trace shows problem at OracleXAResourceManager could not start transaction. I dont know if enabling xid in jboss will serve the problem or whether we are using XA transactions propely. Our oracle server is XA enabled. We tried to switch to local datasorces and we have the same problem. Im certain that if there was only one schema and one datasource PROPAGATION_REQUIRED would have worked. Im not soure how to solve this promblem. I tried googling and came up with almost nothing. It seems to me that most people prefer to seperate the transaction boundaries instead of using distributed transactions and use something like a command pattern for undo/rollback. This means that they seperate the methods instead of having one monolethic method that spans multiple datasources. However I would like to have a go at XA datasources and distributed transactions.

Regards,
Conrad


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.