Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » NamespaceHandler
NamespaceHandler [message #766353] Thu, 15 December 2011 15:50 Go to next message
Frederic Boucher is currently offline Frederic BoucherFriend
Messages: 3
Registered: December 2011
Junior Member

I got some troubles with the NamespaceHandler management in spring-dm and virgo. I explained my problem here: http ://

When spring-dm refresh a spring bundle, it use a DelegateNamespaceHandlerResolver composed of:
- a "local NamespaceHandlerResolver" that use the ClassLoader of the bundle to find the spring.handlers file;
- a "OSGI service NamespaceHandlerResolver" that use an osgi service to find the NamespaceHandler;

In a first time, I thought that my issue come from the "OSGI service NamespaceHandlerResolver" (http ://

But I found this code in the class MetaInfResourceClassLoaderDelegateHook from the Virgo code source:
    private boolean isDelegatedResolverCall() {
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        return isSpringDmDelegatedResolverCall(stackTrace) || isBlueprintDelegatedResolverCall(stackTrace);
    private boolean isSpringDmDelegatedResolverCall(StackTraceElement[] stackTrace) {
    private boolean isBlueprintDelegatedResolverCall(StackTraceElement[] stackTrace) {

It seems that this code is here to avoid to use the "local NamespaceHandlerResolver" when loading the bean definitions using Spring-Dm but I don't understand why ?

Re: NamespaceHandler [message #766701 is a reply to message #766353] Fri, 16 December 2011 09:30 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The purpose of MetaInfResourceClassLoaderDelegateHook is to propagate an attempt to get resource(s) from META-INF to the principle bundle's dependencies, but this is not done if the request is being driven through Spring DM's DelgatedNamespaceHandlerResolver as it would not be appropriate to get namespace handlers directly from a bundle's dependencies. This logic should not affect the behaviour of the local namespace handler resolver as that only depends on looking up resources in a bundle's own META-INF.
Previous Topic:faild to build org.eclipse.virgo.kernel.userregion
Next Topic:Deploy war file
Goto Forum:

Current Time: Wed Apr 01 18:04:42 GMT 2020

Powered by FUDForum. Page generated in 0.01272 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top