开发者

Atomic Transactions across web services residing on same server using same database

Our architecture comprises of Web Services developed on JAX-WS specification using

Metro. These services are deployed on a single Glass Fish App server as separate war

files.All web services internally use a si开发者_运维技巧ngle database.The datatacess layer is implemented using Hibernate and Spring is used for implementing transactions inside of the service. Now when we want to do a transaction that spans across multiple web services,what approaches are possible?

  1. Do we need to use JTA or can we avoid the same ?
  2. Will we need to use the WS-AtomicTransaction specification supported by Metro?


I am answering my own question because no answers till now. However will appreciate views on the same. I feel the best architecture would be treat each web service as separate and use WS-AtomicTransactions/WS-Coodrination for transaction across web services. This will also help when some web services need to be deployed into different glassfish domains or onto different servers alltogether for performance or some other reasons. Internally these JAX-WS Metro services will use the JTA on glassfish to implement a 2PC. However thats hidden inside Metro Implementation

Vipul Shah

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜