有没有人成功使用上述配置?我正在尝试将 push 与 primefaces 的咆哮一起使用。我正在使用 primefaces 3.5 GlassFish 4.0 和 Atmosphere 2.0.0.RC5 我的配置如下:
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
豆方法:
private void assaginTreatment()
{
...
PushContext pushContext = PushContextFactory.getDefault().getPushContext();
pushContext.push("/notifications", facesMsg);
return;
}
最后是 xhtml 文件:
<p:growl widgetVar="growl" showDetail="true" sticky="true" globalOnly="true" autoUpdate="true" />
<p:socket onMessage="handleMessage" channel="/notifications" autoConnect="true"/>
<script type="text/javascript">
function handleMessage(facesmessage) {
facesmessage.severity = 'info';
PF('growl').show([facesmessage]);
}
</script>
我得到的错误是:
SEVERE: [http-listener-1(4)] WARN org.atmosphere.cpr.MetaBroadcaster - No Broadcaster match /notifications. Message...