The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dvorme (14) [Avatar] Offline
#1
In chapter 6, I find the section on entry point resolvers confusing as it fails to answer the following two-part question:

a) When would I use each particular resolver?
b) Given resolver A, how would I configure it in order to use it?

Another question I would hope to have answered is:

In what order would a developer normally attempt to use the entry point resolvers? First try A; if you have concerns b, then try B, if in addition you have concerns c, then try C. A worked example that starts with the simplest component and entry point resolver possible and migrates through the more complicated possibilities would be really welcome here.

Right now, I'm guessing the following is how Mule works, but you never actually explain this so please correct me if I'm wrong:

public class Comp {
public B computeBFromA(A inputType) { /* do something with A, then */ return new B(foo, bar, blah) }
}

I *think* this is the simplest component possible. As long as the Message is of type A, Mule will automatically find my "computeBFromA" method and call it. As a side-effect, the message-type is now type B.

Am I right?

If so, can you please add a fully-worked example like this (that I can type in and run), then maybe evolve it through some of the other entry point resolvers so I can clearly compare/contrast when I would need each type?

Thanks in advance.


Regards,

Dave
David Dossot (233) [Avatar] Offline
#2
Re: Entry point resolvers
Thank you for your suggestions.

Check table 6.1 for a review of the entry point resolvers and their different behaviours.

As far as this question is concerned:

> As long as the Message is of type A, Mule will automatically find my "computeBFromA" method and call it. As a side-effect, the message-type is now type B.

Yes, you are correct, this will work OOTB.

D.