Salut Marc, added your bugfixes.
Cheers, Aleks On Sat, 2004-10-09 at 11:51, Marc Wilhelm wrote: > Shash, > > because nobody feels responsible for this bug/fix, i target my question > to you: > > Could you verify this behaviour and update the source of > "KeelJmsClientOpenJMS.java"? Or do you need a patchfile for the two > small modifications in line 229 and line 445? > > Marc > > P.S.: Do you know in which format and how i could pass the config-file > to the swt-client? And how is the conviniest way to start the > swt-client? Exist for this an ant target? > > > -----Ursprüngliche Nachricht----- > > Von: > > [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > com] Im Auftrag von Marc Wilhelm > > Gesendet: Montag, 4. Oktober 2004 22:33 > > An: [EMAIL PROTECTED] > > Betreff: [Keelgroup] Bug in KeelJmsClientOpenJMS > > > > > > > > Hi keeler, > > > > I've tried tomcat with openjms and find out, that in > > $KEEL_HOME\comm-openjms\src\java\org\keel\comm\openjms\clients > > \KeelJmsCl > > ientOpenJMS.java the method <getContext()> makes an > > assignment to null and so returns always null. > > > > [WRONG] > > public Map getContext() { > > return context = null; > > } > > [/WRONG] > > > > [CORRECT] > > public Map getContext() { > > return context; > > } > > [/CORRECT] > > > > This will result in a NullPointerException in method > > <execute()> of the same class (somewhere around line 234): [CODE] > > response = qReceiver.receive( new Long( (String) > > getContext().get(CLIENT_TIMEOUT)).intValue() ); > > [/CODE] > > > > This codeline makes also trouble, when you start a > > OpenJMS-Client (e.g. "ModelTest.java" of the > > "app-eclipse-swt-example") without a config-file like the > > web.xml-file, because the expression > > > > "getContext().get(CLIENT_TIMEOUT)" > > > > ends in > > > > "new Long( null ).intValue" > > > > which will fail. But because all missing parameters are set > > to some defaults (like host = "localhost"; mode = "rmi"; ...) > > it make sence to provide here also a default value for the timeout: > > > > [NEW-CODE] > > int timeout=60000; > > try { > > timeout=new Long( (String) > > getContext().get(CLIENT_TIMEOUT)).intValue(); > > } catch (NumberFormatException e) { > > //nothing to do => using the default value > > } > > response = qReceiver.receive(timeout); > > [/NEW-CODE] > > > > > > BTW: Does anybody know in which format and how i could pass > > the config-file to the swt-client? > > > > Marc > > > http://keelframework.org/documentation > Keelgroup mailing list > [EMAIL PROTECTED] > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com > > http://keelframework.org/documentation > Keelgroup mailing list > [EMAIL PROTECTED] > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com > http://keelframework.org/documentation Keelgroup mailing list [EMAIL PROTECTED] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com