• 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 conformance

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question regarding the requirement to provide all RMI classes pre-installed "so that no dynamic class downloading occurs".

Is there any way to be sure that I have provided "stub" classes for all classes I need, in other words is there any way to check that no class is being dynamically loaded?
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I ran the rmic command with ant during my build procedure:



So, among my compile classes I had:
RemoteServicesImpl_Skel.class
RemoteServicesImpl_Stub.class

For me, having these 2 classes proves that it is not being loaded dynamically. If RMI is working without the stubs and skeletons, it must be loaded dynamically.

That is at least my understanding, anyone else is welcome to add to my reply.

Regards,
Alex
[ August 31, 2008: Message edited by: Alex Belisle Turcot ]
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Roman,

according to this : http://java.sun.com/javase/6/docs/api/java/rmi/RMISecurityManager.html, dynamic stub downloading can occur only if you
have installed a SecurityManager. Check your assignment, but is is likely that using a SecurityManager is forbidden. So, not using a SecurityManager should grant you that no dynamic downloading stub will occur.

But there is more on this, as from JDK 1.5, the RMI framework is able
in some case to generate the stubs at runtime, see :
http://java.sun.com/javase/6/docs/technotes/guides/rmi/relnotes.html
at chapter "Dynamic Generation of Stub Classes (since 5.0)".
So "no dynamic downloading" is not the same that "all RMI classes pre-installed". Use rmic on the class implementing the Remote interface,
and you'll be safe.

Gilles
[ September 02, 2008: Message edited by: Gilles Marceau ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic