# Re: Policy.refresh()

schemers@Eng
Wed, 9 Dec 1998 15:40:26 -0800 (PST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Victor: "OVERSTOCK ARTIFICIAL TREES IN TIME FOR THE HOLIDAYS--50% OFF MSRP"
- Previous message: Serafin Jose Estevez Andres: "Policy.refresh()"

When you load the new class are you loading it from a class loader
that was created after the refresh? If not, you will most likely get
a cached copy of the protection domain used for other classes loaded
from the same CodeSource. When you do a refresh, it causes the policy
file to get reloaded, but doesn't have any impact on domains that have
already been created. Any class loaders that have already been created
and have loaded classes before the refresh will have a cached copy of
the domain so the same domain is used for all classes from the same
code source.

roland

Serafin Jose Estevez Andres writes:
> Hello, nice people at sun:
>
> I'm having big trouble trying to use a Policy object to refresh policy
> during run-time: I install security manager, modify policy file, refresh
> Policy, load a new class that tries the permission, and invoke a method
> from this class, using AccessController.doPrivileged. But it still throws
> AccessControlException.
>
> I thought you could tell me where to find some (working) examples of the
> class Policy, specially method refresh(). Can you?
>
> Thanks in advance for your time.
>
> -- Sera.
>
>
>

- Next message: Victor: "OVERSTOCK ARTIFICIAL TREES IN TIME FOR THE HOLIDAYS--50% OFF MSRP"
- Previous message: Serafin Jose Estevez Andres: "Policy.refresh()"