• 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

Question about dynamic downloading.....please

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I almost finished the assignment but I want to make sure I understand some of the assignment requirement correctly. My question is about the dynamic downloading. The assignment stated that


You must provide all classes pre-installed so that no dynamic downloading occurs


I decided to start RMI registry programmactically.A remote implementation class is trying to create the RMI registry, if it already existed, just get it


My RemoteDataAccessFactory class at the client-side will try to get this remote object from


So
  • I didn't start RMI registry using rmiregistry <port_number> command line.
  • I compiled my source code without using the codebase property ( -Djava.rmi.server.codebase <URL> ) , since this is the case that the dynamic loading might be allowed.


  • I run the test, everything is fine . In my sample client package I need to pack the remote stub into the client package, the remote implementation class could be eliminated. This protects the dynamic loading feature from the client-side. Am I understanding this correctly and still following the requirement?

    Thank you inadvance

    Ken Kirin
    SCJP
    SWCD
    SCJD(B&S 2.2.1 In progress)
     
    Ken Kirin
    Greenhorn
    Posts: 26
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi all,

    It's me agian. Please forget what I talked about compiling the sourcecode actually I would mean running the server without the codebase property
    so I just run my server
    java suncerity.gui.ApplicationLoader server
    or should I better run it with this option
    java -Djava.rmi.server.codebase <URL> ................ server

    Thank you
    Ken Kirin.
     
    Ranch Hand
    Posts: 86
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Just passed the SCJD and decided to answer at least one post.

    I believe you would be in violation of the instructions if you use the -D command line option. My instructions (and everyone else's based on what I've seen on this forum) say:
    "When you submit your assignment, each part (client and server) must be executable using a command of this exact form:

    java -jar <path_and_filename> [<mode>]"

    Further, your invocation line will not contain your main class name as noted in your example. Again, from the instructions:

    "The executable JAR containing the programs. This must be called runme.jar"
     
    Ken Kirin
    Greenhorn
    Posts: 26
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Bridget,

    Now I got it. Thank you very much

    Regards,
    Ken Kirin
    SCJP
    SWCD
    SCJD(B&S 2.2.1 In progress)
     
    Ranch Hand
    Posts: 56
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi!

    You were also wise not to force the user to start the RMI Registry manually.

    Word of warning to you all, a colleague of mine failed the assignment due to not starting the RMI registry progamatically.


    /Dave
     
    I can't beleive you just said that. Now I need to calm down with this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic