Olaf Bergner wrote:
So how does "merlin -execute" determine that starting point. Doesn't it use "block.xml" ?
If yes then in block.xml I can have more than one <components> under one <container>, then how would Merlin find out which one to start with.
If is starting point a totally irrelevant concept in Merlin's case.
Merlin (or any Avalon container for that matter) invokes the lifecycle methods on *all* components described by the container's container/assembly descriptor.
Think of your main() function being broken up into a number of methods:
context() service() configure() initialize()
are all pre-startup methods that are invoked by the container.
start() stop()
are invoked by the container to start and stop the component, and finally
dispose()
is called when your component is about to get garbage collected.
The idea is to decompose your application into a set of small components that do one job and do it well, in order to maximize the opportunity for re-using them in a future application. After decomposition, you'll probably discover you have one or more components that act as *entry-points* into you application, and their lifecycle implementations will show this. Other components will be used as *support* components to provide services to your *main* entity(ies).
Take a look at the new simple web server tutorial. It might help you understand how to put a somewhat *real* application together using avalon technology. In this tutorial, you have a *web server* component that starts a socket server and waits for external TCP connections. This is the *notion* of the main entry point of the application. However, there are other components that are also started by the container that basically do nothing until called upon by the web server component to provide services to it. These services include things like handling a connection request, parsing the HTTP request message, and generating an appropriate HTTP reply message.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]