Dynamic Reconfiguration of Middleware for Ubiquitous Computing