• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Mbean Vs Webservices Vs EJB Vs RMI

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

We have

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?

Thanks
Chandra
 
Chandra shekar M
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Here are some of my findings.

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.

Please correct and add more details.

Thanks
Chandra
 
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will argue that there are rarely good engineering justifications for using RMI any more. Just use REST.
reply
    Bookmark Topic Watch Topic
  • New Topic