• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB vs web service  RSS feed

 
David York
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain the benefits of using EJB's over a web service in an environment that consists of internal customers only.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All depends on the kind of service, the network layout, the number of concurrent users, etc. etc.

You might well find a situation where a combination of the two is the most suitable solution.
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each one has its advantages and disadvantages. Though, I think in the end, they have different purposes at their heart - I usually envision EJBs as components that are part of a wholly Java application's framework, while I'd use web serivces in places where there's a need for language-interconnection (such as .Net to Java) and single-fire operations.

The one place I could imagine this, as I illustrated above, coming into an 'either one might work' situation would be using a web service in lieu of a stateless session bean depending on the operation. This'd be in the sense of a fire-and-forget operation, but it would work written either way.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in such cases you might even consider a web service using a stateless session bean as a backend (which is what we do here).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!