• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI & Stubs

 
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sean Keane
Ranch Hand
Posts: 590
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic