polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: [jira] [Updated] (ZEST-129) Review the different activation/initialization/lifecycle methods
Date Mon, 16 Nov 2015 15:48:53 GMT
Kent a écrit :
> I would say we should add support for declaring @PostConstruct and @PreDestroy on Mixins
- and support for @PostConstruct on plain objects (instantiated by ObjectFactory). And simply
remove (or just deprecate) Initializable and ServiceActivation alltogether.

+1

> I am more uncertain whether the @Activators should be kept or not. On one hand I cannot
find a single usage in the whole codebase using beforeActivation and afterPassivation - so
not sure anyone would miss those features.

Agreed.

> On the other hand it might be handy to be able to reuse the same activation logic across
several composites - And there could be some potential of reusing the Activator as a listener
for UnitOfWork activation/passivation instead of module activation/passivation. The afterPassivation
could have some usages in that context.
One thing Activators were done was just that, to reuse activation logic.
ServiceActivation is using that concept. But usability sucks and
@PostConstruct/@PreDestroy is a match!



Mime
View raw message