Binding an RMI Service, service naming convention?

Questions and answers on developing, deploying and using plugins and JavaBeans

Binding an RMI Service, service naming convention?

Postby sdevlin » Mon Jun 21, 2004 6:43 pm

I am trying to implement a Client/Server plugin combo and am recieving a NotBoundException when requesting the service through the IClientAccess object. There is not a lot of documentation on this, but I noticed in the Mail plugin that the service name is prefixed with "servoy."
What is the proper naming convention for binding an rmi service through servoy?

sean
sdevlin
 
Posts: 125
Joined: Tue Apr 13, 2004 3:33 am

Postby Jan Blok » Thu Jun 24, 2004 12:22 pm

the best naming to use is your url in reversed order (do not use "servoy" !), example:
www.mycompanyname.com whould result in the rmi lookupname:
com.mycompanyname.MyRMIObjectName
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Still Cannot Bind RMI Service

Postby sdevlin » Thu Jun 24, 2004 7:18 pm

I still haven't been able to successfully bind an RMI service through Servoy. When starting up servoy server, I get an exception report in the terminal:

java.rmi.server.ExportException: object already exported

My plugin is a simple HelloWorld-type plugin that extends UnicastRemoteObject. I tested the client/server combo independant of Servoy and everything worked fine.

I cannot figure out how the object could already be bound. This exception is thrown when I restart the Servoy server and even when I restart the machine. As I said before, it also works fine when I bind it to 1099 myself. Any Ideas?...

Thanks,
Sean
sdevlin
 
Posts: 125
Joined: Tue Apr 13, 2004 3:33 am

Postby Jan Blok » Mon Jun 28, 2004 1:04 pm

I have no idea (do you call registerRMIService twice?), the in which way does your plugin differ from opensource mail plugin (source is in the jar file)
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Fixed

Postby sdevlin » Mon Jun 28, 2004 7:18 pm

I noticed the MailServer plugin does not subclass UnicastRemoteObject. The test plugin that I wrote does. So I changed my plugin to only implement the interface that extends Remote and recompiled the stub and skeleton classes and it worked. RMI is pretty new to me and I don't really know the significance of extending UnicastRemoteObject. (Maybe the object exports itself from the constructor and so the call to register it is redundant - I noticed that the constructor declares to throw a remote exception)

Thanks,
Sean
sdevlin
 
Posts: 125
Joined: Tue Apr 13, 2004 3:33 am


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 11 guests

cron