posted 21 years ago
Packaging stems from the idea of distributing the application. When ejb classes are packaged in a separate jar and other application classes into a separate jar, its done only for easy of distribution. You could have all your ejb's deployed on an enterprise application server whereas Web-app on a web-server. In such a situation you need to place only those classes on the application server that the ejb's shall utilise. Ideally all the classes referenced by the ejb's are packaged into the ejb-jar and others into a separate one since in most web-applications they are used by the web-component. Hence the differniation in packaging. And as far as the the services of the container is concerned, if a class say DAO is being accesses by the ejb, the class by itself does not have the priviledges that an ejb has, however depending upon how the class behaves under various conditions(exceptions, etc) the container shall handle then since its the ejb thats calling the simple DAO class and the ejb is still active.
i hope that answers ur question
Do correct me if am wrong