Jeff McAffer wrote:

There is some work on this going on in Eclipse/Equinox. In particular, Eclipse 3.1 has support integrating code that uses context classloaders.

I am not sure what all of this has to do with the context class loader...unless the idea is to find a scheme to automatically set the context class loader so that the correct class loader gets used. I don't see how this would work though.

In Equinox there is some work on running multiple Equinox OSGi frameworks in a server. This includes some investigations into the URL handler issues. Right now this work is a bit obscure but if you check out the mailing list archive/newsgroup you should find some what you're looking for. See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=107909.

I have always tried to make sure that it was possible to have multiple instances of the framework running at the same time...this is getting more tricky now.

I am working on the URL Handlers service and it is not going to be pretty, but I think I have a solution that will work for multiple framework instances in a single VM. However, this solution assumes that there are no independent 3rd parties also trying to control the handler and content factories.

I will post some thoughts on this next week, perhaps.

-> richard

Jeff

Sylvain Wallez <[EMAIL PROTECTED]> wrote on 09/27/2005 10:52:01 AM:

Martijn Dashorst wrote:

This is possible (at least with Oscar 1.0.5.), there are some concern you have to take into account. First you need to make sure you use the

correct classloader to get to the classes embedded in the bundles. That should be too hard a problem.
Can you elaborate on this point? Is it about setting the correct thread's context classloader?

What doesn't work well is synchronizing the oscar loaded objects across a cluster and serializing the objects into the session.

Though the serialization works pretty well, the receiving side can't instantiate the objects, as the classes can't be found by the servlet container's classloader.
Right. That's where having the servlet engine running as a bundle makes a difference.

The Wicket framework has run into this problem as well. Everything works quite well when run in a whole OSGi environment, but when there's a mix'n'match with classloaders your in for some hard thinking. We woul also like to see some solution for this problem ;-) Bright ideas are welcome!
Thanks for this answer!

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Reply via email to