Mail Archive Home | carol List | March 2005 Index
| <-- Date Index | <-- Thread Index --> |
Bordet, Simone wrote:
Yes it support multiple protocols at once but only providerurl by protocol. The aim is to have a 1 - n relation between one protocol and n provider url.Maybe we can split the Configuration concept into 2 parts :
the Protocol and the Configuration.
the Protocol will be dealing with some kind of static configuration that is linked to a protocol (jrmp, iiop, jeremie, ...) such as initialContextFactory classname, PortableRemoteObjectDelegate, ...
I was under the impression that carol can support multiple protocols at once, and that this was the reason to have one config file for all protocols.
Protocol are, in my mind, somehow static : loaded at startup, and Configurations are attached to it after. No need to add programmatically a new protocol.
and the Configuration will be a personnality of a given Protocol : it may add some "instance" property such as provider URL, or any other property that may differ from a Configuration to another.
That's the dynamic part that will permit to have 2 JRMP Configurations (will share the same Protocol), the first one pointing to a registry A and the second one to the registry B. (this is not actually feasible)
Really ? I would be surprised if not.
Can I specify the provider URL for JNDI lookup to InitialContext.lookup() and get stubs from 2 different naming servers ?
Have I misunderstood your point ?
InitialContext ctx = new InitialContext(); ctx.lookup("rmi://host/server1"); ctx.lookup("iiop://anotherhost/server2");
What above is carol-independent.
InitialContext ctx = new InitialContext(); Configurations.setCurrent("rmi"); // or whatever else ctx.lookup("rmi://host/server1"); Configurations.setCurrent("iiop"); // or whatever else ctx.lookup("iiop://anotherhost/server2");
This is not carol-independent.
However, my primary concern wasn't about JNDI, but about export of remote object, but again I'm no carol expert.
Someone give you the following code :
InitialContext ctx = new InitialContext();
ctx.lookup("myObject");
But for now there is a problem as one protocol = one provider url So if we set JRMP if cannot handle registry jrmp 1 and registry jrmp 2.
With config we could do (simplified way)
InitialContext ctx = new InitialContext();
ctx.lookup("myObject");
Config c2 = Repository.newConfig("jrmp") c2.setProperty(url, "jrmp://titi:2345"); Repository.setCurrent(c2);
InitialContext ctx = new InitialContext();
ctx.lookup("myObject");
And we will have the same code which has use two different registries.
Note that it can be done with :
InitialContext ctx = new InitialContext("jrmp://titi:2345");ctx.lookup("myObject");InitialContext ctx = new InitialContext("jrmp://toto:1234");ctx.lookup("myObject");Florent.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
| <-- Date Index | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.