[richfaces-issues] [JBoss JIRA] (RF-11483) Elegant way for Push topic creating
Lukáš Fryč (JIRA)
jira-events at lists.jboss.org
Wed Jan 18 07:44:19 EST 2012
[ https://issues.jboss.org/browse/RF-11483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukáš Fryč updated RF-11483:
----------------------------
Comment: was deleted
(was: This issue is much more critical, because the {{PushContext}} is not initialized properly in time when needs to be used in order to initialize {{PushServlet}} properly.
{{PushContext}} is initialized in Showcase when {{TopicsContext#lookup()}} is called, which is called by {{TopicsInitializer}} at JSF application startup.
So following {{NullPointerException}} is thrown because {{PushContextImpl#init(...)}} wasn't called yet.
{code}
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) java.lang.NullPointerException
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) at org.richfaces.webapp.PushHandlerFilter.init(PushHandlerFilter.java:64)
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:105)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:273)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:164)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.atmosphere.cpr.AtmosphereServlet.initAtmosphereHandler(AtmosphereServlet.java:813)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:566)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.richfaces.webapp.PushServlet.init(PushServlet.java:98)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) at java.lang.Thread.run(Thread.java:662)
{code}
Exception above is hidden behind following meaningless exception:
{code}
12:52:47,369 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/new_project]] (MSC service thread 1-3) Servlet /new_project threw load() exception: javax.servlet.ServletException
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:577) [atmosphere-runtime-0.8.0-RC1.jar:]
at org.richfaces.webapp.PushServlet.init(PushServlet.java:98) [richfaces-core-impl-4.1.0.Final.jar:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
{code}
)
> Elegant way for Push topic creating
> -----------------------------------
>
> Key: RF-11483
> URL: https://issues.jboss.org/browse/RF-11483
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-push/poll, core
> Affects Versions: 4.1.0.Milestone1
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Priority: Critical
> Fix For: 4.3-Tracking
>
>
> Currently, topics have to be initialized with similar class:
> https://github.com/richfaces/showcase/blob/4.1.0.20110910-M2/src/main/java/org/richfaces/demo/push/TopicsInitializer.java
> I suggest to create topic on demand (lazily), when it is accessed first.
> It needs following changes:
> * {{PushRendererBase}} - will create Topic for @address attribute
> * {{JMSTopicsContextImpl}} - will create topic when JMS message received
> * {{PushObserverMethod}} - will create topic when @Push event for given topic observed
> * ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list