I have found the next caveat:
Extending DiRMI ClassResolver and Environment class.
class ClasspathResolver implements ClassResolver {
public Class resolveClass(String name)
throws ClassNotFoundException {
return Thread.currentThread().contextClassLoader.loadClass(name)
}
}
class GEnvironment extends Environment {
public Session newSession(ChannelBroker broker) throws IOException {
def session = super.newSession(broker)
session.classResolver = new ClasspathResolver()
return session
}
}
And that's all folks! It works!
No comments:
Post a Comment