0
我試圖添加一個簡單的sleep
函數來擴展基本的ESQL API。Message Broker 6.1睡眠異常
Java實現:
public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
ESQL參考:
CREATE PROCEDURE sleep(IN millis INT)
LANGUAGE JAVA
EXTERNAL NAME "com.mypackage.Util.sleep";
這是錯誤跟蹤:
(0x01000000:Name ):RecoverableException = (
(0x03000000:NameValue):File = '/build/S610_P/src/DataFlowEngine/ImbRdl/ImbRdlExternalJava.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 1102 (INTEGER)
(0x03000000:NameValue):Function = 'ESQL2JavaMethodResolver::decodeReturnStatus' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 2946 (INTEGER)
(0x03000000:NameValue):Text = 'The Java method could not be found' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'com.mypackage.Util.sleep' (CHARACTER)
)
)
)
)
)