Why create an EJB rather than a web service?

I would think that there is a lot of information in this, but I have not found anything that really answers my question.

What are the benefits of creating an EJB rather than a web service? The only clear advantage I can come up with is performance. However, I cannot find any solid data on how much more effective EJB.

With web services, I can come up with many advantages, including compatibility between java / .net and a simpler network through a firewall / proxy, because it uses http. With new standards such as WS-ReliableMessaging, WS-AtomicTransactions, MTOM, etc. (Which supposedly should be fully tested for compatibility between Sun and MS) that EJBs do not offer, that web services do not?

I have never worked with anything other than basic web services, so maybe someone who has experience with more advanced web service standards could tell me that all this does not work, as the suppliers say?

+3
source share
3 answers

First, EJBs and WebServices are not exclusive alternatives, but in fact they can very well be created to create EJBs and provide them with both IIOP interfaces and web services.

So there are two questions here:

  • What a good implementation technology for the reusable piece of business logic.
  • What call style is used for part of the business logic? Considerations, for example, when is RMI / IIOP a good choice? When is SOAP / HTTP? When SOAP / JMS ... etc.

EJB3 EJB , , , - . ( , Spring.)

. , ().NET, Web Services . Java-, Logic "" JVM, EJB , -. RMI/IIOP - , - . Web- , interop, , , interop, , .

+2

-Java- java-, -. Java IIOP .

, , , EJB .

0

I don't want to be sarcastic, but most of the EJB implementations that I saw before EJB 3 seemed to be designed to be safe. This is my joke, for what it stands.

-2
source

Source: https://habr.com/ru/post/1723143/


All Articles