I'm wondering what the best way to set up an enterprise app is. For example, say i'm developing an application for a hospital clinic. As part of this application, i determine that i need a scheduling component, a patient management component, an employee management component, and a web client. Each of the components is deployed as an ejb-jar with a session facade. If i want to reuse some of the functionality in one or more of the components in another application (e.g. use the employee component for a payroll application), what is the best way to deploy this application? Should i put all of the components, as well as the web client, in an .ear file, then bundle the same components in the second application's .ear file, deploying the same beans with different jndi names? Or should i keep these reusable components out of the application's ear and deploy each of them on their own, so there is only one version of each living on the server? Is there a best practice for this kind of situation?