This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of React Cookbook: Recipes for Mastering the React Framework and have David Griffiths & Dawn Griffiths on-line!
See this thread for details.
Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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: 4686
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.
 
Police line, do not cross. Well, this tiny ad can go through:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic