cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: springification of core
Date Tue, 09 Oct 2007 07:11:38 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Daniel Fagerstrom wrote:
> Leszek Gawron skrev:
>> There is a lot of .xconf files in core. I would like to start
>> converting them into spring beans
> 
> Great!
> 
>> but question is: do we want that for 2.2?
> 
> Yes.
> 
> It is a huge job to convert everything, so the only realistic option is
> to do it incrementally, a couple of components at the time, when people
> have time and feel like it. If we try to syncronize it with releases we
> will never get it done.

My experience with the sprinigication of CForms was straight forward and mostly mechanically
as:

  1. move and migrate a component config snippet from the xconf file to the spring xml file
  2. remove all imports of org.apache.avalon on the class under migration
  3. fix the errors caused by 2.
  4. migrate the configure method to setters (and adapt the spring xml accordingly)
  5. migrate the service method to setters (and adapt the spring xml accordingly)
  6. migrate the ServiceManager usage to setters (and adapt the spring xml accordingly)
     6a. if 6. is too dynamic to be replaced by setters use BeanFactoryAware interface
  7. check if an ev. dispose/init method is still needed
     7a. if those are needed use InitializingBean/DisposableBean (only singletons can be disposed)
  8. restart at 2.for ev. base/abstract classes it extends

HTH

> 
> I don't know if we have discussed any policy for how to Springify the
> beans, but you will find many examples in the core. What I would propose
> is that for sitemap components, we keep and depricate the Avalon
> configurability and life cycle interfaces even if we Springify them.
> You'll find a number of examples on how this can be done in
> cocoon-pipeline-components. As users probably have tons of sitemap
> component configurations in their sitemaps, I think it is reasonable to
> give them some time to change.
> 
> For non-sitemap components we have just removed the Avalon stuff.
> 
> /Daniel
> 

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHCympLNdJvZjjVZARAlJzAKDw5gIv1V7YWMhz2MKZmgyZvWnkRwCghIXo
28asL2r1zx1G546+sCNnX4U=
=2u3f
-----END PGP SIGNATURE-----

Mime
View raw message