wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI & Stubs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI & Stubs" Watch "RMI & Stubs" New topic
Author

RMI & Stubs

Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

As of Java 5 there is no longer a need to generate stubs using rmic.

The release notes for Java 5 tell us the following:
When an application exports a remote object (using the constructors or static exportObject methods1 of the classes java.rmi.server.UnicastRemoteObject or java.rmi.activation.Activatable) and a pregenerated stub class for the remote object's class cannot be loaded, the remote object's stub will be a java.lang.reflect.Proxy instance (whose class is dynamically generated) with a java.rmi.server.RemoteObjectInvocationHandler as its invocation handler.


What I was wondering was: when you do not generate stubs using rmic, is this process that occurs (as described in the quote above) regarded as dynamic class loading?


SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11525
    
100

Yes, and we received confirmation from Sun back when Java 5 came out (and I also asked Sun about this for the SCJD book) that you needed to create stubs - using the auto generation / dynamic class loading feature was not allowed for the SCJD exam.

Since then many candidates have passed without generating stubs.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Cheers for the reply Andrew. That clears it up.

I wonder from the candidates who did not generate stubs whether they explicitly mentioned this decision in the choices.txt. I would be in two minds (1) mentioning it highlights it and the assessor may delve into this issue (2) not mentioning it may result in the assessor thinking you didn't understand what you were doing.

I know Roberto told us that he mentioned the fact that he did not generate stubs in his choices.txt.

I guess the safest thing to do is generate stubs. With Oracle requiring everyone to take a course after the 1st Oct, I guess it would be unwise to give them any reason to fail you, which a skeptic may say they would deliberately do in order to gain further revenue (even though they have set a precedent as we have seen from Roberto).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI & Stubs