hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Jakarta HiveMind Wiki] New: FrequentlyAskedQuestions
Date Mon, 21 Jun 2004 14:55:03 GMT
   Date: 2004-06-21T07:55:02
   Editor: <>
   Wiki: Jakarta HiveMind Wiki
   Page: FrequentlyAskedQuestions

   no comment

New Page:

= Frequently Asked Questions =

This page will eventually become the !HiveMind FAQ.  The idea is that people ask questions
and that other !HiveMind users and developers respond and comment until a "accepted solution"
is reached.  Eventually we will be able to compile a list of questions and accepted solutions
into a more official FAQ for the !HiveMind website.

Q. (DanielFeist 21/06/2004)  

''(Maybe this is a ChangeProposal rather than a question.  That depends on the answer  ...
 lets wait and see and possibly move it is it doesn't belong here)''

Is there anyway to inject a service, using the BuilderFactory, with an object obtained by
invoking a method of another service.  I can think of many cases were this would be very useful
but it doesn't seem to be possible.  Concrete examples are as follows:

'Example 1':  I have a Mailer service which depends on, and uses, a datasource to obtain email
address.  This datasource is to be obtained via JNDI so i decide to use the NameLookup service
to obtain the datasource.  As the datasource is not a service but rather the result from executing
a lookup method of a service it seems i am limited from injecting it into my Mailer service
through declarative configuration in the hivemodule.sdl.

'Example 2':  I have a Mailer service which uses a Properties to obtain email address.  The
backing store of the properties has to be flexible and configurable so i decide to create
a !PropertyFactory service that returns a Properties object for a given locator and whose
backing store is defined and configured through a configuration point.  This is a good solution
to my problem but as in example 1 I cannot inject this properties into my Mailer Service.

On a side note: If this type of injection is possible then a clean solution to my change proposal
ModuleResourcesProposal is very simple.   Resources would be created using a factory specifically
designed to do this (much like the BeanFactory) which would also manage backing-store type
and synchronization issues.  These resources could then be injected into services by using
ResourceFactory's get method to obtain the resource.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message