Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] Having multiple IContextFunction

Hi,

Today i came across a problem that I had 2 DS-Services defining the same
"service.context.key" because both functions are able to contruct the
same Service-Interface in different contexts.

When I launched my inner 4.0 Workbench my model-editor didn't came up
because it said that there was a missing DI-Argument.

The reason was that DI consulted only one of the contributed functions
which was not able to construct a service in the given context and so
refused to create my Component-POJO.

Is this behaviour expected and if it is it would it probably make sense
to log a warning if 2 IContextFunctions define the same service.context.key.

Ideally I think if there are n functions who provide the same
service.context.key they are called until one of them returns a none
null value (though I'm not sure this is possible).

I hope the above is not too confusing else please tell me and I'll try
to rephrase it.

Tom

-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                                        geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1    A-6020 innsbruck      phone    ++43 512 935834


Back to the top