0
votes

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

1
Are you invoking remote methods from the classes loaded through the plug-in mechanism? - Cornel Creanga
Yes, we got that working but all parameters and the return type have to be from 'built-in' types, they cannot be from a type that is only known in the plugin. - Wim Deblauwe
Note that the context is not a singleton like I mention in my question , but a ThreadLocal. - Wim Deblauwe

1 Answers

0
votes

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.