我刚刚在我的 JBoss AS 7 上从 Richfaces 3.3.3 升级到 4.2.2,从 Seam 2.2.2 升级到 Seam 2.3。目前它运行良好。
但我必须使用标签:a4j:push,我不知道如何将接缝组件绑定到这个。
是)我有的:
@Name(TestBeanInterface.NAME)
@JndiName(value=TestBeanInterface.JNDI_NAME)
@Scope(ScopeType.SESSION)
public class TestBean implements Serializable {
private static final String CDI_PUSH_TOPIC = "pushCdi";
private String userIdentifier;
@Inject
@Push(topic = CDI_PUSH_TOPIC, subtopic = "#{testBean.userIdentifier}")
private javax.enterprise.event.Event<String> pushEvent;
@PostConstruct
public void init() {
System.out.println("hey");
if (userIdentifier == null) {
userIdentifier = UUID.randomUUID().toString().replace("-", "");
}
TopicsContext topicsContext = TopicsContext.lookup();
topicsContext.getOrCreateTopic(new TopicKey(CDI_PUSH_TOPIC, userIdentifier));
}
public void sendMessage() throws Exception {
System.out.println("Send Message");
pushEvent.fire("a test message");
}
public String getUserIdentifier() {
return userIdentifier;
}
public void setUserIdentifier(String userIdentifier) {
this.userIdentifier = userIdentifier;
}
}
我得到什么:
22:23:28,191 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Atmosphere is using async support: org.atmosphere.container.BlockingIOCometSupport running under container: JBoss Web/7.0.13.Final
22:23:28,193 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
22:23:28,201 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Installed Default AtmosphereInterceptor [Android Interceptor Support, SSE Interceptor Support, JSONP Interceptor Support]. Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults in your xml to disable them.
22:23:28,203 WARN [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the HeaderBroadcasterCache.
22:23:28,204 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) HttpSession supported: false
22:23:28,205 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
22:23:28,205 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
22:23:28,206 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster
22:23:28,208 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Atmosphere Framework 1.0.0.beta5 started.
22:23:28,212 INFO [org.atmosphere.cpr.MeteorServlet] (MSC service thread 1-2) Installed Filter/Meteor org.richfaces.webapp.PushHandlerFilter mapped to /*
22:23:28,234 INFO [org.atmosphere.cpr.AtmosphereFramework] (MSC service thread 1-2) Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path: /*
22:23:28,236 INFO [org.atmosphere.handler.ReflectorServletProcessor] (MSC service thread 1-2) Installing Servlet null
22:23:28,238 INFO [org.atmosphere.handler.ReflectorServletProcessor] (MSC service thread 1-2) Installing Filter PushHandlerFilter
.....
22:23:38,101 INFO [stdout] (http-localhost-127.0.0.1-8080-1) hey
22:23:38,538 WARN [org.jboss.seam.mock.MockViewHandler] (http-localhost-127.0.0.1-8080-1) You should catch the exception before Seam: java.lang.IllegalArgumentException: no file extension in servlet path: /__richfaces_push
at org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:49) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:75) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:168) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.faces.Redirect.execute(Redirect.java:154) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.exception.DebugPageHandler.handle(DebugPageHandler.java:32) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73) [jboss-seam.jar:2.3.0.Beta2]
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Beta2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]