如果两个不同domain下的WebLogic Server同名,在进行事务传播的时候会出现以下问题:
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
When the transaction attibutes are Required on both sides,
I get the following error
javax.transaction.TransactionRolledbackException: Current server is the coordinator and transaction is not found. It was probably rolled back and forgotten already.
at weblogic.rjvm.ResponseImpl.unmarshalReturn(Respons eImpl.java:195)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(C lusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(C lusterableRemoteRef.java:252)
修改为不同Server名,则运行正常。
具体原因,查找中。。。
====================
具体原因已经查明,参见了WebLogic的官方文档《Programming WebLogic JTA Release 10.0》第35页,关于跨Domain JTA事务的局限描述:
The domains and all participating resources must have unique names. That is, you cannot
have a JDBC data source, a server, or a domain with the same name as an object in another
domain or the domain itself.