private synchronized RMIConnection getChain()
{
if (chain == null)
{
// TODO: here we hardcode the server invocation chain. Maybe worth to remove this hardcoding ?
RMIConnection serverInvoker = new RMIConnectionInvoker(server.getMBeanServer(), defaultClassLoader, environment);
chain = RMIConnectionSubjectInvoker.newInstance(serverInvoker, subject, context, environment);
}
return chain;
}