views:

159

answers:

1

Hi,

has anybody tried using a custom classloader with BlazeDS?

We have a web application using BlazeDS and we can convert Java objects in to ActionScript object and back without problems in the main application. However, we also have a plug-in mechanism based on a custom classloader. BlazeDS cannot map the types contained in jar files of that custom classloader since I don't know how to tell it to BlazeDS. Has anybody already done this?

The livedocs of TypeMarshallingcontext show a setClassloader() method, but since the context seems to be a singleton, I assume this will not work if you have multiple custom classloaders (we have 1 for each plugin that is deployed)

regards,

Wim

A: 

I never did that, but I think you can build a custom Classloader which will delegate the findclass method to the children cloassloaders (and check if they are to find it or not), and set this classloader in the TypeMarshallingContext.

Cornel Creanga
See http://forum.springsource.org/showthread.php?p=298599 for it goes so far. I got a proof of concept working, but not there fully yet.
festerwim
Just to confirm that I got it fully working now. Thanks for the help!
festerwim