Date: 2004-06-22T17:18:52
Editor: 168.226.254.131 <>
Wiki: Jakarta HiveMind Wiki
Page: FrequentlyAskedQuestions
URL: http://wiki.apache.org/jakarta-hivemind/FrequentlyAskedQuestions
no comment
Change Log:
------------------------------------------------------------------------------
@@ -66,6 +66,6 @@
DanielFeist: Yes that's a good workable solution the only downside it has is
that its not 100% IOC i.e. the !DataSource itself cannot be injected but rather
work has to be done in the services constructor or init method to obtian the
datasource. In !HiveMinds current state that is the best solution rather than
over complicating the BuilderFactory I suppose.
-I do believe though that the ability to be able to inject other entities (that
are not services, configurations or resources) obtained from another
lookup/factory service is an important functionality that should certainly be
considered in future versions. This is because not everthing can or should de
represented as a service (e.g. if it does not implement an interface), and
although !HiveMind ''Resource's'' are good at what they do they are limited to
file-based resources and introduce a dependency on !HiveMind in an up to this
point POJO service that is not dependent on !HiveMind.
+I do believe though that the ability to be able to inject other entities (that
are not services, configurations or resources) obtained from another
lookup/factory service is an important functionality that should certainly be
considered in future versions. This is because not everthing can or should de
represented as a service (e.g. if it does not implement an interface), and
although !HiveMind ''Resource's'' are good at what they do they are limited to
file-based resources and introduce a dependency on !HiveMind in an up to this
point POJO service that is not dependent on !HiveMind which would reduce
service portability.
-DanielFeist: I've just been looking at the BeanTranslator which obtains a
bean from the BeanFactory using a locator. This would allow us to obtain and
inject services with beans (assuming the BuilderFactory allows a {{{set-bean}}}
nested element). Why can't we just extend this idea slightly making it more
generic so that we can obtain and inject an object from a specified factory
using the same idea of a single argument locator? We would then be able to
obtain objects from a factory simply, anywhere in !HiveMind, be it in
configurations or in the BuilderFactory schema to allow us to inject
non-service objects.
+DanielFeist: I've just been looking at the BeanTranslator which obtains an
object from a BeanFactory using a locator. This would allow the injection of
services with beans obtained from the BeanFactory by the simple addition of a
{{{set-bean}}} nested element to the BuilderFactory schema. Why can't we
extend the BeanTranslator idea, so as to be able to obtain an object from any
factory and not just the BeanFactory, using the same idea of a single argument
locator? In this way it would be very easy to obtain objects from any factory
very simply, anywhere in !HiveMind, be it in configurations or in a
BuilderFactory nested element. This is no more complex than what is already
implemented in !HiveMind and gives another level of flexibility to what you
can do with !HiveMind.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]