[zeromq-dev] Java/Windows issues
Martin Sustrik
sustrik at fastmq.com
Tue Aug 4 14:49:42 CEST 2009
Hi Robin,
> Hi folks. As I've been using 0mq a bit more I've run into a few issues:
> 1 - the mask(Zmq.MESSAGE_GAP) method in Java throws an exception on
> Windows. Looking at the Java perf examples I don't see this method being
> called. Any reason this isn't implemented? Its in the Zmq class
> interface. When I comment out this call to mask the application
> functions fine. The exception is:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> org.zmq.Zmq.mask(I)V
> at org.zmq.Zmq.mask(Native Method)
> at com.st.common.Messaging.<init>(Messaging.java:44)
> at com.st.common.Messaging.<clinit>(Messaging.java:20)
> at com.st.gui.ScoutGUI.main(ScoutGUI.java:80)
Ok, there's incorrect prototype for the implementation of the mask
function. Following patch should help:
Index: libjzmq/Zmq.cpp
===================================================================
--- libjzmq/Zmq.cpp (revision 1603)
+++ libjzmq/Zmq.cpp (working copy)
@@ -111,7 +111,7 @@
}
JNIEXPORT void JNICALL Java_org_zmq_Zmq_mask (JNIEnv *env, jobject obj,
- int notifications)
+ jint notifications)
{
// Get the context.
context_t *context = (context_t*) env->GetLongField (obj,
context_fid);
> 2 - I have a linux c++ publisher publishing using pgm to multiple java
> windows clients. The linux client is registering a global exchange and
> the windows clients register a local queue to that exchange. It appears
> that after restarting the linux publisher the windows client stops
> receiving messages until it is also restarted.
Rastart of PGM publisher on win/linux seemed to work when we've did
1.0.0 tests. We'll have a look at the scenario shortly.
Martin
More information about the zeromq-dev
mailing list