【发布时间】:2014-06-06 07:23:28
【问题描述】:
我有一个 ObjectStoreModule 配置为将一些 JSON 存储为字符串。根据规范 (http://mulesoft.github.io/mule-module-objectstore/java/org/mule/modules/ObjectStoreModule.html),我希望能够调用检索并获取我存储的对象的副本。但是,当我尝试这个时,我似乎只得到了返回的键而不是对象本身......
这是我的代码目前的样子。
ObjectStoreModule objectStore = (ObjectStoreModule) eventContext.getMuleContext().getRegistry().lookupObject("sourceConfigStore");
objectStore.store("KEY", jsonAsString, true);
System.out.println((String)objectStore.retrieve("sourceConfigStore", "KEY", null, null, eventContext.getMessage()))
目前,这只会打印出“KEY”,而不是名为 jsonAsString 的变量。我意识到检索方法还有其他输入参数将指定一个 mule 消息属性以将检索到的对象分配给,但我希望能够从 java 中与此存储进行交互,而无需将这些值分配给 mule 的额外步骤消息属性。
【问题讨论】:
标签: mule