1. MBean - Which is part of JMX hosted by the Java Standard Server client being JCONSOLE
2. Webservice - any client can communicate to the service using SOAP or REST protocol
3. EJB - Again a way of exposing the service
4. RMI - Again a way of exposing the service
I am bit confused between them.
1. What is the actual difference between them?
2. When do we use what? what to choose?
1. EJB's : Both service and client should be of Java code. Needs to be hosted on Application container eg: Jboss, weblogic
- This is heavy weight and not scalable
- Uses RMI protocol
2. Webservices : Service and client can be of code written in any language. Needs to be hosted on not sure if it needs Web or App container. Please clarify?
- Makes use of SOAP, Rest Protocl on HTTP
- highly scalable
3. RMI : Is a protocl used for remote communication both EJB and webservices (internally) uses RMI for the remote communication. JDK
comes with RMI shiped with it
- It is a protocl
- EJB uses this Protcol to publish the service, EJB as a frame work also provides various other functionalities
- JDK readly comes with this protocl. by implementing the RMI interface we can do remote communication but we wont get all those functionalities provided by EJB
JDK hosts this on its standard server like Mbean server
4. Mbeans : Again both service and client should be of Java Type. Doesnt need App or Web servers rather gets hosted on Java Standard Server (also called Mbeanserver)
if we want to expose a service to a small group say internally we can expose it using Mbean without any App or webserver. If we want to extend it to
outside world we can establish an interaction between webservice and Mbean.
- Not sure what protocl maybe RMI. Please clarify?
- makes use of JMX infrastructure.