darlingpretty
Programmer
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!
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!