Ian Boston wrote:
> Has anyone noticed problems reloading a servlet bundle ?
> 
> After a reload of a bundle containing a servlet I find that the original
> servlet is still used, verified by logging "this".
> 
> I know the old servlet was unloaded by OSGi since its references become
> null after the reload. It looks like the servlet is not being removed
> from the ServletResolver.
> I will have a deeper look but thought I should ask if anyone else is
> seeing the same or if its just me.
> 
> Using a reasonably recent Snapshot
> 
I could imaginge a bug in one of the two:
- the servlet resolver caches the servlet. There should be OSGi events
when the bundle is updated and this should clear the cache.

- the new dynamic class loader is still wired to the old bundle. The
class loader listens for bundle events and then throws away the
underlying class loader and creates new ones.

So maybe one of those two mechanisms is not working properly.
If you could provide a test case I could help searching.

Carsten

-- 
Carsten Ziegeler
[email protected]

Reply via email to