我为jarfile制作插件。然后我复制到dropin文件夹中的jarfile。 (参考https://docs.wso2.com/display/CEP410/Building+Custom+Event+Receivers)
我执行wso2 cep。命令'./wso2server.sh -DosgiConsole'. and 'osgi > ss event-adaptor-name'
已选中ACITVE!
但WSO2管理网页不存在。 '输入事件适配器类型'我的事件不存在。
我查到'osgi > bundle event-adaptor-id'
结果是
没有注册服务。
如何在WSO2 CEP中注册服务?
我使用eclipse,而不是使用maven。我使用插件项目。
答案 0 :(得分:0)
Exposing Custom Event Receiver as an OSGI Service section in WSO2 CEP 4.1.0 documentation gives an example as how to register the custom adapter as an OSGI service.
With reference to the same document pointed above, following is the point where the custom adapter register itself under the OutputEventAdapterFactory
service.
context.getBundleContext().registerService(OutputEventAdapterFactory.class.getName(),
emailEventAdaptorFactory, null);
If it is successfully registered, you will see "osgi > bundle event-adaptor-id
" result as something similar to:
osgi> bundle org.wso2.carbon.event.output.adapter.email
org.wso2.carbon.event.output.adapter.email_5.0.10 [215]
Id=215, Status=ACTIVE Data Root=/home/userx/wso2cep-4.1.0/repository/components/default/configuration/org.eclipse.osgi/bundles/215/data
"Registered Services"
{org.wso2.carbon.event.output.adapter.core.OutputEventAdapterFactory}={service.id=117}
(please note that I have not posted the complete output above, for the sake of clarity of the answer)