A method and apparatus for enabling multiple application programs to
control a system's physical resources by way of multiple resource
proxies, while still enabling exclusive control of the physical resource
by one application program. Control tokens are used to limit control to
one proxy. The proxy having the control token is tracked in an access
control list. Java API methods that can alter the state of a physical
resource are marked with an access control attribute during grinding. A
resource management module intercepts API methods attempting to obtain
control of the physical resource. If a proxy controlled by the
application program invoking the intercepted method has control the
method is allowed to use the proxy to control the physical resource.