One restriction with tapestry-cometd and HttpSession is that the session
cannot be created by the async action. I'm guessing that the push action
requires the session, but it doesn't exist yet.

Admittedly the error message could be nicer than "!session"
On 13 Jun 2014 15:36, "Boris Horvat" <horvat.z.bo...@gmail.com> wrote:

> Hi everyone, I have implemented a tapestry-cometd integration
>
>         <dependency>
>             <groupId>org.lazan</groupId>
>             <artifactId>tapestry-cometd</artifactId>
>             <version>0.9.17</version>
>         </dependency>
>
> Our usage of the component is
>
>   <t:cometd.PushTarget topic="prop:channelMenuItems"
> event="updateMenuItems" update="replace" session="true"/>
>
> and in UAT environment that runs under Tomcat I got the following
> exception.
>
> java.lang.IllegalStateException
> !session
> Filter stack framesStack trace
>
>    -
>
>  
> org.cometd.server.transport.HttpTransport$HttpContext.setHttpSessionAttribute(HttpTransport.java:177)
>    -
>
>  
> org.lazan.t5.cometd.services.internal.BayeuxContextHttpSession.setAttribute(BayeuxContextHttpSession.java:31)
>    -
>
>  
> org.apache.tapestry5.internal.services.SessionImpl.setAttribute(SessionImpl.java:57)
>    -
>
>  
> org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.set(SessionApplicationStatePersistenceStrategy.java:73)
>    -
>
>  
> org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.getOrCreate(SessionApplicationStatePersistenceStrategy.java:58)
>    -
>
>  
> org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.get(SessionApplicationStatePersistenceStrategy.java:44)
>    -
>
>  
> org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.getOrCreate(ApplicationStateManagerImpl.java:50)
>    -
>
>  
> org.apache.tapestry5.internal.services.ApplicationStateManagerImpl.get(ApplicationStateManagerImpl.java:133)
>    -
>
>  
> org.apache.tapestry5.internal.transform.ApplicationStateWorker$1.get(ApplicationStateWorker.java:75)
>    -
>
>  
> com.bomahabo.flow.tapestry.components.layout.MenuProfile.conduit_get_user(MenuProfile.java)
>    -
>
>  
> com.bomahabo.flow.tapestry.components.layout.MenuProfile.getPageNotificationNumber(MenuProfile.java:135)
>
>
> It is probably worth nothing that this doesn't happen on the first few
> triggers of the push event but at some point in the near future.
>
> Has anyone seen something similar before?
>
> --
> Sincerely
> *Boris Horvat*
>

Reply via email to