Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serviced Component:Why do I need this options?

Status
Not open for further replies.

gdrenfrew

Programmer
Aug 1, 2002
227
GB
The only way I can call my serviced components which I register in COM+ is setting the following options in the class:

[ Transaction(TransactionOption.RequiresNew) ]
[ ObjectPooling(true, 5, 10) ]


Can someone suggest why I need these, or maybe point me in the direction of finding out.

Thank you!
 
Hi,

You will want to review the EnterpriseServices namespace. Why you need these attributes is to identify to the framework that COM+ components are required by your assembly.
Excerpt -
"A serviced component is the mechanism that enables COM+ services to be available to .NET Framework classes. This section describes how to configure and register serviced components for access to COM+ services.

Just-in-Time (JIT) Activation, Synchronization, Object Pooling, Transactions, and Shared Property Management are examples of well-known COM+ services that are available for you to use. There are also other COM+ services, such as loosely coupled events, Queued Components, and role-based security, that you can use to write flexible, Web-based applications."

HTH

Amit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top