• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB or web service

 
sarah Marsh
Ranch Hand
Posts: 282
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all the code is in Java, how to decide if use web service or EJB?

Thanks!
 
sarah Marsh
Ranch Hand
Posts: 282
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB and WS fulfill rather different roles. They don't compete with one another, but can complement each other. E.g., you might use a WS to expose the functionality of an EJB to another system or the outside world.

If you told us the details of the scenario you're thinking of, we might be better able to advise on which might be better suited.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3905
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use the EJB all the code will be in java (both server and client). If you use Web Services, only the server will be in java, the client can be anything that will send/receive XML. Also, Web Services are generally considered to be slower since there's no way to avoid serializing/deserializing the objects (which some application servers can avoid with EJBs).
[ July 10, 2008: Message edited by: Scott Selikoff ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic