1. A method comprising: receiving, at a computing device having one or more processors, a hierarchical bean factory associated with an application, a parent bean factory representing a shared application context that is shared by all of the entities in the hierarchical bean factory and each child bean factory representing an entity specific application context that is specific to the entity in the child bean factory; receiving a request to invoke a function associated with the application in a multi-tenant cloud computing environment; determining, by the computing device, an entity based on the request in the multi-tenant cloud computing environment; determining, by the computing device, a child bean factory in the hierarchical bean factory that is associated with the entity in the multi-tenant cloud computing environment; invoking, by the computing device, the function associated with the application using the child bean factory specific to the entity in the multi-tenant cloud computing environment, defining one or more entity aware components in the child bean factory; and sharing access to the entity aware components based on loading each entity aware component once per entity.