floyd
08-15-2007, 03:27 AM
Hi all again,
I get a error and I found it's about my NameMatchTransactionAttributeSource configuration. My configuration as following:
<object id="TransactionInterceptor" type="Spring.Transaction.Interceptor.TransactionIntercep tor, Spring.Data">
<property name="TransactionManager" ref="HibernateTransactionManager"/>
<property name="TransactionAttributeSource" ref="NameMatchTransactionAttributeSource"/>
</object>
<object id="MethodMapTransactionAttributeSource" type="Spring.Transaction.Interceptor.MethodMapTransactio nAttributeSource, Spring.Data">
<property name="MethodMap">
<dictionary>
<entry key="XYZ.Service.CategoryService.AcquireNewCategoryDraf t, XYZ" value="PROPAGATION_REQUIRED, -Exception"/>
</dictionary>
</property>
</object>
<object id="MatchAlwaysTransactionAttributeSource" type="Spring.Transaction.Interceptor.MatchAlwaysTransact ionAttributeSource, Spring.Data" />
<object id="NameMatchTransactionAttributeSource" type="Spring.Transaction.Interceptor.NameMatchTransactio nAttributeSource, Spring.Data">
<property name="NameMap">
<dictionary>
<entry key="Acquire*" value="PROPAGATION_REQUIRED, -Exception"/>
<entry key="Get*" value="PROPAGATION_REQUIRED"/>
</dictionary>
</property>
</object>
As above, I could not find any documentation about how to setting NameMatchTransactionAttributeSource, but I found that NameMatchTransactionAttributeSource need to be injected NameMap and consult to SpringFramework in Java, can be used with wildcard within.
Switching to the other two TransactionAttributeSource configurations were okay but MethodMap one is too trvial and MatchAlway one is to general.
Did I misuse?
I get a error and I found it's about my NameMatchTransactionAttributeSource configuration. My configuration as following:
<object id="TransactionInterceptor" type="Spring.Transaction.Interceptor.TransactionIntercep tor, Spring.Data">
<property name="TransactionManager" ref="HibernateTransactionManager"/>
<property name="TransactionAttributeSource" ref="NameMatchTransactionAttributeSource"/>
</object>
<object id="MethodMapTransactionAttributeSource" type="Spring.Transaction.Interceptor.MethodMapTransactio nAttributeSource, Spring.Data">
<property name="MethodMap">
<dictionary>
<entry key="XYZ.Service.CategoryService.AcquireNewCategoryDraf t, XYZ" value="PROPAGATION_REQUIRED, -Exception"/>
</dictionary>
</property>
</object>
<object id="MatchAlwaysTransactionAttributeSource" type="Spring.Transaction.Interceptor.MatchAlwaysTransact ionAttributeSource, Spring.Data" />
<object id="NameMatchTransactionAttributeSource" type="Spring.Transaction.Interceptor.NameMatchTransactio nAttributeSource, Spring.Data">
<property name="NameMap">
<dictionary>
<entry key="Acquire*" value="PROPAGATION_REQUIRED, -Exception"/>
<entry key="Get*" value="PROPAGATION_REQUIRED"/>
</dictionary>
</property>
</object>
As above, I could not find any documentation about how to setting NameMatchTransactionAttributeSource, but I found that NameMatchTransactionAttributeSource need to be injected NameMap and consult to SpringFramework in Java, can be used with wildcard within.
Switching to the other two TransactionAttributeSource configurations were okay but MethodMap one is too trvial and MatchAlway one is to general.
Did I misuse?