Key: IOC-56
URL: http://support.castleproject.org//browse/IOC-56
Project: MicroKernel-Windsor
Issue Type: New Feature
Components: MicroKernel
Affects Versions: RC 4
Reporter: Bill Pierce
Priority: Minor
I would like to see the following functionality:
Create Parent Kernel
Add Comonent X to parent Kernel. Component X has dependencies A and B
Add Component A to parent Kernel.
Create Child Kernel
Add Component B to child Kernel.
Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
Request Component X from parent kernel, receive component without dependency component B fulfullied.
I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://support.castleproject.org//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Bill Pierce updated IOC-56:
---------------------------
Description:
I would like to see the following functionality:
Create Parent Kernel
Add Comonent X to parent Kernel. Component X has dependencies A and B
Add Component A to parent Kernel.
Create Child Kernel
Add Component B to child Kernel.
Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
Request Component X from parent kernel, receive component without dependency component B fulfullied.
I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
was:
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
hamilton verissimo resolved IOC-56.
-----------------------------------
Resolution: Won't Fix
I cannot add this behavior. That would mean that dependency resolution will happen both ways, and this just doesn't look right. Think about it: you have multiple child containers. Any can have their own version of component B, which one should it pick?
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
I guess my description wasn't clear.
When you request the component from the parent kernel it wouldn't pick anyone, it would set the property to null or it would throw an error if the component was part of the constructor. However if you request it from the child kernel it would resolve against the component in the child kernel.
Does that make sense?
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
--
Let's say I have an order processing component in the Parent kernel.
The order component has a dependency on the email confirmation
component that is also added to the Parent kernel. Now let's say I add
a child kernel. I add an email confirmation component to the child
kernel. Now I resolve the order processing component from the child
kernel. The order processing component is not present in the child
kernel so it resolves against the parent. When the parent is
fulfilling the dependencies, it will return the email confirmation
component from the parent kernel. My patch would change this behavior
so that it would resolve the email confirmation component from the
child, rather than the parent.
Does that make sense?
I don't think that this violates anything.
The way I see it, is it very similar to the scopes thing we discussed earlier.
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
Bill, what's the use case?
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
--
See:
http://groups.google.com/group/castle-project-devel/msg/9e2b4cc00b879116?hl=en&
Ayende is correct. The ultimate goal with this patch and with IOC 57 is to be able to configure a parent kernel with base/core functionality and to configure n-number of child kernels that can selectively override that functionality, including core functionality dependencies.
I was hoping this could tie into the scoped containers by having the parent kernel then having a child kernel per host header. Then an HTTP Handler could add the proper child kernel to the Request context and the rest would be transparent to the application.
Thoughts?
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
--
Now it makes sense. I guess I didn't bump into this situation yet,
hence my initial skepticism, not to mention the misunderstanding.
I'll reopen the issue.
--
Cheers,
hamilton verissimo
ham...@castlestronghold.com
http://www.castlestronghold.com/
hamilton verissimo reopened IOC-56:
-----------------------------------
Assignee: hamilton verissimo
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Assigned To: hamilton verissimo
> Priority: Minor
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
--
hamilton verissimo resolved IOC-56.
-----------------------------------
Fix Version/s: RC 4
Resolution: Applied
Applied
> Use Child Components for Parent Dependencies When Requesting Parent Component via Child Kernel
> ----------------------------------------------------------------------------------------------
>
> Key: IOC-56
> URL: http://support.castleproject.org//browse/IOC-56
> Project: MicroKernel-Windsor
> Issue Type: New Feature
> Components: MicroKernel
> Affects Versions: RC 4
> Reporter: Bill Pierce
> Assigned To: hamilton verissimo
> Priority: Minor
> Fix For: RC 4
>
>
> I would like to see the following functionality:
> Create Parent Kernel
> Add Comonent X to parent Kernel. Component X has dependencies A and B
> Add Component A to parent Kernel.
> Create Child Kernel
> Add Component B to child Kernel.
> Request Component X from child kernel, receive component fully populated with dependency component B from Child kernel
> Request Component X from parent kernel, receive component without dependency component B fulfullied.
> I have a patch + unit tests for this, however, I have made other changes for other patches that haven't been added to the trunk quite yet. I'm not sure how to isolate changes between two patches.
--