wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Must I use rmic when I'm choosing RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Must I use rmic when I Watch "Must I use rmic when I New topic
Author

Must I use rmic when I'm choosing RMI

pkinuk Buler
Ranch Hand

Joined: May 22, 2009
Posts: 62
Hi, folks. I am reading the book 'SCJD EXAM with J2SE5' which shows an example of creating a DVD rent system. I've noticed one of paragraph:
■Caution
Even though Java 5.0 has added dynamic stub generation to alleviate RMI developers from
explicitly invoking rmic on their remote classes prior to runtime, you must still do so for the certification
project. This is important: The use of rmic is still required as of this writing for the Java developer certification
project.



Because I've decided to use the RMI as my server-client communication. However, I can't find any requirements in my assignment to say I must use the rmic. (My assignment is Bodgitt and Scarper v.2.2.1)


Must I use the rmic in my assignment?
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

pkinuk Buler wrote:Must I use the rmic in my assignment?


Champion, this is one interesting question! I guess I was the only one that didn't generate any stub. Most of the people around here chose to run rmic.
Please take a look here. This is another thread that discusses a similar question.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

Roberto Perillo wrote:I guess I was the only one that didn't generate any stub. Most of the people around here chose to run rmic.

That's because I convince people not to take the risk of automatic failure, it's easy and not a lot of work (certainly if you use an Ant-script to build your submission jar, like I did).

Kind regards,
Roel

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Naveen Narayanan
Ranch Hand

Joined: Sep 11, 2007
Posts: 114

Hi all,
I also generated RMI stubs in the submission.
Like Roel said, probably I thought it is better to be on the safer side and get away from an automatic-failure

SCJP 5.0, SCJD, SCWCD
Matheus Mendes
Ranch Hand

Joined: May 15, 2007
Posts: 66
Hi Guys !


I followed the same steps as perillo, I didn't make any stub, and wasn't any problem..


The Death of one is a tragedy, but the Death of a million is just a statistic. Joseph Stalin

SCJP 6.0, SCJD
David Kachen
Ranch Hand

Joined: May 20, 2010
Posts: 42
Hi all,
Roel De Nijs wrote:
That's because I convince people not to take the risk of automatic failure

why this may happen?
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

Because it is a must requirement (although many people have passed without generating the rmi stubs, using rmic)
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4343
    
    8

I think at some point the instructions may have been updated. Mine don't say anything explicit about rmic or generating stubs. They just say "You must provide all classes pre-installed so that no dynamic class downloading occurs", which I don't think is relevant to rmic (though, I'll admit, it's some time since I used RMI!).
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

From this url:
This release adds support for the dynamic generation of stub classes at runtime, obviating the need to use the Java(tm) Remote Method Invocation (Java RMI) stub compiler, rmic, to pregenerate stub classes for remote objects. Note that rmic must still be used to pregenerate stub classes for remote objects that need to support clients running on earlier versions.

So use of rmic is a must requirement to pre-generate the stub classes (although many people passed already without doing so, maybe Oracle/Sun needs to update their instructions)
David Kachen
Ranch Hand

Joined: May 20, 2010
Posts: 42
Hi all,

I think that Matthew is rights. I did not find any critical requirements in my assignment.
Roel, could you show me this requirement in your assignment? if you is not difficult. I would like to make sure that no such requirements in my assignment.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

Matthew shows this must requirement in his post:
You must provide all classes pre-installed so that no dynamic class downloading occurs


It clearly states that all classes should be pre-installed. And how you can check this, can be read in this thread.
David Kachen
Ranch Hand

Joined: May 20, 2010
Posts: 42
Thanks Roel, now I understand everything.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

But like I said: many people passed already without generating these classes, so I don't think it is still a must requirement
David Kachen
Ranch Hand

Joined: May 20, 2010
Posts: 42
I think that it is better to make Stub and dont worry about this. Besides, this does not demand the big efforts.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

David Kachen wrote:Besides, this does not demand the big efforts.

That's true!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Must I use rmic when I'm choosing RMI
 
Similar Threads
rmic tool needed?
RMI, stub and skeleton locations
rmic unnecessary for SCJD project?
rmic compiling errors
Generating RMI Stub for Java 1.4.2