Am 22.06.2011 22:00, schrieb Igor Vaynberg:
If the page class in bundle A directly references the component class C from bundle B (and not just an interface or base class of B from another bundle X), then the bundle class loader of A can load class C by delegation.not sure if that is true. given Wicket lives in bundle W we have a component bundle C which provides component CommentPanel and imports W we have an application bundle P which provides page PostPage and imports W and C someone does class PostPage extends page { PostPage() { add(new CommentPanel("c")); }} so PostPage has a reference to class CommentPanel from C wicket serializes PostPage. now wicket deserializes PostPage from disk. W classloader now needs to load PostPage and CommentPanel, but it sees neither of those because it doesnt import them.
You're right, W's classloader cannot see the class from P or C. But the thing is, when Wicket deserializes the page, it could use a derived ObjectInputStream and override resolveClass() to use the class resolver registered by the application.
This resolver wraps the bundle class loader P of the application, which is able to load both PostPage and CommentPanel.
Regards, Harald --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
