ok, I reverted the (anyway still incomplete) service annotation processing. To illustrate, what I intended, a patch is included. It may be still incomplete or incorrect, but I think it would be possible at the end.
Best regards, Georg Von: Thomas Vandahl <[email protected]> An: Turbine Developers List <[email protected]> Datum: 04.01.2018 18:41 Betreff: Re: svn commit: r1819127 - in /turbine/core/trunk: ./ src/java/org/apache/turbine/modules/actions/ src/java/org/apache/turbine/om/security/ src/java/org/apache/turbine/services/ src/java/org/apache/turbine/services/security/ src/java/org/apache/turbine/util/ On 04.01.18 16:45, Georg Kallidis wrote: > I thought as injectTurbineService just calls getService - which may be > called at any time later - we should be quite safe (?). Yes, but getService initializes the service if not yet done so you may end up in a endless recursion. > But even if processing is done after the init call it is only the early > initialized services, which gets annotated and injections of other > services would remain indeed unresolved. I think, if we use hashset, which > gets updated for each injected service (name) this could be fixed (running > the annotations process recursively after the service init loop). Injected > Turbine service annotation could then be used in all methods, but not in > the init method itself and would require at least one early initialized > root service. Please keep in mind that the Turbine service layer can be extended by other service providers, which would make this tracking next to impossible. I already had a hard time to resolve the automatic early-init of service provider classes. I'd rather go without this feature. Bye, Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
EarlyInitTurbineServicesAnnotated.patch
Description: Binary data
smime.p7s
Description: S/MIME Cryptographic Signature
