Discovering the appropriate services in ad-hoc computing environments where a great number of devices and software components collaborate discreetly and provide numerous services is an important challenge. Service discovery protocols make it possible for participating nodes in a network to locate and advertise services with minimum user intervention. However, because it is not possible to predict at design time which protocols will be used to advertise services in a given context/environment, it is now becoming clear that dynamic discovery mechanisms are required by mobile nodes to cope with the heterogeneity of discovery platforms. Existing adaptive mobile middleware solutions such as ReMMoC and INDISS have investigated this style of dynamic discovery. However, these have yet to consider the emerging suite of protocols for discovery in ad-hoc networks. In this paper we present a component-based service discovery framework for the development of an adaptive multi-personality service discovery middleware, which will operate in diverse environments e.g. fixed and ad-hoc networks. This supports a common architecture for individual discovery protocols to enhance configurability and re-configurability of the framework, and minimize resource usage through component reuse. Finally, to evaluate this framework we investigate the development of four existing ad-hoc service discovery protocols using our approach.