+ ///
+ /// <!-- actual objects 'calculatorService' and 'simpleCalculatorService' are defined elsewhere -->
+ ///
+ /// <!-- Define the component for exporting 'calculatorService' -->
+ /// <object id="calculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter,
+ /// Spring.Services">
+ /// <property name="TargetName" value="calculatorService" />
+ /// <property name="TypeAttributes">
+ /// <list>
+ /// <object type="System.EnterpriseServices.TransactionAttribute, System.EnterpriseServices" />
+ /// </list>
+ /// </property>
+ /// <property name="MemberAttributes">
+ /// <dictionary>
+ /// <entry key="*">
+ /// <list>
+ /// <object type="System.EnterpriseServices.AutoCompleteAttribute, System.EnterpriseServices" />
+ /// </list>
+ /// </entry>
+ /// </dictionary>
+ /// </property>
+ /// </object>
+ ///
+ /// <!-- Define the component for exporting 'simpleCalculatorService' -->
+ /// <object id="simpleCalculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter,
+ /// Spring.Services">
+ /// <property name="TargetName" value="simpleCalculatorService" />
+ /// </object>
+ ///
+ /// <!-- Export components into assembly and autoregister with COM+ -->
+ /// <object type="Spring.EnterpriseServices.EnterpriseServicesExporter, Spring.Services">
+ /// <!-- assembly name to generated - will generate 'Spring.Calculator.EnterpriseServices.dll' -->
+ /// <property name="Assembly" value="Spring.Calculator.EnterpriseServices" />
+ ///
+ /// <!--
+ /// use Spring's ContextRegistry for managing services. If true, requires a file
+ /// 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' containing a
+ /// <spring/context /> section placed next to the generated assembly.
+ /// -->
+ /// <property name="UseSpring" value="true" />
+ ///
+ /// <property name="ApplicationName" value="Spring Calculator Application" />
+ /// <property name="ActivationMode" value="Library" />
+ /// <property name="Description" value="Spring Calculator application" />
+ /// <property name="Components">
+ /// <list>
+ /// <ref object="calculatorComponent" />
+ /// <ref object="simpleCalculatorComponent" />
+ /// </list>
+ /// </property>
+ /// </object>
+ ///
+ ///
+ /// <-- -->
+ /// <spring>
+ /// <context>
+ /// <resource uri="Config/services.xml" />
+ /// </context>
+ /// </spring>
+ ///
+ /// This file should point to the service object definitions you exported using
- /// internal class SpringServicedComponent
- /// {
- /// protected delegate object GetObjectHandler(ServicedComponent servicedComponent, string targetName);
+ /// internal class SpringServicedComponent
+ /// {
+ /// protected delegate object GetObjectHandler(ServicedComponent servicedComponent, string targetName);
///
- /// protected static readonly GetObjectHandler getObjectRef;
+ /// protected static readonly GetObjectHandler getObjectRef;
///
- /// static SpringServicedComponent()
- /// {
- /// // first look for a local copy
- /// System.Reflection.Assembly servicesAssembly;
- /// string servicesAssemblyPath = Path.Combine(
+ /// static SpringServicedComponent()
+ /// {
+ /// // first look for a local copy
+ /// System.Reflection.Assembly servicesAssembly;
+ /// string servicesAssemblyPath = Path.Combine(
/// new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName
/// , "Spring.Services.dll" );
- /// servicesAssembly = System.Reflection.Assembly.LoadFrom(servicesAssemblyPath);
- /// if (servicesAssembly == null)
- /// {
- /// // then let the normal loader handle the typeload
- /// servicesAssembly = System.Reflection.Assembly.Load("Spring.Services, culture=neutral, version=x.x.x.x, publicKey=xxxxxxxx");
- /// }
- /// Type componentHelperType = servicesAssembly.GetType("Spring.EnterpriseServices.ServicedComponentHelper");
- /// getObjectRef = (GetObjectHandler) Delegate.CreateDelegate(typeof(GetObjectHandler)
- /// , componentHelperType.GetMethod("GetObject"));
- /// }
- /// }
+ /// servicesAssembly = System.Reflection.Assembly.LoadFrom(servicesAssemblyPath);
+ /// if (servicesAssembly == null)
+ /// {
+ /// // then let the normal loader handle the typeload
+ /// servicesAssembly = System.Reflection.Assembly.Load("Spring.Services, culture=neutral, version=x.x.x.x, publicKey=xxxxxxxx");
+ /// }
///
+ /// Type componentHelperType = servicesAssembly.GetType("Spring.EnterpriseServices.ServicedComponentHelper");
+ /// getObjectRef = (GetObjectHandler) Delegate.CreateDelegate(typeof(GetObjectHandler)
+ /// , componentHelperType.GetMethod("GetObject"));
+ /// }
+ /// }
///
///
+ ///