hi some where i heard that the entity beans should not be accessed remotely, its a bad design itself by the ejb creators is it true can some body give me more information about this
posted 14 years ago
This is true in the majority of cases. Entity Beans represent your data model, giving someone direct access to your Entity Beans is essentially like giving someone direct access to your database. As you can probably imagine, this is frowned upon. Furthermore, you would be tightly coupling your external clients with your Entity Beans and hence your data layer. A change in the database frequntly causes a change in the Entity Bean Layer which may or may not then cause a change in the external clients. Better design dictates publishing a set of very stable interfaces that represent course-grain services for the client. In the EJB world this means using one or more Session Beans to act as a facade to your Entity Bean Layer and publishing those Session Beans for external use. This minimizes coupling and simplifies interaction with your system. The external client probably doesn't care how you model your database (which the Entity Beans would basically expose), they only care what services your system can provide.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads