What use are EJBs

后端 未结 7 1278
一生所求
一生所求 2020-12-02 20:23

I\'m currently learning Jave-EE, having plenty of C++ experience and having learned Java SE. I don\'t understand the purpose of Enterprise Java Beans; can someone clarify th

7条回答
  •  無奈伤痛
    2020-12-02 21:14

    A couple of points:

    • EJBs don't exist on their own; they live in an EJB container, which offers you some very useful services through them, such as declarative security, declarative transactions and relatively easy clustering.
    • While it's true that anemic domain models are an antipattern: once your business logic becomes more complex, e.g. when multiple applications operate on the same model, separating most of the logic from the model becomes a matter of separation of concerns.

提交回复
热议问题