Hi Michael,

On 8/10/07, Michael Buchholz <[EMAIL PROTECTED]> wrote:
>
> Hi Ruwan,
>
> comments in line.
>
> Ruwan Linton schrieb:
> > Hi Michael,
> >
> > Comments are inline;
> >
> > On 8/9/07, Michael Buchholz <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> I´m currently implementing a mediator which logs certain values of a
> >> mediation to a MySQL RDBMS.
> >
> >
> >
> > I guess you can use the newly introduced ManagedLifeCycle concept to get
> the
> > DB connection handling if you are using the svn head rather than the
> > released version..... (just a thought)
>
> I use the 1.0 version.
>
> >
> >
> > How can I retrieve the following information in mediate() from the
> >> synapse messagecontext:
> >> - Name or URL of the Synapse WS-Proxy the client used
> >
> >
> >
> > SynapseMessageContext.getTo().getAddress()
> Just FYI. One can also use:
> String proxy_name = (String) synCtx.getProperty("proxy.name");
>
> (for retrieving the proxy name directly)
>
> >
> >
> > - Timestamp, when the message arrived in Synapse
> >> - Timestamp, when the reply from the backendservice arrived in synapse
> >> (when isResponse is true)
> >
> >
> >
> > AFAIK, you can not retrieve the timestamp information for the received
> time
> > from the MessageContext. Sorry. If this is required we can add this
> > information to MC at the time we create it as a property in the MC so
> that
> > you can get it using the MessageContext.getProperty.
> It would be nice to know the time of a backend service invocation. A use
> case for this is to confirm a SLA for a backend service (e.g. "Backend
> service xy must answer any request in no more than 1 second).
> If you want to add this feature go ahead :)



I will add this as a MC property.


I´ve written my own mediator for this now that logs a timestamp before
> and after the backend invocation in the messagecontext properties.



Nice to here that.


Thanks,
Ruwan


>
> >
> > Also I´m looking for a way to store data in the messagecontext while in
> >> inSequence that I can retrieve again in the outSequence. Is this
> >> possible or will I have to store it somewhere outside of synapse?
> >
> >
> >
> > Yes. you can use MessageContext.setProperty(String key, Object value) to
> set
> > the information as a property in to the MC in the inSequence and
> retrieve
> > those information in the outSequence using the
> > MessageContext.getProperty(String
> > key) [note: you should use the same key (obviously :D)]
> Perfect.
>
> Thanks.
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Reply via email to