Vjeran Marcinko wrote:
Hi folks.
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 ?
The framework does not anything about the selection criteria you have in mind. As such, you need to provide selection semantics. You can achieve this if you declare a service that handles the resolution, create an implementation, and declare a dependecy on the service in the cusuming component. E.g.:
// get the service to do the selection
Broker broker = (Broker) m_manager.lookup( "broker" );
// do the selection using a service with known selection semantics
Object thing = broker.select( myRuntimeArgument );
I would strongly recommend that you do not use the framework ServiceSelector simply because is is semantically undefined.
Steve.
Regards, 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]
