If all the code is in Java, how to decide if use web service or EJB?
Joined: Mar 06, 2001
Joined: Mar 22, 2005
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.
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 ]