I was wondering how come the current mediators are exposed as samples and
are not part of the Synapse core package? I would suggest that we bundle it
as org.apache.synapse.mediators and leave it to the discretion of the users
whether to use them or not.

IMHO core should only contain what is necessary for building up Synapse (spi level). This can include build in mediators as well. But all other mediators (api level) should come as separate of core because there can be infinite number of them.

This is way Paul has suggested the following project structure.

- src {all core classes and build in mediators}
- samples
            +- src
- mediators
            +- src
- extension
             +- src
- {other stuff, maven.xml,...}
So Synapse can have synapse-core-XX.jar, synapse-samples-XX.jar, synapse-mediators-XX.jar and synapse-extension-XX.jar(hopefully). Thus, need to modify the maven.xml and project.xml.

Another feature that could be very useful is to have a clocking mechanism
for the mediators by which we can find out how much time each of the
mediators took to execute in milliseconds maybe. One use I can think of is
in Service level agreement (SLA).

Vikas and I did a bit of work and I guess we can put this clocking
module/code in the
org.apache.synapse.processors.mediatortypes.axis2.ServiceMediatorProcessor
class in case mediators implemented as axis2 services. So whenever a
mediator is executed we clock it and put it in the messageContext, which the
logging and monitoring mediator can use, in case of a breach of contract
(SLA) we can send email or take any action.

Isn't this a mediator implementation should care about. When Synapse engine calling time for <servicemediator/> is pretty much a constant. {Synapse-->Axis2}. So the mediator logic itself know how much time it need. As SynaseMessage is exposed to Mediator impl one can set any property and latter used in it's execution path or SynapseEnvironment for all the incoming messages.

Saminda






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


Reply via email to