• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why RMI?

 
Renzo Zanelli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just starting to do research for the SCJD and I plan to start work on it at the beginning of the coming year.
I have read through the various posts and I noticed that everyone used RMI. Why? Why not EJB? Does Sun specify that the server use RMI? I can understand that it is easier to implement and run an RMI server, vs and EJB server, but what about from a design standpoint? If the project specifies that you need to implement a ticketing system for a fictitious airline, wouldn't an EJB server be a better design choice? Please keep in mind that I haven't downloaded the assignment yet, so I am quite ignorant as to the specific requirements.
Also, what is the policy in using third party software/classes? Obviously you require an EJB container to deploy your EJB server, for example.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You pointed it out when you said you haven't downloaded the assignment yet. Because it is in the specs that you use Object Serialization or RMI. EJB is not a choice.
Mark
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be so cool! Why don't they let us use EJB for remote execution? create some CMP-schemas so EJB container can generate JDBC code for us? use a Sql DB to take care of locking and concurrect access? Use some Swing-GUI builder to drag-and-drop our user interface, JBulder's Data-Swing components for exapmle? If you really wanna be cool, use some security policy servers like Netegrity, some xml-to-java frameworks....wouldn't this be great???
Well, the reasons Sun people being such pain in the butt are that:
1. This is a Java 2 Standard edition developers exam, neither EJB nor JSP nor JMS are not part of J2SE. If you'd like to test your J2EE knowledge there is a different exam for that.
2. The whole point of this exam is to test your skills in using lower level API like RMI, threads and Swing, and also test your design skills: can you build a network server? or a muti-user safe database?

 
Renzo Zanelli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, yeah, sure. I don't debate the cool factor .. there is some really cool stuff that can be leveraged, like aspects for handling logging in a pinch.
But I was just thinking about EJB from a real world design standpoint. I could just as easily have said CORBA (RMI over IIOP!). I was just curious to know if the assignment narrowed the field on choices or if there was another reason why everyone picked RMI.
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, this is J2SE exam. This is the world where EJB,CORBA, Apache and Weblogic don't exist. The only way to build network components in J2SE are straight sockets or RMI, luckily RMI is a part of J2SE. That is why this test mandates you to use either one of these technologies. As to the real world, you may never have to write RMI apps but EJB runs on top of RMI and knowing how RMI works makes you better inderstand how EJB works. Besides, in the real world you never have to know how to calculate 2's compliment or what the order of execution of superconstructors is, but they make you learn it anyway for SCJP, dont they?
These exams are mostly academic in nature, designed to enhance and formalize your knowledge in the subject, and should be treated as such.
Once you have taken your SCJP exam you can go straight to J2EE Architect certification, that one seems more appropriate for your skillset. J2EE Arc does not require J2SE Developer as a prerequisite.
[This message has been edited by Gennady Shapiro (edited December 17, 2001).]
 
Renzo Zanelli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Point taken, especially your comment on their nature being academic .. I hadn't thought about it that way and it certainly helped bring things into focus. Thanks.
SCJD first, J2EE Architect next. I have committed myself to doing things in their natural ordered progression. There are valuable learning (and humbling) experiences all along. First I crawl, then I walk, then I consider running .. one down, two to go.
 
Greg Georges
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, in my honest opinion using EJB in a simple project like this would be overkill. Much caution must be taken when thinking about a J2EE archetectual design. EJB should only be used in very complex projects where certain facilities are needed (including clustering, transactions, etc.). Even today, many e-commerce sites which are using servlets and JSP do not need to use EJB, because the cons overweigh the pros (performance, increased development time, more complex routines). For simple projects, using a simple DAO pattern and JDBC is enough to accomplish a high performance system. I totally agree that if this flight services project would be to develop the American Airlines system, we would have no choice but to use full-fledged j2ee. Anyways, I see EJB slowly disappearing from the scene once JDO comes out, check it out on `java.sun.com .
------------------
Greg Georges
Sun Certified Java Programmer for the Java2 platform (SCJP)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic