Java publishing is broken in 6.2.1


Yury Batrakov
 

Classification: Public
Hi team,

We found that Java publishing was broken when onSuccess event was introduced. The problem is here - mamapublisherjni.c, function Java_com_wombat_mama_MamaPublisher_initIDs:
publisherCallbackMethoOnSuccess_g = (*env)->GetMethodID(env, publisherCallbackClass,
"onSuccess", "(Lcom/wombat/mama/MamaPublisher;SLjava/lang/String;)V");

But com.wombat.mama. MamaPublisherCallback doesn't have this method and we get exception when trying to create MamaPublisher object (reproduced with MamaPublisherJava example):
Exception in thread "main" java.lang.NoSuchMethodError: onSuccess
at com.wombat.mama.MamaPublisher.initIDs(Native Method)
at com.wombat.mama.MamaPublisher.<clinit>(MamaPublisher.java:31)
at com.wombat.mama.examples.MamaPublisherJava.createPublisher(MamaPublisherJava.java:103)
at com.wombat.mama.examples.MamaPublisherJava.run(MamaPublisherJava.java:313)
at com.wombat.mama.examples.MamaPublisherJava.main(MamaPublisherJava.java:301)

Obvious fix is to add new method to MamaPublisherCallback but it will break the code for those clients who were using publisher events before. What do you think should be the fix for this?


---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to https://www.db.com/disclosures for additional EU corporate and regulatory disclosures and to http://www.db.com/unitedkingdom/content/privacy.htm for information about privacy.

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.