An Adaptive Middleware to Support Context-Aware Knowledge Sharing