Hi!
Jason Dillon wrote:
> Hello, I sent mail to the users list a short while ago about the
> *HandleImpls not using the correct InitialContext. I spent a little time
> looking into how to fix this and I ran into a small problem... how to get
> the JNDI provider url from a default InitialContext (ie 'new
> InitialContext()`).
>
> It seems that I can get the factory name, as well as the url pkg prefixes
> from 'getEnviroment()', but still no provider url.
>
> I am wondering if there is a generic was to get this from JNDI, or do I have
> to hard code this to be specific to jnp when this value is not set in the
> context's env or in the system properties?
>
> Also, I am curious if you ever see anyone wanting to plug in another JNDI
> impl?
>
> Assuming that jnp is going to be used in 90% (or more) of the cases, then if
> the url is not provided, I could ask the naming service (not really how to
> do that at the moment) what it should be... or perhaps there is an easier
> way to get this from jnp?
>
> Any ideas on where I should be looking in jnp or jndi for this? I spent a
> little time looking over jnp (not very complex), but perhaps I am just
> missing something.
>
> Do you think it would be too unreasonable to require a provider url in
> system properties? Would this mess up the local naming server? Or would it
> be possible to modify jnp to return the provider url in a default
> InitialContext?
The best solution would probably be to modify JNP to include provider
URL in environment.
Note that if you use JNP from within the JBoss JVM the provider URL
*should* be null. It is only set if you use it from client JVM's.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]