You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Calum Miller <ca...@yahoo.com> on 2008/03/13 22:43:26 UTC

JMSDispatcher issue

Hi,

I tried following the JMS connection example in serviceengine.xml but 
kept getting a null pointer exception in ServiceDispatcher, here

    public LocalDispatcher getLocalDispatcher(String name) {
        return localContext.get(name).getDispatcher();
    }

Reason being the the name getting passed in is "JMSDispatcher" from 
AbstractJmsListener

    protected AbstractJmsListener <javascript:searchRef('AbstractJmsListener')>(ServiceDispatcher <javascript:searchRef('ServiceDispatcher')> dispatcher <javascript:searchRef('dispatcher')>) {
        DispatchContext <javascript:searchRef('DispatchContext')> dctx <javascript:searchRef('dctx')> = new DispatchContext <javascript:searchRef('DispatchContext')>("JMSDispatcher", null, this.getClass <javascript:searchRef('getClass')>().getClassLoader <javascript:searchRef('getClassLoader')>(), null);
        this.dispatcher <javascript:searchRef('dispatcher')> = new GenericDispatcher <javascript:searchRef('GenericDispatcher')>(dctx <javascript:searchRef('dctx')>, dispatcher <javascript:searchRef('dispatcher')>);

    }

When JMSDispatcher is changed to "entity-default" then things work fine.

Calum