I just record the classes that are serialized and then give those directly back when deserialized.
So it should work now in ALL casses and you shouldn't have to do anything anymore.
johan
On 7/24/06, Niclas Hedhman <[EMAIL PROTECTED]> wrote:
On Tuesday 18 July 2006 02:12, SourceForge.net wrote:
> Initial Comment:
> We're using plugins similar to Eclipse's to decouple
> functionality. Each plugin's classes run in their own
> class loader. specifically, a plugin can have a MyPage
> class (this is done by having our implementation of
> Application that iterates over the XXXPage classes for
> each plugin and uses mount and url coding strategy to
> make the XXXPage accessible from a url)
Also note that the serialization used for cloning has already been upgraded to
use ClassResolver instead. See the thread "Wicket and OSGi" started 20th May.
<quote src="" list, 2 June">
Hi,
A small patch is required for model versioning to work for wicket in
OSGI environment.
Case:
The [ClassNotFoundException] is thrown when Objects#cloneModel or
Objects#cloneObject tries to clone objects that the class is not
resolveable by the Class#forName (used by ObjectInputStream) .
Possible solution:
<code fileName="wicket/util/lang/Objects.java">
package wicket.util.lang;
public abstract class Objects
{
...
private static final class ReplacedObjectInputStream extends ObjectInputStream
{
....
// Note:
// This overide is required to resolve classess inside in different
bundle, i.e .
// The classess can be resolved by OSGI classresolver implementation
protected Class resolveClass(ObjectStreamClass desc)
throws IOException, ClassNotFoundException
{
String className = desc.getName();
Application application = Application.get();
IApplicationSettings applicationSettings =
application.getApplicationSettings();
IClassResolver classResolver = applicationSettings.getClassResolver();
// TODO: How to deal with classResolver that throw RuntimeException?
Class candidate = classResolver.resolveClass(className);
if( candidate == null )
{
candidate = super.resolveClass( desc );
}
return candidate;
}
}
....
}
</code>
This modification does not break wicket testcases :)
Regards,
Edward Yakop
</quote>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop