摘要 |
<p>One embodiment of the present invention provides a system for implementing a persistence application programming interface (API) that is platform independent and can make up-calls to business logic. During operation, the system receives a request at the API to execute a command at a persistence tier of an n-tier distributed application. In response to the request, the system determines an entity type for an entity affected by the command. Next, the system identifies a function at a middle tier of the n-tier distributed application that is associated with the entity type and the command, wherein the middle tier includes the business logic. The system then sends an instruction to the middle tier to execute the function. Finally, upon receiving a confirmation at the API that the function executed, the system executes the command at the persistence tier.</p> |