With the prevalence of pervasive devices, plenty of applications need to support context awareness. Due to the heterogeneity of context information, it is necessary to provide a set of common vocabularies with shared semantics. Based on above requirements, the paper presents an architecture of ontology-based context-aware application in pervasive environment. In the architecture context processing is regarded as a separated module which conforms to the principle of software engineering, "seperation of concerns". The architecture enables applications to focus on the information that they desire, and reduces the need to worry about how contextual information is retrieved. In order to reuse of the ontology, the paper designs two level's ontology-generic ontology and domain-specific ontology which unifies semantics of context information. At last an example scenario of home domain is given to illustrate the rationality and effectiveness of the architecture.