Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI: Confused about Codebases and Policies  RSS feed

 
David Weber
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Questions:
  • Q1) In RMI with dynamic class downloading does the server and clients require the setting of a policy file?
  • Q2) Can one program the setting of the policy file into the client and server? if so, please show how.
  • Q3) Wat needs to be in the policy file, if one stub needs to be downloaded from a web server on the local intranet?
  • Q4) I set the codebase to my netbeans project folder - build - classes. I then copied the server and client to a falsh drive and from another pc ran both the client and server without modifying the codebase and it still worked, whats up with that?
  • Can I program the setting of the codebase to a folder in the client and server?



  • MOST IMPORTANT QUESTION:
  • Do I need dynamic class loading? I will not be changing anything after deployment, so how can I just put a stub in the client package?


  • I normally wouldn't bother anyone with these type of questions but googling has left me more confused than ever.

    Any help would be greatly appreciated,

    Regards,

    David Weber
     
    Nitesh Kant
    Bartender
    Posts: 1638
    IntelliJ IDE Java MySQL Database
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    David Weber wrote:
    MOST IMPORTANT QUESTION:
  • Do I need dynamic class loading? I will not be changing anything after deployment, so how can I just put a stub in the client package?



  • Dynamic class loading is *usually* required when the server developer does not have a control over the client. If both clients and servers are under your control then it makes sense to package the api of your server with the client.
    You need not put the stub (if you are using jdk 5 or above. Now java uses dynamic proxies in place of stubs), you just need the interfaces that are used by the client.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!