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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another puzzled problem

Status
Not open for further replies.

darlingpretty

Programmer
May 13, 2004
2
CN
I ever read a topic said
If a Sub-Componet is created using
ComponentB b = new ComponetB();
Object b do not inherit root component's context information.

but if a Sub-Componet is created using
ComponentB b = GetObjectContext.CreateInstance("ComponentB ");
Object b will get root component's context information.

But as I know, Component gets its context information when its Activate() method is called by COM+.
If that is right, ComponentB b = new ComponetB() and
ComponentB b = GetObjectContext.CreateInstance("ComponentB "); is both OK, because Component b will get its context when it activated.

I am confused , Who can tell me clearly?
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top