| | |
COM+: Can anybody explain COM+ Contexts...
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2004
Posts: 27
Reputation:
Solved Threads: 0
I never get ok with the COM+ contexts... There are so many context types like client context, call context etc... Adding to this .NET provides few attributes such as MustRunInClientContext... I couldn't find any sample or links that explain this...
Let me elaborate more. As the definition goes by saying "context" is a conceptual grouping of objects within a transaction. However when u instantiate a COM+ component (TransactionOption.Supported) within another COM+ component (TransactionOption.RequiresNew), when i check the ContextUtil.ContextID, the two components are instantiated in different contexts... WHY?
Secondly, the definition says MustRunInClientContext runs the component in the client context but if try this with the above component (TransactionOption.Supported) it most always results in an exception... WHY?
Third and final, this is different from contexts but i just found this... Just create a COM+ component (Inherit ServicedComponent, Set transaction - every thing normal - you can do this simply by selecting Transaction Component template in VB.NET)... If you give description attribute to any of the methods, you will get method level rolebased security exception - if you remove the description attribute, you won't get this exception...
phew, COM+ seems to be a land of uncertainty....
Let me elaborate more. As the definition goes by saying "context" is a conceptual grouping of objects within a transaction. However when u instantiate a COM+ component (TransactionOption.Supported) within another COM+ component (TransactionOption.RequiresNew), when i check the ContextUtil.ContextID, the two components are instantiated in different contexts... WHY?
Secondly, the definition says MustRunInClientContext runs the component in the client context but if try this with the above component (TransactionOption.Supported) it most always results in an exception... WHY?
Third and final, this is different from contexts but i just found this... Just create a COM+ component (Inherit ServicedComponent, Set transaction - every thing normal - you can do this simply by selecting Transaction Component template in VB.NET)... If you give description attribute to any of the methods, you will get method level rolebased security exception - if you remove the description attribute, you won't get this exception...
phew, COM+ seems to be a land of uncertainty....
•
•
Join Date: May 2004
Posts: 27
Reputation:
Solved Threads: 0
Let me add one more, If you create a com+ component with ActivationOption.Server, you can't have methods that return objects (MarshalByRef)... I tried and got Remoting exceptions...
Only in ActivationOption.Library, I am able to return my custom objects... Even after implementing ISerializable or <Serializable> attribute it didn't worked for me (alas). Can anybody tried returning custom object as well as other .NET objects itself like ArrayList...
In webservices, it is understandable that the contract is text based but COM+ being binary contract, it should work isn't it....
Only in ActivationOption.Library, I am able to return my custom objects... Even after implementing ISerializable or <Serializable> attribute it didn't worked for me (alas). Can anybody tried returning custom object as well as other .NET objects itself like ArrayList...
In webservices, it is understandable that the contract is text based but COM+ being binary contract, it should work isn't it....
![]() |
Similar Threads
- Using OpenGL in Visual C++: Part I (Game Development)
- Would someone please explain what folding means? (Geeks' Lounge)
- Please explain to me...dedicated server.. (Networking Hardware Configuration)
- can someone please explain??????? (C)
- Will somebody please explain value parameters to me!!! (C)
- Please explain debugging (Java)
Other Threads in the VB.NET Forum
- Previous Thread: Querying a Dataset
- Next Thread: Controlling windows scroll
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms ftp generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





