Weird behaviour of Properties class as far as defaults go

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird behaviour of Properties class as far as defaults go

Jacek Laskowski
Hi,

I'm completely stumped - how does the defaults work in
java.util.Properties class?

If you're curious what I'm after, take a look at IvmTestServer class,
esp. its init method. There's  the following snippet:

            props.put("java.naming.factory.initial",
"org.apache.openejb.client.LocalInitialContextFactory");
            Properties p = new Properties(props);
            p.put("openejb.loader", "embed");
            new InitialContext( p );

The aim of it is to initialize openejb embedded, but it won't happen
as the props are not consulted by InitialContext constructor (!) When
I changed new InitialContext(p) with new InitialContext(props) it
worked as expected. Why is that? I can't find the answer :(

Jacek

--
Jacek Laskowski
http://www.JacekLaskowski.pl

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Weird behaviour of Properties class as far as defaults go

Brett Porter-2
I'm not sure anyone is still listening at the codehaus email list :)

- Brett

On 18/05/2007, at 8:58 PM, Jacek Laskowski wrote:

> Hi,
>
> I'm completely stumped - how does the defaults work in
> java.util.Properties class?
>
> If you're curious what I'm after, take a look at IvmTestServer class,
> esp. its init method. There's  the following snippet:
>
>            props.put("java.naming.factory.initial",
> "org.apache.openejb.client.LocalInitialContextFactory");
>            Properties p = new Properties(props);
>            p.put("openejb.loader", "embed");
>            new InitialContext( p );
>
> The aim of it is to initialize openejb embedded, but it won't happen
> as the props are not consulted by InitialContext constructor (!) When
> I changed new InitialContext(p) with new InitialContext(props) it
> worked as expected. Why is that? I can't find the answer :(
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Weird behaviour of Properties class as far as defaults go

aionkinahjet12
This post has NOT been accepted by the mailing list yet.
This post was updated on .
We are the greatest provider of money for you, we are selling on the internet, the price is so inexpensive, if you want to know more information about Fifa world cup Greatest Team Silver coins, and you can come here to have a check out. Now let us discuss some information of the encounter. http://www.fifa2coins.com/