uklance / tapestry-cometd

A push library for Tapestry5 based on CometD
17 stars 3 forks source link

Page activation context is always empty for push events #55

Closed uklance closed 11 years ago

uklance commented 11 years ago

PushManagerImpl always passes EMPTY_EVENT_CONTEXT as the page activation context for push events

@see https://github.com/uklance/tapestry-cometd/blob/master/src/main/java/org/lazan/t5/cometd/services/internal/PushManagerImpl.java#L60

To fix this, PushTarget needs to be changed to add the page activation context in getInitData() (https://github.com/uklance/tapestry-cometd/blob/master/src/main/java/org/lazan/t5/cometd/components/PushTarget.java#L109).

The page activation context will need to be added to the ClientContext in AuthorizersImpl.getClientContext() (https://github.com/uklance/tapestry-cometd/blob/master/src/main/java/org/lazan/t5/cometd/services/internal/AuthorizersImpl.java#L74)

The solution might require a PageRenderRequestFilter to be contributed to the start of the PageRenderRequestHandler pipeline. The filter will set a thread local for the page activation context (very similar to RequestGlobals).

uklance commented 11 years ago

Issue resolved in 0.9.16