-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

David Kerber wrote:
> No, I'm using <env-entry>, with this in server.xml:
> 
>      <Environment name="fileImportInterval" type="java.lang.String"
> value="60"/>
> 
> This in web.xml:
>    <resource-env-ref>
>        <resource-env-ref-name>fileImportInterval</resource-env-ref-name>
>        <resource-env-ref-type>java.lang.string</resource-env-ref-type>
>    </resource-env-ref>

Aah, okay. That's the same thing as <env-entry> in web.xml, I think.

> public static String getEnvironmentVariable( ... )
>         InitialContext initCtx = new InitialContext();
>         Context envCtx = (Context) initCtx.lookup("java:comp/env" );
>         envCtx.lookup( envVarName );

That looks good.

> Is that what the above method does?  Or is there another way?  Remember,
> my ultimate goal here is to be able to change these settings without
> bouncing my webapp.

Right. Since you are getting those values from JNDI, you can simply
replace them in JNDI. Instead of using envCtx.lookup(varName), use
envCtx.bind(varName, newValue) to change it.

Instance preference change.

A JNDI browser might simplify this for you if you can either deploy it
into your existing application, or if you can somehow connect to it from
the outside. Otherwise, you can write some quickie preference editor
yourself.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuPPC9CaO5/Lv0PARAqc4AKCwXw6l6DUdFnp16dqDX3i21yM0PwCfaaid
j6doWZ3B+KZcG0/uIgLTyKM=
=fLpv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to