Have you tried to use <create-instance> or defining your own ServiceImplementationFactory which creates the Interceptor? I think this way you don't need the BuilderFactory to create the ServiceInterceptorFactory service.

On Thu, 09 Oct 2003 20:52:39 +0800, Eric Yung <[EMAIL PROTECTED]> wrote:

Since I would like to record the ids of the services created by the BuilderFactory, I want to use an interceptor to do the job. Before I implements that solution, I take the logging interceptor as a test to check if HiveMind allows such setup.

And the result is that I cannot take this approach - HiveMind does NOT allow such setup. Add an interceptor to an BuilderFactory since the interceptor uses the BuilderFactory service.


Regards, Eric


Howard M. Lewis Ship wrote:
Did you add a logging interceptor to BuilderFactory?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Yung
Sent: Thursday, October 09, 2003 5:44 AM
To: [EMAIL PROTECTED]
Subject: Re: [HiveMind] extending BuilderFactory


Hi,


After the testing I have built the newest version from the CVS. When I re-run the test today, it shows the following error.


[junit] Unable to construct service js.util.testA: Unable to construct service hivemind.BuilderFactory: Unable to construct service hivemind.LoggingInterceptor: A recursive call to construct service hivemind.BuilderFactory has occured. This indicates a cycle between one or more services or configurations.



And that's OK since the code can detect the cyclic dependency of the services.



BTW, I have changed my code to extend the BuilderFactory and create another service point by copying the default BuilderFactory definition.



Regards, Eric


Howard M. Lewis Ship wrote:


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.




hivemind.BuilderFactory is a singleton; it is created

exactly once.


I'd like to see the debug output you mention; there must be

misleading


output (perhaps due to the recent refactoring).

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com



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




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




-- -- Christian Essl http://jucas.sourceforge.net

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



Reply via email to