• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about RMI  RSS feed

Ian Gumby
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.

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('');

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!