Extending the MessageHandlerListener

Somebody might have recognized as well that the detail level of instructions at the Extending Sametime 7.5 Redbook is getting less the further you are progressing in the book. That’s a concept I really like for two main reasons. First because you don’t want to get told with every new extension point you are using how you have to add the dependency to the project and what steps you have to do to add a new class, secondly because you start running into your first errors and learn a lot about the development as well as the runtime environment while trapping these errors. This time I followed the example for the extension of the Message Event Notification extension point from page 154. Guess what? I ended up with this message:

The type com.ibm.collaboration.realtime.magiccarpet.MessageEventAdapter cannot be resolved. It is indirectly referenced from required .class files

Looking back, after I have discovered the reason for this error message, the whole solution seems to be straightforward.
I actually tracked down the solution for this error in importing the com.ibm.collaboration.realtime.sample.snippets_1.0.3.jar from the sample packet, which comes with the Sametime 7.5 SDK. Fortunately this packet contained the same extension as a sample. So I copied and pasted the whole classes (in this case SampleMessageHandler and SampleMessageHandlerAdapter) into my packet discovering that even the original IBM code did not work. This could only mean that there wasn’t a coding error at all.
After a while I discovered that my packed did not contain the com.ibm.collaboration.realtime.magiccarpet dependency therefore the MessageHandlerAdapter had been unable to reference the MessageEventAdapter which is defined in the *.magiccarpet packet.
I would consider this as another experience to be added to my repository.

Leave a Reply

Your email address will not be published. Required fields are marked *