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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finally got my rmi based client/server app working.

But I had hit a bit of a wall and today I created a solution.. javascript:emoticon('');

Since I didn't want to create a complete web service, I chose to use the sample class-server.zip from Sun.

It works ok if you are going to put your class files in a directory and you just point to the directory.
It fails miserably when you keep your files in a jar file and just point your codebase to your jar file.
(The simple class doesn't know how to handle jars.)

So I ran in to a little roadblock that didn't make sense....javascript:emoticon(''); .
When I started the server, I could see the registry, but when I was rebinding my instance, it blew up.
javascript:emoticon('');

It turns out that when I did the binding/rebinding of my implementation class, under the covers, the registry is trying to get a copy of the entire jar file.
This was unexpected. Well I fixed the code to handle a jar file request, and it works, but I'm still confused.

I had thought that the registry would have gone to the jar file and requested the single class file. (I had already written the code to handle those cases using a JarFile object....

So my question is why did the registry wan't the entire jar file when I called registry.rebind("Service",obj) ?

Still learning ... javascript:emoticon('');

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic