You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Colin Crist <co...@hermesjms.com> on 2006/09/11 14:41:52 UTC

[java] Issue: org.apache.commons.lang.NotImplementedException thrown in not yet implemented code

Hi,
 
org.apache.commons.lang.NotImplementedException is a runtime exception and
in Hermes I handle and work around any JMSExceptions thrown that are not
really fatal to the action underway. I do however treat runtimes as fatal
errors and stop any action, for example when duplicating a message for
copying from A to B i use a generic duplicate method that copies everything,
including JMSDestination (its used in many places where somethings this is
needed) as this is spec compliant even if the message gets sent somewhere
else.
 
e.g.
 
2006-09-11 12:28:59,568 [Hermes ThreadPool-2] ERROR
hermes.impl.DefaultHermesImpl - Code is not implemented
org.apache.commons.lang.NotImplementedException: Code is not implemented
 at
org.apache.qpid.client.message.AbstractJMSMessage.setJMSDestination(Abstract
JMSMessage.java:182)
 at hermes.impl.DefaultHermesImpl.duplicate(DefaultHermesImpl.java:793)
 at
hermes.browser.tasks.CopyOrMoveMessagesTask.createMessage(CopyOrMoveMessages
Task.java:89)

I appreciate that over time these exceptions will disappear but in the
meantime would it be possible to either replace these exceptions with a
checked subclass of JMSException or make sure that any new
NotImplementedExceptions that appear in the code use a JMSException
subclass?
 
I've added a workaround in Hermes that at least works around the above but I
do try and avoid too many workarounds like this in the code as its messy
(and there are already several for other providers already...) It can of
couse also hide real problems and there are probably other code paths in
Hermes that will fail unduely because of the above.
 
FYI, I'm almost finished with a small tutorial on using Hermes with QPID,
hopefully you developers will find it useful and its a handy front end to
use for those interested wishing to have a look at QPID...
 
Regards,
 
Colin.
http://hermesjms.com