I'm currently trying to convert the XML configuration files in a project I'm working on into CodeConfig, with mixed success; I've succeeded in bringing the DbProvider config over to CodeConfig, but I'm running into trouble with the interceptors.
So here is the original xml config for my services/interceptors:
Gonna make a second post for the CodeConfig...Code:<?xml version="1.0" encoding="utf-8" ?> <objects xmlns="http://www.springframework.net" xmlns:tx="http://www.springframework.net/tx"> <!-- Spring transaction support --> <object id="TransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate32"> <property name="SessionFactory" ref="SessionFactory"/> <property name="EntityInterceptorObjectName" value="AuditInterceptor"/> </object> <object id="AttributesTransactionAttributeSource" type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data" /> <!-- Interceptors --> <object id="TransactionInterceptor" singleton="false" type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data" > <property name="TransactionManager" ref="TransactionManager"/> <property name="TransactionAttributeSource" ref="AttributesTransactionAttributeSource"/> </object> <object name="ServiceLoggingInterceptor" type="LoggingInterceptor, Services"> <property name="LogUniqueIdentifier" value="false"/> <property name="LogExecutionTime" value="true"/> <property name="LogMethodArguments" value="false"/> <property name="Separator" value=" | "/> <property name="UseDynamicLogger" value="true"/> <property name="HideProxyTypeNames" value="true"/> <property name="LogLevel" value="Info"/> </object> <object id="ServiceMethodInterceptor" type="MethodInterceptor, Services" > <property name="SessionFactory" ref="SessionFactory"/> <property name="DbSchemaManager" ref="DbSchemaManager"/> </object> <object id="AuditInterceptor" type="AuditInterceptor, Model" singleton="false"/> <!-- Service proxy template --> <object id="ServiceProxyTemplate"> <property name="isSingleton" value="false"/> <property name="isFrozen" value="false"/> <property name="interceptorNames"> <list> <value>ServiceLoggingInterceptor</value> <value>TransactionInterceptor</value> <value>ServiceMethodInterceptor</value> </list> </property> </object> <!-- Service template --> <object id="ServiceTemplate"> </object> <!-- Play service --> <object id="RealPlayService" type="PlayService, Services" singleton="false" parent="ServiceTemplate"/> <object id="PlayServicePrototypeTarget" type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop" singleton="false"> <property name="TargetObjectName"> <idref object="RealPlayService"/> </property> </object> <object id="PlayService" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop" parent="ServiceProxyTemplate"> <property name="targetName" value="PlayServicePrototypeTarget"/> </object> <!-- Security service --> <object id="RealSecurityService" type="SecurityService, Services" singleton="false" parent="ServiceTemplate"/> <object id="SecurityServicePrototypeTarget" type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop" singleton="false"> <property name="TargetObjectName"> <idref object="RealSecurityService"/> </property> </object> <object id="SecurityService" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop" parent="ServiceProxyTemplate"> <property name="targetName" value="SecurityServicePrototypeTarget"/> </object> <!-- Data Collection service --> <object id="RealDataCollectionService" type="DataCollectionService, Services" singleton="false" parent="ServiceTemplate"/> <object id="DataCollectionServicePrototypeTarget" type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop" singleton="false"> <property name="TargetObjectName"> <idref object="RealDataCollectionService"/> </property> </object> <object id="DataCollectionService" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop" parent="ServiceProxyTemplate"> <property name="targetName" value="DataCollectionServicePrototypeTarget"/> </object> <!-- Information service --> <object id="RealInformationService" type="InformationService, Services" singleton="false" parent="ServiceTemplate"/> <object id="InformationServicePrototypeTarget" type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop" singleton="false"> <property name="TargetObjectName"> <idref object="RealInformationService"/> </property> </object> <object id="InformationService" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop" parent="ServiceProxyTemplate"> <property name="targetName" value="InformationServicePrototypeTarget"/> </object> <!-- Diagnostics service --> <object id="RealDiagnosticsService" type="DiagnosticsService, Services" singleton="false" parent="ServiceTemplate"/> <object id="DiagnosticsServicePrototypeTarget" type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop" singleton="false"> <property name="TargetObjectName"> <idref object="RealDiagnosticsService"/> </property> </object> <object id="DiagnosticsService" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop" parent="ServiceProxyTemplate"> <property name="targetName" value="DiagnosticsServicePrototypeTarget"/> </object> </objects>


Reply With Quote
