Thanks again for all the advice! Everything is fine now, I think!

> I honestly think that you have an inaccurate perception of what
> is expected out of Merlin, and once you 'see the light', you can
> afford to laugh at this 'juncture' :o)

Like the song:

http://launch.yahoo.com/song/default.asp?songID=1385031

I can't say I've had a epiphany, but I am definately beginning to see the
light. :-)

Guess from now on, it's just practice and experience.


However, there are a few things that I should explain.


> > 4. Make a Component that simply directly uses the POJOManagers,
> >    rather than the ServiceProviders. Well, again, this defeats
> >    the whole purpose of using the ServiceProviders, doesn't it?
>
> No it doesn't. If you have components that doesn't require Avalon
> LifeCycle, you can just create the Type information (javadoc tags
> or .xinfo file) and use them as-is. We do that all the time
> outselves, especially when adopting existing libraries (like Jetty).

Ok, I'll take your word on this. If you say that this is usual practice,
then indeed this approach seems to make the most sense for the scenario that
I was talking about here.


>     public void execute()
>     {
>         m_ProviderA.doStuff();
>         m_ProvicerB.doStuff();
>         //done
>     }


There is one "gotcha!" about this approach, though. doStuff ends up getting
executed twice!

I tried this, though, with the following, at it worked:

  public void execute()
  {
      m_providerA.toString();
      m_providerB.toString();
  }

The call to toString() will invoke the provider's lifecycle. Thankfully,
execution of provider B's lifecycle waits for that of provider A. It doesn't
in the to service() when using the Serviceable interface, and it requires
setting the timeout to "0", but it does indeed work in execute().

Can't say that it's very intuitive to make a call to toString() to invoke
the process, but it's simple and it works.


So, I'm ok now to go. The good thing about this little exercise (for me,
anyway) is that it got me to understand the framework a lot better. I am
convinced now that it is definately worthwhile to use Avalon/Merlin.


Again, I thank you for all your help!!
:-D




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

Reply via email to