What is an Enterprise Java Bean really?

前端 未结 7 1864
小鲜肉
小鲜肉 2021-02-05 18:59

On the Tomcat FAQ it says: \"Tomcat is not an EJB server. Tomcat is not a full J2EE server.\"

But if I:

  • use Spring to supply an application context
  • <
7条回答
  •  太阳男子
    2021-02-05 19:26

    Indeed, if you put enough effort you can almost turn Tomcat/Spring into a full-fledged heavyweight application server :) You could even embed a portable EJB3 container...

    What is it that a Java EE compliant app server gives you that you can't easily/readily get from Tomcat with some 3rd party subsystems?

    There are still a few features that are hard to get with 3rd party modules:

    • stateful session beans (SFSB)
    • extended persistence context
    • application client container / java web start
    • clustering depending on the app. server
    • CORBA interoperability
    • JCA integration ~
    • remoting ~
    • container-managed transactions ~
    • decent management of distributed transactions (e.g. recover heuristic tx)

    Entries with ~ are also supported by Spring, but not so trivially, at least to my best knowledge.

    A few more details in this answer: EJB vs Spring

提交回复
热议问题