Web Services vs EJB vs RMI, advantages and disadvantages?

前端 未结 3 1924
礼貌的吻别
礼貌的吻别 2020-12-04 05:45

My web server would be overloaded quickly if all the work were done there. I\'m going to stand up a second server behind it, to process data.

What\'s the advantage

3条回答
  •  孤街浪徒
    2020-12-04 06:15

    Between EJB and RMI, EJB would certainly be better - it has everything RMI has and much more via the container (object pooling, transaction management, etc.)

    Between EJB and web services, web services would give you more portability if you want to be able to call them from non-java apps in the future. EJB again gives you things like transaction management and pooling that you might not get "out of the box" with web services.

    Personally, if I were doing it, I would probably use EJB or some similar remote object framework (spring remoting comes to mind as well). If you need the ability to call the objects from a non-java app, you can always front your EJBs with simple web service proxies as needed.

提交回复
热议问题