1 Reply Latest reply on Sep 18, 2007 11:35 AM by Jonathan Halliday

    Problems with distributed transactions!

    conrad braganza Newbie


      I am working on an app that is very loosly coupled and it talks to other applications via well defined interfaces. These applications in turn are the same and use distinct data source typical such appicaions are authentication, common and other internal apps. We tried using XA datasources with oracle. Howver it would always fail at XAResource manager or could not initiate transaction in meta aware object!. After a lot of googling and searching online forums the only thing I could conclude is that the XA server was not enabled. We decided to use local transactions. However things seem to work only with local transaction or if we had a local method that that was not bound to a local transaction but used a remote interface that had propogation required/readonly attributes set. If we wrapped a local method within a transaction and that method invoked a call to an application that was wrapped in a transaction with propagation required set then it would fail with the error could not get connection n down the stack trace could not initiate transaction on meta aware object. The follwoing senior is an example a local method A has propagation required defined. The local method A invkokes a remote B api call. This remote method B does a remote read a local read and if things are ok a local write and is warapped with a transaction with attributes propagation required. The method A executes fine until the switch to B where it fails at a remote read. I tried setting the transaction in B to Requires_new then the remote read in B suceedees but subsequent local read and write fails. Is it better to split the transaction so that A is split into A and A.1 where A does a local transaction an A.1 has no local transaction defined and directly calls B. In a similar fashion B is also split or is it better to leave things as they are and get XA transactions works. Any advice would be better appreciated. There is very little help with XA transactions. All the other applcations are hosted on the same jboss server. However I use he term remote in terms of the current application context (The current being local) since each application use different datasources and are mapped to different database instances which maybe on the same oracle server or different oracle server.