Paul Brown wrote:
> 
> On Aug 28, 2008, at 10:04 AM, Tammo van Lessen wrote:
>> Apropos, is there a reason why we don't use dependency injection? I
>> think it would ease such configuration issues a lot, though it would
>> require quite huge refactorings.
> 
> You mean use Spring or Guice or some such?  I'd give Spring a -1 just
> because I can't stand to look at the object model (piled three and four
> deep with subclasses...) and because it's not well-factored for polite
> use as a library (lots of dependencies, etc.).
> 
> What are the use cases for the engine that would be helped with a DI
> framework?  (In the olden days of PXE pre-ODE, we used a dual-layer
> scheme with JMX and JNDI...  Not something that I'd advocate
> reintroducing at any rate.)

I haven't tried Guice yet, regarding Spring do you mean the whole
framework or just the spring-beans part? I think this one is, well, sort
of slim. The interesting part would be to have an external (i.e. not
compiled) configuration file where you could wire components together,
e.g. to replace the scheduler impl, to add extension bundles, xpath
functions, expression languages, transaction managers, this kind of
stuff, instead of directly setting it. ODEServer.initBpelServer is such
an example where DI could make ODE more extensible/configureable without
need to recompile the whole thing.

AFAIK Guice does not support wiring via e.g. XML files, that's why I was
thinking about Spring (due to not knowing alternatives). In general
there is still the question whether such an refactoring is worth it.

Tammo

Reply via email to