-
1. Re: Clustered Rmi Service - How to ?
crobert Jul 8, 2002 11:21 AM (in response to crobert)
Ok. I've investigated the problem a little further, as I got no replies on the forum :(
So far this is how one can get a RMI service clustered:
The code in the section (1.G.II.d) on HA-RMI, from the "Jboss 3.0 Clustering Document" has to be used. Unfortunately this point was not very explicit in that document and basically I had to try every solution that I could think of. The downside is that this code is very AS-specific, making clustering setup for RMI not transparent as opposed to clustering for EJBs, where we don't have to modify the code, but merely edit some deployment descriptors.
Now, if you're not interested in clustering, but still want RMI, there are a number of solutions:
1) The RMI service registers itself to JNDI via context.bind(). (when the cluster is setup, JDNI lookup failover is available though. Not sure how useful this is, but I've mentioned it anyway). Cleints access the service via JNDI.
2) Do it the old fashioned way, with
LocateRegistry.createRegistry();
Registry registry = LocateRegistry.getRegistry();
and then bind() the service to the registry.
Client needs stub for jdk < 1.2 or can download it if the policy file permits this.
Now, the problem is how to make the registry start when the server starts. One solution is from a servlet which is loaded on startup by jetty (inside jboss). Not an elegant solution, but at least it works. In my opinion a nicer way to do this should be made available to the user, although we tend to drop RMI in favor of EJBs and other stuff that uses RMI as transport. RMI must still be ready-to-use in a modern AS, along side "bleeding edge" technologies ;).
Robert -
2. Re: Clustered Rmi Service - How to ?
crobert Jul 8, 2002 11:22 AM (in response to crobert)
Ok. I've investigated the problem a little further, as I got no replies on the forum :(
So far this is how one can get a RMI service clustered:
The code in the section (1.G.II.d) on HA-RMI, from the "Jboss 3.0 Clustering Document" has to be used. Unfortunately this point was not very explicit in that document and basically I had to try every solution that I could think of. The downside is that this code is very AS-specific, making clustering setup for RMI not transparent as opposed to clustering for EJBs, where we don't have to modify the code, but merely edit some deployment descriptors.
Now, if you're not interested in clustering, but still want RMI, there are a number of solutions:
1) The RMI service registers itself to JNDI via context.bind(). (when the cluster is setup, JDNI lookup failover is available though. Not sure how useful this is, but I've mentioned it anyway). Cleints access the service via JNDI.
2) Do it the old fashioned way, with
LocateRegistry.createRegistry();
Registry registry = LocateRegistry.getRegistry();
and then bind() the service to the registry.
Client needs stub for jdk < 1.2 or can download it if the policy file permits this.
Now, the problem is how to make the registry start when the server starts. One solution is from a servlet which is loaded on startup by jetty (inside jboss). Not an elegant solution, but at least it works. In my opinion a nicer way to do this should be made available to the user, although we tend to drop RMI in favor of EJBs and other stuff that uses RMI as transport. RMI must still be ready-to-use in a modern AS, along side "bleeding edge" technologies ;).
Robert -
3. Re: Clustered Rmi Service - How to ?
crobert Jul 8, 2002 11:24 AM (in response to crobert)
Ok. I've investigated the problem a little further, as I got no replies on the forum :(
So far this is how one can get a RMI service clustered:
The code in the section (1.G.II.d) on HA-RMI, from the "Jboss 3.0 Clustering Document" has to be used. Unfortunately this point was not very explicit in that document and basically I had to try every solution that I could think of. The downside is that this code is very AS-specific, making clustering setup for RMI not transparent as opposed to clustering for EJBs, where we don't have to modify the code, but merely edit some deployment descriptors.
Now, if you're not interested in clustering, but still want RMI, there are a number of solutions:
1) The RMI service registers itself to JNDI via context.bind(). (when the cluster is setup, JDNI lookup failover is available though. Not sure how useful this is, but I've mentioned it anyway). Client access the service via JNDI.
2) Do it the old fashioned way, with
LocateRegistry.createRegistry();
Registry registry = LocateRegistry.getRegistry();
and then bind() the service to the registry.
Client needs stub for jdk < 1.2 or it can download it if the policy file permits this.
Now, the problem is how to make the registry start when the server starts. One solution is from a servlet which is loaded on startup by jetty (inside jboss). Not an elegant solution, but at least it works. In my opinion a nicer way to do this should be made available to the user, although we tend to drop RMI in favor of EJBs and other stuff that uses RMI as transport. RMI must still be ready-to-use in a modern AS, along side "bleeding edge" technologies ;).
Robert -
4. Re: Clustered Rmi Service - How to ?
crobert Jul 8, 2002 11:32 AM (in response to crobert)
Ok. I've investigated the problem a little further, as I got no replies on the forum :(
So far this is how one can get a RMI service clustered:
The code in the section (1.G.II.d) on HA-RMI, from the "Jboss 3.0 Clustering Document" has to be used. Unfortunately this point was not very explicit in that document and basically I had to try every solution that I could think of. The downside is that this code is very AS-specific, making clustering setup for RMI not transparent as opposed to clustering for EJBs, where we don't have to modify the code, but merely edit some deployment descriptors.
Now, if you're not interested in clustering, but still want RMI, there are a number of solutions:
1) The RMI service registers itself to JNDI via context.bind(). (when the cluster is setup, JDNI lookup failover is available though. Not sure how useful this is, but I've mentioned it anyway). Client access the service via JNDI.
2) Do it the old fashioned way, with
LocateRegistry.createRegistry();
Registry registry = LocateRegistry.getRegistry();
and then bind() the service to the registry.
Client needs stub for jdk < 1.2 or it can download it if the policy file permits this.
Now, the problem is how to make the registry start when the server starts. One solution is from a servlet which is loaded on startup by jetty (inside jboss). Not an elegant solution, but at least it works. In my opinion a nicer way to do this should be made available to the user, although we tend to drop RMI in favor of EJBs and other stuff that uses RMI as transport. RMI must still be ready-to-use in a modern AS, along side "bleeding edge" technologies ;).
Robert -
5. Re: Clustered Rmi Service - How to ?
crobert Jul 12, 2002 8:18 AM (in response to crobert)
Sorry for the 3 postings or so, but when I did it, the forum was having some kind of problems and although it said "Post OK", I couldn't see the post in the topic! Strange.. That's why I started another topic.