archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nicolas de loof" <nico...@apache.org>
Subject Re: An experiment with Spring
Date Wed, 20 Feb 2008 11:43:28 GMT
Could'nt Spring mimic the PlexusContainer ?

Archiva-webapp can be started with a spring context with support from
webwork/struts2 for IoC. We 'just' have to help the spring context retrieve
the components declared in plexus context files.

As spring and plexus IoC concepts are equivalent, we could use a custom
ApplicationContext to parse plexus components.xml, and handle plexus
lifecycle interfaces.

It's not trivial, but not so difficult - it's only good old XML parsing...
and some spring internals.

On this basis, we can migrate components in isolation, without requirement
for changes in many places because some other component has (or has not yet)
been updated to use spring.

Nico.

2008/2/20, Brett Porter <brett@apache.org>:
>
> On 20/02/2008, at 6:33 PM, nicolas de loof wrote:
>
> > What about a Combined Plexus context, where the lookup method both
> > search in
> > the plexus components and the springFactory ?
> >
> > This would make initialization more complex, but we could use @
> > plexus.requirement as is to get spring beans without having to know
> > they are
> > managed by spring.
>
> If we think we have a long term requirement for this, then that makes
> a lot of sense - and in fact Carlos did something similar for
> Continuum with an acegi experiment once I believe.
>
> OTOH - since Archiva is a standalone app it would be best to be
> consistent across it since we have that freedom. And actually, because
> of the built-in support in webwork and struts2 for spring IOC, the web
> layer is the easiest to change if everything else is already migrated,
> so there'll be no need for the app itself to primarily be a Plexus run
> app (though it might still have some plexus components we'll want to
> pick up).
>
> Cheers,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message