[JBoss Seam] - Seam Remoting und JMS Topic subscription questions.
by appendix
I'm having a seam page, which should invoke an action, whenever a JMS message is published to a topic as described in the reference manual.
I followed the examples and got the page to invoke a javascript callback method, whenever a message is published after the page has subscribed to the topic.
Currently the subscribtion is done on page load. This leads to two issues:
1) Whenever the page is re-rendered (e.g. after a button is clicked), the page subscribes to the topic again and more importantly as a new listener (new polling token).
So when a message is sent to the topic in an action method of the same page the message is lost (and the callback method is never invoked).
2) The subscribers are piling up on the topic as verifiable by invoking listSubscriptionsAsText() on the topic bean in the JMX console.
So finally, I'd like to ask, if anyone has some ideas on how to solve this issues or could give me any pointers.
How could a subscription be made page scoped and not request scoped?
How could I unsubscribe from a topic whenever the page is closed?
Additionally I've realized that the subscriptions are done in a non-durable fashion. Is it possible to subscribe as a durable listener?
Thanks for any hints,
Kurt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977472#3977472
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977472
19 years, 7 months
[JBoss Seam] - no application context with latest seam version
by baz
Hello,
i have compiled the latest seam version out of cvs. I am aware that it is at heavy development.
We are using tomcat with hibernate in the microcontainer
Besides the copying of the new seam jars to the apps lib folder i have to adapt components.xml. No other files are changed.
With the new seam version my tomcat starts up without complains.
When the application is called, the HibernateSession starts up and the login page is displayed. So far so good.
After logging in, the next page is displayed and this excepttion appears:
10:11:50,281 ERROR org.apache.myfaces.lifecycle.PhaseListenerManager: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
| java.lang.IllegalStateException: No active application context
| at org.jboss.seam.core.Pages.instance(Pages.java:282)
| at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:47)
| at org.apache.myfaces.renderkit.html.util.DummyFormUtils.writeDummyForm(DummyFormUtils.java:153)
| at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd(ExtensionsPhaseListener.java:112)
| at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:96)
| at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.renderCodeBeforeBodyEnd(ExtensionsPhaseListener.java:86)
| at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:66)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
| at java.lang.Thread.run(Thread.java:595)
| 10:11:50,281 DEBUG org.jboss.seam.servlet.SeamExceptionFilter: ended request
| 10:11:50,281 DEBUG org.apache.myfaces.renderkit.html.util.ReducedHTMLParser: DOCTYPE found at line 1
| 10:11:50,296 WARN org.apache.myfaces.renderkit.html.util.DefaultAddResource: MyFaces special javascript could not be retrieved from request-map.
| 10:11:50,343 ERROR org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader: Unparsable lastModified : @lastModified@
|
In my running app (with the latest seam development version which includes org.jboss.seam.core.ManagedHibernateEntity) all functions as expected. In this app i get the error 'Unparsable lastModified' too. But the WARN 'MyFaces special javascript could not be retrieved from request-map.' is not shown.
Does this mean i cannot use myfaces anymore? I am bound to use the jscook menu:-( (I have read the thread about thomahawk and seam).
Or is something other going wrong here?
My intention was to test the new HibernateEntity.
Ciao,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977465#3977465
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977465
19 years, 7 months