PicoContainer
  1. PicoContainer
  2. PICO-287

Component Adapter -- The missing Methods :)

    Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Typically in my usage of PicoContainer I end up with an adapter chain that is fairly deep.

      JMX -> Caching -> MyCustomComponentAdapters -> CICA

      I find that I'm wanting two methods:

      1 - ComponentAdapter.swapInstantiatingAdapter(InstantiatingComponentAdapter newMethod);

      This would save me from having to recreate the entire ComponentAdapterChain for the few times I actually need setter injection. And since in my environment, clients can plug-in their own components, clients wouldn't even be ABLE to accurately recreate the component adapter chain.

      The result would be something like this:

      ComponentAdapter ca = pico.registerComponentImplementation(NeedsSetterInjection.class);
      ComponentAdapter setterAdapter = new ComponentAdapter(.... all the appopriate args);
      ca.swapInstantiatingAdapter(setterAdapter);
      

      2 - ComponentAdapter.getAdapterOfType(Class adapterType) throws AdapterNotInChainException

      Because in:

      JMX -> Caching -> MyCustomComponentAdapters -> CICA

      There is no "real" way of getting to MyCustomComponentAdapters for any final modifications and tweaking.

      Obviously both of these items would break the current Interface – so I'm at a loss on how to get what I want out of it. So I decided to file it as a wish unless someone comes up with an idea on how to integrate it.

        People

        • Assignee:
          Unassigned
          Reporter:
          Michael Rimov
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: