I tinkered around and I did the following:
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>false</param-value>
</init-param>
This forces the Atmosphere Framework to use the Jetty7CometSupport class
instead of the Jetty8WebSocket class.
Initially this looked.. fine.
Except the rendered URL as a result of the push is invalid.
Instead of it going to `/appl/test/`, it refers to `/test/`.
Class `UrlRenderer` from the `org.apache.wicket.request` at line 258 prepends
a ".." segment to the finally rendered url. Which hints me that it tries to go
one folder up the path... which seems wrong.
The cause of this seems to be that there are 2 baseUrlSegments: "appl" &
"test". Causing this ".." to be added. I don't know why this is as it is, the
Wicket developers must have some reason for this.
All normal url's on the page render fine, except for the one(s) rendered after
a push event through Jett7CometSupport.
When Jett8WebSocket is used, the "./" is prepended to the URL, which is fine!
So is this a bug in Wicket/Atmosphere or am I doing something wrong?
Again, the quickstart is at
http://www.glitchbox.nl/stack/atmosphere_proxy_problem.zip
With the exception of the change in the web.xml as stated at the start of this
mail.
On Wednesday 20 February 2013 15:53:14 Martin Grigorov wrote:
> Hi,
>
> Nginx latest release has support for WebSocket. There are many tweets about
> this last few days.
> If switching to Nginx is an option for you - try it.
>
> On Wed, Feb 20, 2013 at 3:44 PM, Marco Springer <[email protected]> wrote:
> > Hi all,
> >
> > I have the following scenario:
> > A Jetty instance is running on port 8080 with URL:
> > `http://localhost:8080/appl/test`
> > The deployed Wicket application is using Atmosphere for push events.
> > I've configured the Apache server as how it was explained on the following
> > URL:
> >
> > https://github.com/Atmosphere/atmosphere/wiki/How-to-run-Atmosphere-behind
> > -Apache-WebServer
> >
> > When I access `http://localhost:8080/appl/test` directly without the
> > proxy,
> > it's all working fine.
> > As soon as I try it through the proxy, e.g. `http://localhost/appl/test`,
> > weird stuff starts happening.
> >
> > Mostly I see that the function, that's annotated with the "@Subscribe"
> > annotation, gets called multiple times, 4 to 12 times isn't uncommon. And
> > it's
> > almost always in a power 2.
> > This doesn't happen without the proxy.
> > The second browser instance that should receive the push event doesn't
> > respond
> > properly either.
> > I get:
> > `INFO: Response processed successfully.
> > INFO: refocus last focused component not needed/allowed`
> >
> > Does anyone have some more knowledge about configuring Apache's proxy to
> > allow
> > for proper websocket/cometd push events through Atmosphere?
> >
> > A quickstart for the Wicket project:
> > http://glitchbox.nl/stack/atmosphere_proxy_problem.zip
> > My apache config for the proxying:
> > http://glitchbox.nl/stack/default
> >
> > Thanks in advance.
> >
> > Cheers,
> > Marco
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]