----------------------------------------------------------- New Message on cochindotnet
----------------------------------------------------------- From: VBGUru Message 1 in Discussion www.aravinda.in Driven by values; Powered by Passion Forwards * Fun * Code * Knowledge * Shimoga Serviced Component In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; <o:p> </o:p> Advantage of Serviced Components: object pooling, database connection pooling, sharing resources, role based security, distributed transaction processing monitoring(COM+ ) Use the component registered on other servers <o:p> </o:p> That means that You can re use a component, thus avoiding the creation of the component each time its requested. You can set the permissions so that you can control the users\groups who can create and invoke component \ functions \ methods For ex: you can set that users\accountsusers to invoke a finance component and users\accountmangers to invoke finance.CreateBudget method. You can control the tranasactions via components on multiple servers. i.e Billing component will be succesfull after only the sales component is successful, and sales component is successful only after the stocks component. <o:p> </o:p> Activation: <o:p> </o:p> You can run \ activate serviced component in two ways ActivationOption.Library.-( in-process) serviced component will be activated in the client's process space by specifying the value <o:p> </o:p> ActivationOption.Server.-( out-of-process) assembly will be activated in the COM+ executable process space by setting the ApplicationActivation attribute to ActivationOption.Server The above information must be specified in AssemblyInfo. COM+ server application ( serviced component ) runs in the process space of the COM+ executable (dllhost.exe). <o:p> </o:p> Requriments: <o:p> </o:p> Comvisible should be set to true StrongName for the assembly <o:p> </o:p> Running the application: <o:p> </o:p> Net creates the Serviced component itself if you run the application in Net IDE. Activation by server method: · Open component services from Administrative Tools. You have to set the permissions by adding the roles called User and CreatorOwner to the roles folder of the component. To those roles add the userid \ groups who can access the component and set the identity in the Properties of the component, the component will take the identity specified to activate. · Also you need to call the gacutil utility with command switch i as arguments for the serviced component dll. Activation by Library method: Net IDE will take everything for you <o:p> </o:p> Deployment: Generally there are three ways of deploying a .serviced component: Using the Regsvcs command line utility This command line utility takes the name of the assembly as the input, creates a type library by reading the assembly, and finally registers the object with COM+. Using the automatic registration mechanism provided by the .NET Framework At runtime, the CLR (Common Language Runtime) automatically creates a type library based on the assembly and COM+ uses the information present in the type library to install the objects. This is called lazy registration and this method works only for library applications. Using the RegistrationHelper class that is part of the System.EnterpriseServices namespace. The InstallAssembly method of the RegistrationHelper class can be used to programmatically register .NET objects with COM+. Steps for depolyment: Server Activation: You have to call regsvcs for the serviced component dll. call the regasm for the serviced component dll. call the gacutil utility with command switch i as arguments. for the serviced component dll. Make sure its installed in Windows\Assembly Folder. Open component services from Administrative Tools. You have to set the permissions by adding the roles called User and CreatorOwner to the roles folder of the component. To those roles add the userid \ groups who can access the component and setting the indentity in the Properties of the component, the component will take the identity specified to activate. Library Activation: You have to call regsvcs for the serviced component dll. Creation of Proxy: To invoke Serviced component available on system A from system B, create a proxy out of the registerd com+ (serviced component) available on System A and register the proxy on System B. Debugging Library Activation: You can directly run the component and debug in .Net IDE Server Activation: You have to debug by attaching to the the process of dllhost.exe and your break point will be hit in the .NetIDE How Serviced component works: First, it registers the CLR assembly as a COM component (as if you had run the Assembly Registration Utility, regasm.exe). Second, it emits a COM type library (as if you had run the Assembly to Type Library Converter, tlbexp.exe) and uses it to deploy the configured classes (that are present in the assembly) in the COM+ catalog. Then it creates the target application described in the assembly's ApplicationName and ApplicationActivation attributes by default. Finally, it uses the .NET Reflection APIs to interrogate the meta-data for the configured classes in the assembly and uses that information to programmatically update the COM+ catalog so that each class will have the appropriate declarative attribute settings. If a configured class does not have a particular declarative attribute, regsvcs.exe will use a default value instead. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/CochinDotNet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]