Vjeran Marcinko wrote:

----- Original Message ----- From: "Niclas Hedhman" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 11:19 AM
Subject: Re: [Fortress/Merlin] equivalent of EJBHome interface





On Wednesday 29 October 2003 17:16, Vjeran Marcinko wrote:


What is the proper way in Fortress/Merlin to achive component lookup, but
also constructing/initializing said component with a parameter know only
during runtime? Similar to EJBHome.create(parameter) method ?


What Stephen's reply mean in layman terms;

Avalon Framework does not provide runtime creation of objects (since this is what you are asking for). Instead, it leaves it up to you to provide some mechanism for this. Central to your approach is what Stephen brings up, a deploy-time ready Factory (Broker) that understands how "parameter" should be interpreted into some object or component.

What Stephen forgot to mention is that the "Broker" could deploy a <container>, i.e. a new Merlin instance and it could technically provide Configuration object(s) to those component(s) as well.



That would probably be better solution, because if I just use Broker component, objects that it would return from it's select(runtimeArgument) method would be plain java objects constructed inside that method, and not Avalon components that would use all features of Avalon container.



Not necessarily - its a pure implementation decision.


An interface (e.g. Broker) is exposing some method (e.g. select( String[] query )). The implementation of that method is in the hands of a componet. The component could include a complete embedded container system within which is is doing everything to ensure proper component management (in fact this is something I did last year for a business process broker - the broker accepted quesries and returned new or existing processes on demand). Alternatively, the broker implementation could declare dependencies on the services it needs to fulfill any request. As request come in - it perhaps applies some initial assesment and delegates actions to the its dependent services.

Stephen.




- Vjeran



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





--


Stephen J. McConnell
mailto:[EMAIL PROTECTED]




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



Reply via email to