Date: 2004-06-24T06:44:09
   Editor: 200.69.248.193 <>
   Wiki: Jakarta HiveMind Wiki
   Page: InjectingNonServiceFactoryObtainedObjects
   URL: 
http://wiki.apache.org/jakarta-hivemind/InjectingNonServiceFactoryObtainedObjects

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -3,8 +3,7 @@
 
 
 ''(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:
+Is there anyway to inject a service, using the BuilderFactory, with an object 
obtained by invoking a method of another service thus allowing non-service 
objects to be obtained from a POJOF (plain old java object factory) for 
injection?  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.
 

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

Reply via email to