well, there is a way to do it, but it takes a few method calls. it also
relies on the fact that the implementation of IsolationLayer is static.
from anywhere in the same .war as your muse application (doesn't have to be
part of the muse stuff), you can do this:
IsolationLayer il = new AxisIsolationLayer();
ResourceManager mgr = il.getRouter().getEnvironment().getResourceManager();
// use mgr object to lookup any resource in the application
Note that the IsolationLayer API is not part of the public API, so no
guarantees it won't change, but I will say that it's the very core of
muse-core, and we don't change that code without a really, really good
reason.
Dan
"Vinh Nguyen \(vinguye2\)" <[EMAIL PROTECTED]> wrote on 05/09/2007
06:53:12 PM:
> Is there a way to programmatically get a resource instance from outside
> a capability class? For example, is there a static method somewhere to
> get the single ResourceManager instance in the system?
>
> Currently, getResource() and getResourceManager() is only available
> within the context of a capability or resource. I'd like to create some
> reporting classes that can any resource instances currently in the
> system, without the reporting classes having to be capability operations
> themselves.
>