mango在使用事務過程當中報找不到數據源錯誤

java.lang.IllegalArgumentException: can not find the datasource factory by name [DEFAULT], available names is [edb, db2]
	at org.jfaster.mango.datasource.DataSourceFactoryGroup.getDataSourceFactory(DataSourceFactoryGroup.java:64) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.datasource.DataSourceFactoryGroup.getMasterDataSource(DataSourceFactoryGroup.java:51) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.operator.Mango.getMasterDataSource(Mango.java:216) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.transaction.TransactionFactory.newTransaction(TransactionFactory.java:37) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.transaction.TransactionFactory.newTransaction(TransactionFactory.java:55) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.transaction.TransactionFactory.newTransaction(TransactionFactory.java:67) ~[mango-1.5.2.jar:na]
	at org.jfaster.mango.transaction.TransactionTemplate.execute(TransactionTemplate.java:52) ~[mango-1.5.2.jar:na]

解決辦法以下:(指明該事務使用的數據源)java

TransactionTemplate.execute("edb",new TransactionAction() {
			public void doInTransaction(TransactionStatus status) {....
相關文章
相關標籤/搜索