jeudi 26 mars 2015

Maintaining co-relation Id

I am working on a system design. I have implemented multiple layers in my application where the web layer calls the business layer and business layer call the data layer.


I want to keep a common co-relation id for every call, so that I can log the input to any method and in case of any error, the exception can be logged into database using the same co-relation id and finally need to show the co-relation id to the users screen in case of any error.


I have implemented this using WCF service where I take the message id as the co-relational id and use it throughout the request life cycle. But I am not sure how to implement this with normal libraries. I don’t want to pass the co-relation id on every method as parameter or a parameter to the constructer of every class.


Can anyone point me to any article or implementation approach for this.


Thanks


Aucun commentaire:

Enregistrer un commentaire