jimmycheng888 commented on issue #2170: Integrate mongodb transaction conflict 
error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2170#issuecomment-480768502
 
 
   
   
   
   
   > hi, @jimmycheng888
   > would you please push your demo-project to GitHub, let me have a try.
   
   Impossible internal company project, because it uses the features of 
mongdb4.X to support the transaction, but you can reproduce it according to the 
code configuration above, the project is the spring boot project.
   
   The reason for the abnormality is because class 
io.shardingsphere.transaction.aspect;ShardingTransactionalAspect 
   Caused by this method
   private void setTransactionManagerHandler(PlatformTransactionManager 
transactionManager) {
           
switch(ShardingTransactionalAspect.TransactionManagerType.getTransactionManagerTypeByClassName(transactionManager.getClass().getName()))
 {
           case DATASOURCE:
               this.transactionManagerHandler = new 
DataSourceTransactionManagerHandler(transactionManager);
               break;
           case JPA:
               this.transactionManagerHandler = new 
JpaTransactionManagerHandler(transactionManager);
               break;
           case UNSUPPORTED:
           default:
               throw new ShardingException(String.format("Switching transaction 
Type is unsupported for transaction manager %s", 
transactionManager.getClass().getName()), new Object[0]);
           }
   
       }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to