С MQSeries приходится иметь дело впервые, из документации пока нашла MQ Series using Java
здесь.
Спасибо за помощь. Нужны идеи почему ломается, или как cделать правильно.
Клиент компилиться, но при поползновении запустить ломает JVM:
Unexpected Signal : 11 occurred at PC=0x40261394
Function=(null)+0x40261394
Library=/usr/j2sdk1.4.1_02/jre/lib/i386/client/libjvm.so
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Код бегает в отдельном thread на RedHat Linux i386.
MyClass() {
mqProperties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
MQEnvironment.hostname = hostname;
MQEnvironment.port = port;
MQEnvironment.channel = channel;
MQEnvironment.properties = mqProperties;
getMsgOptions = new MQGetMessageOptions();
}
run() {
while (true) {
startConnect = System.currentTimeMillis();
queueManager = new MQQueueManager(queueManagerName);
queue = queueManager.accessQueue(queueName,
queueOptions, null, null, null);
while (System.currentTimeMillis() < startConnect + UPHOLD_CONNECTION) {
inMessage = new MQMessage();
queue.get(inMessage, getMsgOptions);
// process message
}
queue.close();
queueManager.close();
queueManager.disconnect();
}
}