Object pooling in .net, DOT NET Programming

How object pooling in .NET is done

COM+ reduces overhead by creating object from scratch. Thus  in COM+ when object is activated its activated from pool and when its deactivated it's pushed back to the pool. Object pooling was configured by using the "ObjectPoolingAttribute" to the class.

ObjectPooling(MinPoolSize := 2, MaxPoolSize := 5, CreationTimeout := 20000)> _

Public Class testingclass

Inherits ServicedComponent

Public Sub DoWork()

'Method contents go here.

 End Sub

 End Class

The sample Code above has the "ObjectPooling" attribute defined. Below is a sample code which uses the class.

Public Class

App Overloads Public Shared Sub Main(args() As String)

Dim xyz As New TestObjectPooling()

 xyz.doWork()

ServicedComponent.DisposeObject (xyz)

End Sub

End Class

Posted Date: 9/21/2012 7:31:59 AM | Location : United States







Related Discussions:- Object pooling in .net, Assignment Help, Ask Question on Object pooling in .net, Get Answer, Expert's Help, Object pooling in .net Discussions

Write discussion on Object pooling in .net
Your posts are moderated
Related Questions
What does a break statement do in the switch statement? The switch statement is a selection control statement that is used to handle many choices and transfer control to the ca

I have to develop a Google Map Fix .NET Site on Android(maybe Cross Browser issue) Project Description: A developer has implemented a characteristic which involves data from

Explain the XML elements. The elements are the central units of an XML document that define and identify data. The elements are represented by the tags. You can also make your

What are the different types of workflow in WF? In WF 4.0, the following two types of workflows are used: Flowchart workflows - Helps you to make workflows using the commo

create a table using class file

Define an array. An array is explained as a homogeneous collection of elements, stored at contiguous memory locations, which can be referred by the similar variable name. All t

I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

how to access global resource file using javascript

What is the difference between VB6 and VB.Net? VB6 1.       It is Object-based Language 2.       It Does not support Threading 3.       Not powerful Exception handli

What is difference between SITP and UTP in testing? The Unit Test Plan (UTP) are completed at smallest unit level or stand alone mode. For example you have Customer and invoici