I understand what you saying is being done wrong, but i don't understand how
to do your alternative proposals. This has come up before and I'd really
like to try to sort it out for both bindings this week. Could you either
provide more concrete details (eg, how does an EntryPointContext register
with the servlet?), or come discuss it further on IRC, I'm there now or can
be at any other time that's convenient for you.

Thanks,

   ...ant

On 4/25/06, Jeremy Boynes <[EMAIL PROTECTED]> wrote:
>
> This is deprecated because the runtime implementation should not be
> discovering (on startup or on each request) what the configuration is.
> The full model is available to the builder framework and it should
> configure the runtime context with the information the context needs
> to operate. This avoids the anti-pattern where components are passed
> large configuration model objects that need to be parsed to figure out
> what they do (the injection-of-configuration anti-model as opposed to
> the injection-of-dependency we want to use).
>
> Taking your JSON binding as an example, it looks like what it is doing
> is using the JSONRPCBridge to route requests to the appropriate
> EntryPointContext based on data in the input stream. An alternative
> way that does not require the servlet to have access to the model is
> to have the EntryPointContext themselves register with the servlet;
> taking this further, the binding implementation could define a SCA
> system component that bridges to the host environment (to register URL
> mappings) and to which the EPs can autowire.
>
> --
> Jeremy
>
>
> On 4/25/06, ant elder <[EMAIL PROTECTED]> wrote:
> > The getComposite method in CompositeContext has been deprecated but both
> the
> > Axis2 and JSON-RPC binding are using it to get at the Module so as to
> find
> > all the entryPoints in the Module. Whats the correct way to be doing
> this
> > now?
> >
> > They use code like:
> >
> >         ServletContext servletContext = config.getServletContext();
> >         CompositeContext moduleContext = (CompositeContext)
> > servletContext.getAttribute(TuscanyServletListener.MODULE_COMPONENT_NAME
> );
> >         Module module = (Module) moduleContext.getComposite();
> >
> > or for the full details see initEntryPointProxys in
> >
> http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/handler/JSONRPCEntryPointServlet.java
> >
> > Thanks,
> >
> >    ...ant
> >
> >
>

Reply via email to