EJB (Enterprise
Java Beans),
JMS (Java Message Service) and
web services are three different things. They don't have the same uses and cannot be substituted for one another in a software system. They don't have the same purpose or objectives.
You can implement business logic in a message driven EJB, which receives messages via JMS. You could also make the business logic in the EJB accessible via a web service.
Also see
Sun's Java EE tutorial.