OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | carol List | March 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [carol] Carol configuration for handling all features request


If you do new InitialContext().lookup("rmi://host:1099/dummyTest")
then you know the protocol to use to call the naming server (rmi).


   Ok, I understand the problem.

For me, using new InitialContext(env) with an hashtable is an explicit call to chose the configuration to use.
So yes, by putting provider_url, etc allow us to choose the right config (in fact we are not in multiprotocol mode anymore).
But there is something which is hardcoded somewhere.


We should do only new InitialContext() without env to be the more portable across all different vendors.
But with this we need an explicit call to carol to change the protocol to use. (and this can be provided by the container).
User code don't call any Carol class, but container do.


Am I right in assuming that before the real remote call to lookup you end up in carol code, so you can figure out the protocol to contact the naming server ?

Sure new InitialContext() always end up into carol code as we have to set the property -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory when using Carol.

But without arguments to InitialContext(), there is no way to find out the "right" protocol without choosing a default one or if container set the protocol.


Florent.


Bordet, Simone wrote:

Hi,



Yes, some carol code is hit anyway on interceptors But when user do in its code : new InitialContext().lookup("dummyTest"),
we have to choose the config/protocol to use (is it jrmp on url1, jrmp on url2, iiop, etc) For now, it uses the first protocol of carol.protocols property.
The interceptors are propagated on the specific protocol but how to determine the protocol for the lookup ? for me it's impossible without an explicit call to set the current config which will be used for the lookup.



Again, I am making assumptions that may be wrong, so be patient with me...

If you do

new InitialContext().lookup("rmi://host:1099/dummyTest")

then you know the protocol to use to call the naming server (rmi).

If you do

Map env = ...
env.put(Context.PORVIDER_URL, "iiop://host");
new InitialContext(env).lookup("dummyTest")

then you know the protocol to use to call the naming server (rmi).

If you do

new InitialContext(env).lookup("dummyTest")

then you call Context.getEnvironment(), and it should contain the content of 
jndi.properties as per JNDI spec.

Am I right in assuming that before the real remote call to lookup you end up 
in carol code, so you can figure out the protocol to contact the naming 
server ?

Thanks !

Simon



When the object is retrieved, all call on this object will use the right protocol but before retrieving it, we didn't know which one choose.

Florent.







------------------------------------------------------------------------





Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.