• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejb vs. rmi

 
Fred Abbot
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i was hoping someone can help me with the pros and cons of ejb and rmi i am running a java application written in ejb we were having problems with the ejb server so for test purposes we switched to rmi the question is why switch back to ejb for production
thanx
Fred
 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejb is the extension of rmi
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is, if you were able to get what you wanted with RMI, then going back to an EJB model is probably more than you really need.
The idea of an EJB is to provide the underlying services needed in a middleware environment -- a logical container for objects, thread pooling, connection pooling, inter-object messaging, persistence, yada yada. Those services being provided as a foundation, the programmer should be able focus on writing whatever business logic is required.
Of course, nothing comes for free. To get all those services ready to go, there's no trivial amount of understanding that goes into how the EJB container needs to be set up and maintained. One general recommendation: don't need those services? Don't use the implementation that provides them.
Personally, I'd wait for the Compelling Need to persuade me that returning to the EJB model makes sense.
I would not call EJB an extension of RMI. The remote semantics are of course similar, but RMI does nothing to separate business logic from the underlying infrastructure that supports using that logic in a middle tier deployment.
-----------------
Michael Ernest, co-author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!