| Author |
Codebase setting and rmiregistry
|
Mike Himstead
Ranch Hand
Joined: Apr 12, 2006
Posts: 178
|
|
Hi,
I'm reading up on RMI and tried the Java 5 RMI example over at Sun's web tutorial. Right now, two things remain unclaer to me:
1) At least for the tutorial, I started the RMI registry manually. How does the RMI registry work in conjunction with Tomcat or a full-fledged application server like Glassfish, JBoss or Websphere? My googling wasn't very successfull. So far I assume that each container automatically starts up a RMI registry, but how and when do I bind my objects, at application start up / deploy? Or is my assumption wrong anyway?
2) I admit that right now I don't understand Sun's note about the codebase. Is this a mandatory option/security policy one has to set? Are remote objects always downloaded to the client machine or is this an option?
|
 |
Nitesh Kant
Bartender
Joined: Feb 25, 2007
Posts: 1638
|
|
Mike Himstead wrote:
1) At least for the tutorial, I started the RMI registry manually. How does the RMI registry work in conjunction with Tomcat or a full-fledged application server like Glassfish, JBoss or Websphere? My googling wasn't very successfull. So far I assume that each container automatically starts up a RMI registry, but how and when do I bind my objects, at application start up / deploy? Or is my assumption wrong anyway?
LocateRegistry.createRegistry will create(start) an RMI registry programatically, so, it can be used if someone does not want to start it manually.
Mike Himstead wrote:
2) I admit that right now I don't understand Sun's note about the codebase. Is this a mandatory option/security policy one has to set? Are remote objects always downloaded to the client machine or is this an option?
No a codebase is required only if you want to facilitate dynamic class downloading for clients. If your clients do not want to download any class definitions then this is not required.
|
apigee, a better way to API!
|
 |
Mike Himstead
Ranch Hand
Joined: Apr 12, 2006
Posts: 178
|
|
Sorry for my late replay and thanks for your answer. Concerning my questions:
1) So in a webserver I might run a servlet to start/create a registry and bind my objects or is there a more standardized JEE way?
2) I understand it that dynamic code downloading as an alternative to handing out jar files with my own classes, right?
|
 |
 |
|
|
subject: Codebase setting and rmiregistry
|
|
|