robert burrell donkin ha scritto:
i took a look at the avalon coupling. IIRC the major issue is going to
be logging.

Wrong: the LogEnabled issue can be solved with a simple search and replace and is trivial once we agree on the solution (agreement is not trivial here)

The major issue instead is the code using ContainerUtil to propagate avalon lifecycles to child objects.

Almost an year I took care to replace every
---
if (object instanceof ServiceEnablingInterface) {
  ((ServiceEnablingInterface) object).serviceEnable(service);
}
---
with the equivalent ContainerUtil.serviceEnable(object, service), so it should be easy to run a find in files for the ContainerUtil object to understand what is happening.

Imho the key is to create factory services so that you never inject the lifecycle but instead you ask a factory to provide you a lifecycled object. Once we'll have removed the ContainerUtil usage with top level avalon services it will be trivial to extract the avalon interfaces to avalon-specific extensions of the "pojo" services.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to