commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yung <eric.y...@jspectrum.com>
Subject [HiveMind] extending BuilderFactory
Date Tue, 07 Oct 2003 14:37:28 GMT
Hi,

Since I would like to store the ids of object created in the 
BuilderFactory, I think I could have 2 choices to extend the 
functionality of the BuilderFactory from the document.

(1) create a sub-class of BuilderFactory and overwrite the method 
createCoreServiceImplementation(), create a new service and use that 
service id in the <invoke-factory> configuration.

(2) create a new interceptor which intercepts the call to method 
createCoreServiceImplementation() in the BuilderFactory and the 
corresponding configuration in the hivemindmodule.xml.

Since using the 1st choice requires to copy the definitions of service 
"hivemind.BuilderFactory" from hivemind's to my copy of 
hivemindmodule.xml file, I prefer the 2nd way (more simple - in setup 
the configuration file hivemindmodule.xml - than the 1st one and not 
affected by the changes of <parameters-schema> defined in 
"hivemind.BuilderFactory") and try it out.

But I notes from the debug log that the system creates multiple 
instances of the BuilderFactory & the interceptor - one for each 
<invoke-factory> config in the xml file. If I replace my interceptor 
with the "hivemind.LoggingInterceptor", the behavior is the same.

I would like to know if this is the system behavior if I add a 
interceptor in the service "hivemind.BuilderFactory" since the 
instantiation of interceptor requests the "hivemind.BuilderFactory" service.

And could you suggest a better way to do that? Otherwise I will go for 
the 1st one.



Thanks,
Eric



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message