Wicket Atmosphere Clustering
Hello, Has anyone had any luck clustering Wicket Atmosphere? We've setup a Hazelcast broadcaster using this documentation ( https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere-for-the-Cloud <https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere-for-the-Cloud> ) in hopes that any node in our cluster could call EventBus.post, and it would be broadcast to all nodes. The node that had the users websocket connection would then send the server push. However, it looks as though the EventBus.push is checking for the broadcasters AtmosphereResources before doing the post. These seem to be isolated per node. Our next approach was to use a Hazelcast topic to pushing the AtmosphereResource to all other nodes when it was added on one node, however AtmosphereResourceImpl.java is not serializable so it did not work. We are currently running a slighting older version of Wicket 6.11 with the Wicket-Atmosphere 6.18 maven package. We tried upgrading to some of the wicket-experimental Atmosphere packages, but these seemed to cause all sorts of errors with our current setup. Any suggestions tutorial would be great. Thanks, Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Clustering-tp4672976.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere jQuery noConflict
Fixed with https://issues.apache.org/jira/browse/WICKET-5917 Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Jun 3, 2015 at 5:06 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Wed, Jun 3, 2015 at 4:32 PM, mashleyttu mash...@gmail.com wrote: Our application uses jQuery.noConflict changing all references from $ to $j. We are trying to integrate Wicket Atmosphere into our application, however, are running into an issue where it is rendering a $ in an OnDomReadyHeaderItem.forScript. This is of course causing javascript errors. We have tracked it down to the renderHead method of AtmosphereBehavior. The $ is hard coded in the javascript string. Does anyone know if it is possible to extend AtmosphereBehavior and have Wicket Atmosphere use our custom version? Nope See https://github.com/apache/wicket/blob/2f0d08d4179af272e1670084ec2e36f58628ff13/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereEventSubscriptionCollector.java#L117 Or it is possible to extend OnDomReadyHeaderItem which would do a replace on $( with $j( and have wicket use that globally? There is a way! You can register custom IHeaderResponseDecorator that will re-write the content of OnDomReadyHeaderItem when its script contains $(. See http://wicketinaction.com/2012/07/wicket-6-resource-management/ https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3e6952567976302ed0698de1b52508fc7747e001/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples/WicketApplication.java#L139 https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3e6952567976302ed0698de1b52508fc7747e001/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/RenderJavaScriptToFooterHeaderResponseDecorator.java#L81 https://github.com/apache/wicket/blob/2f0d08d4179af272e1670084ec2e36f58628ff13/wicket-core/src/main/java/org/apache/wicket/markup/head/filter/FilteringHeaderResponse.java#L172 Here you have to do: @Override public void render(HeaderItem item) { if (item instanceof ondomreadyitem ondomreadyitem.getScript().contains($()) {super.render(OnDomReadyHeaderItem.forScript(item.getScript().replaceAll($(, jQuery()))} Any thoughts on how to resolve this issue? Using Wicket Atmosphere .18 and Wicket 6.11 currently. Please file a ticket so this is fixed for 6.20. Thanks! Thanks, Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere jQuery noConflict
Hi, On Wed, Jun 3, 2015 at 4:32 PM, mashleyttu mash...@gmail.com wrote: Our application uses jQuery.noConflict changing all references from $ to $j. We are trying to integrate Wicket Atmosphere into our application, however, are running into an issue where it is rendering a $ in an OnDomReadyHeaderItem.forScript. This is of course causing javascript errors. We have tracked it down to the renderHead method of AtmosphereBehavior. The $ is hard coded in the javascript string. Does anyone know if it is possible to extend AtmosphereBehavior and have Wicket Atmosphere use our custom version? Nope See https://github.com/apache/wicket/blob/2f0d08d4179af272e1670084ec2e36f58628ff13/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereEventSubscriptionCollector.java#L117 Or it is possible to extend OnDomReadyHeaderItem which would do a replace on $( with $j( and have wicket use that globally? There is a way! You can register custom IHeaderResponseDecorator that will re-write the content of OnDomReadyHeaderItem when its script contains $(. See http://wicketinaction.com/2012/07/wicket-6-resource-management/ https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3e6952567976302ed0698de1b52508fc7747e001/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples/WicketApplication.java#L139 https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/3e6952567976302ed0698de1b52508fc7747e001/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/RenderJavaScriptToFooterHeaderResponseDecorator.java#L81 https://github.com/apache/wicket/blob/2f0d08d4179af272e1670084ec2e36f58628ff13/wicket-core/src/main/java/org/apache/wicket/markup/head/filter/FilteringHeaderResponse.java#L172 Here you have to do: @Override public void render(HeaderItem item) { if (item instanceof ondomreadyitem ondomreadyitem.getScript().contains($()) {super.render(OnDomReadyHeaderItem.forScript(item.getScript().replaceAll($(, jQuery()))} Any thoughts on how to resolve this issue? Using Wicket Atmosphere .18 and Wicket 6.11 currently. Please file a ticket so this is fixed for 6.20. Thanks! Thanks, Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Atmosphere jQuery noConflict
Our application uses jQuery.noConflict changing all references from $ to $j. We are trying to integrate Wicket Atmosphere into our application, however, are running into an issue where it is rendering a $ in an OnDomReadyHeaderItem.forScript. This is of course causing javascript errors. We have tracked it down to the renderHead method of AtmosphereBehavior. The $ is hard coded in the javascript string. Does anyone know if it is possible to extend AtmosphereBehavior and have Wicket Atmosphere use our custom version? Or it is possible to extend OnDomReadyHeaderItem which would do a replace on $( with $j( and have wicket use that globally? Any thoughts on how to resolve this issue? Using Wicket Atmosphere .18 and Wicket 6.11 currently. Thanks, Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere jQuery noConflict
Sir, you are a gentleman and a scholar for your quick reply with links to excellent examples. Thanks so much. You wicket folks think of a solutions for everything. Love the architecture! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046p4671052.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere broadcast to all except for orign page
The @Subscribe annotation has 2 filter options. In this case, I would go for the first: 'filter()'. The Predicate type you need to specify gets an AtmosphereEvent, where the payload is set to the object you are broadcasted. If you change this object to a little more than just a message, you can add the UUID from AtmosphereBehavior.getUUID(page) to this event. In the Predicate you can now check this UUID agains event.getResource().uuid(). If these match, you know the message is sent to the page that triggered the event and needs to be skipped (let the predicate return false). Best regards, Emond On Monday 23 February 2015 14:14:47 fachhoch wrote: I am trying to use wicket atmosphere, I want to broadcast msg for all the resources except for the one which broadcasted the msg, please advice how to exclude a resource . In a page on click of a link I call Event.get().post and this same page has a public method with @org.apache.wicket.atmosphere.Subscribe annotation ,this method gets called when msg is broadcasted. I want to broadcast msg to all other sessions except for current session which broadcasted , please advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-broadcast-to-a ll-except-for-orign-page-tp4669723.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket atmosphere broadcast to all except for orign page
I am trying to use wicket atmosphere, I want to broadcast msg for all the resources except for the one which broadcasted the msg, please advice how to exclude a resource . In a page on click of a link I call Event.get().post and this same page has a public method with @org.apache.wicket.atmosphere.Subscribe annotation ,this method gets called when msg is broadcasted. I want to broadcast msg to all other sessions except for current session which broadcasted , please advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-broadcast-to-all-except-for-orign-page-tp4669723.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
I tried with wicket 6.17.0, IE 9 does not show the modal window, chrome,firefox works fine. IE console error msg below. It fails in method Wicket.Xml.parse(data); Attached the quickstart myproject.zip http://apache-wicket.1842946.n4.nabble.com/file/n4667366/myproject.zip responde body (data) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667366.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
Hi, On Wed, Sep 3, 2014 at 10:24 PM, fachhoch fachh...@gmail.com wrote: I am trying to use wicket-atmosphere (0.18) in wicket 6.12.0, on post, subscribe method is getting called but any component I add to target is not updating in the page, ajax debug window shows empty ajax-response, and browser console has this error. wicket/bookmarkable/resource/org.apache.wic…bstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1409764822476.js The url is wrong. It should not have the bookmarkable segment in it. Not sure how it got there. If your can reproduce it in a quickstart app with latest Wicket (6.17.0) then please attach it to a ticket in JIRA. 404 (Not Found) Please advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
I have quickstart with 6.12.0 could not reproduce there, I also tried setResponsePage instead of adding component to target in the subscribe method, noticed the same 'bookmarkable' in the url ending up with resource not found page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667341.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
/wicket/bookmarkable/com.example.MyPage is generated for pages without explicit mount path (e.g. MyApp#mountPage(somewhere, MyPage.class)) /wicket/resource/com.example.SomeScope/some.css is generated for package resource references without explicit mount point, e.g. MyApp#mountResource but /wicket/bookmarkable/resource/... is broken url Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Sep 4, 2014 at 3:47 PM, fachhoch fachh...@gmail.com wrote: I have quickstart with 6.12.0 could not reproduce there, I also tried setResponsePage instead of adding component to target in the subscribe method, noticed the same 'bookmarkable' in the url ending up with resource not found page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667341.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
I tried some tests , 1. redirect to a different page, using setResponsePage works fine. 2. redirect to same page, ends with resource not found page, reason(it stripping servlet-mapping str) servlet mapping configration atmosphere changes url to http://localhost:8080/artms/test from http://localhost:8080/artms/app/test 3. update same page with ajax response (missing wicket prefix for the resource url) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667347.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
log output from my app and quickstart, my app does not work quick start works my app quickstarts -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667348.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
logs from my app and quick start my app quick start -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667349.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
I am able reproduce this issue in a quickstart, The issue happens in bookmarkable pages, any bookmarkable page, response to atmosphere request fails. below is the error from browser console. Attached the quickstart.zip myproject.zip http://apache-wicket.1842946.n4.nabble.com/file/n4667350/myproject.zip response.responseBody: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=mw3 /componentheader-contribution encoding=wicket1 /header-contributionevaluate/evaluate/ajax-response jquery.atmosphere-ver-1409156999263.js:2799 GET http://localhost:8081/myproject/app/wicket/bookmarkable/resource/org.apache…resource.JQueryResourceReference/jquery/jquery-1.10.1-ver-1409764822476.js 404 (Not Found) wicket-ajax-jquery-ver-1409764822476.js:2167 jQuery.extend.Head.addElement wicket-ajax-jquery-ver-1409764822476.js:2167 (anonymous function) wicket-ajax-jquery-ver-1409764822476.js:2114 run wicket-ajax-jquery-ver-1409764822476.js:125 proxy jquery-1.10.1-ver-1409764822476.js:827 processNext wicket-ajax-jquery-ver-1409764822476.js:140 start wicket-ajax-jquery-ver-1409764822476.js:146 Wicket.Ajax.Call.process wicket-ajax-jquery-ver-1409764822476.js:673 jQuery.extend.Ajax.process wicket-ajax-jquery-ver-1409764822476.js:1854 callback jquery.wicketatmosphere-ver-1409156999263.js:31 _invokeCallback.call jquery.atmosphere-ver-1409156999263.js:2405 jQuery.extend.each jquery-1.10.1-ver-1409764822476.js:657 _invokeCallback jquery.atmosphere-ver-1409156999263.js:2440 _executeWebSocket._websocket.onmessage -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667350.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket atmosphere not updating the page
Hi, I am on my phone now so I can't check your quickstart but I remember a problem with bookmarkable pages fixed in 6.13.0 On Sep 4, 2014 10:45 PM, fachhoch fachh...@gmail.com wrote: I am able reproduce this issue in a quickstart, The issue happens in bookmarkable pages, any bookmarkable page, response to atmosphere request fails. below is the error from browser console. Attached the quickstart.zip myproject.zip http://apache-wicket.1842946.n4.nabble.com/file/n4667350/myproject.zip response.responseBody: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=mw3 /componentheader-contribution encoding=wicket1 /header-contributionevaluate/evaluate/ajax-response jquery.atmosphere-ver-1409156999263.js:2799 GET http://localhost:8081/myproject/app/wicket/bookmarkable/resource/org.apache …resource.JQueryResourceReference/jquery/jquery-1.10.1-ver-1409764822476.js 404 (Not Found) wicket-ajax-jquery-ver-1409764822476.js:2167 jQuery.extend.Head.addElement wicket-ajax-jquery-ver-1409764822476.js:2167 (anonymous function) wicket-ajax-jquery-ver-1409764822476.js:2114 run wicket-ajax-jquery-ver-1409764822476.js:125 proxy jquery-1.10.1-ver-1409764822476.js:827 processNext wicket-ajax-jquery-ver-1409764822476.js:140 start wicket-ajax-jquery-ver-1409764822476.js:146 Wicket.Ajax.Call.process wicket-ajax-jquery-ver-1409764822476.js:673 jQuery.extend.Ajax.process wicket-ajax-jquery-ver-1409764822476.js:1854 callback jquery.wicketatmosphere-ver-1409156999263.js:31 _invokeCallback.call jquery.atmosphere-ver-1409156999263.js:2405 jQuery.extend.each jquery-1.10.1-ver-1409764822476.js:657 _invokeCallback jquery.atmosphere-ver-1409156999263.js:2440 _executeWebSocket._websocket.onmessage -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321p4667350.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket atmosphere not updating the page
I am trying to use wicket-atmosphere (0.18) in wicket 6.12.0, on post, subscribe method is getting called but any component I add to target is not updating in the page, ajax debug window shows empty ajax-response, and browser console has this error. wicket/bookmarkable/resource/org.apache.wic…bstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1409764822476.js 404 (Not Found) Please advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-not-updating-the-page-tp4667321.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AtmosphereTester - WicketTester for Wicket-Atmosphere
Hi, At branch wicket-atmosphere-tester I've implemented support for testing Wicket Atmosphere applications with WicketTester. You can see the diff at [1]. I don't use Atmosphere in my applications and I don't know of any open source projects that use Wicket-Atmosphere to test whether the current functionality in AtmosphereTester is good enough for merging to wicket-6.x. Any feedback is welcome! Especially not-supported use cases! 1. https://github.com/apache/wicket/compare/wicket-6.x...wicket-atmosphere-tester Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov
Wicket-Atmosphere: how to post to only one client ?
Hi ! I want to implement a simple use case where a notification is sent to a client when its reports is finished, with Wicket Atmosphere. I’m new to Atmosphere concepts, but not to Wicket. So I had a look at Wicket-Atmosphere Quick Start. A broadcast is very simple to create as it is done there, but I can’t understand how I can notify only one client. The API doesn’t seem clear to me since the EventBus.post(..) methods talks about UUID or AtmosphereResource. I found AtmosphereBehavior.getUUID(Page) but how can I know on which page my client is ? Is there any registration mecanism ? how to interrogate it ? In my scenario, the only information I have about the client is its sessionId. Please advice -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-how-to-post-to-only-one-client-tp4666768.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Atmosphere: how to post to only one client ?
Good afternoon, Yes, there is a registration mechanism. You have to implement ResourceRegistrationListener, for instance in your Application class. Then you have the two methods resourceRegistered resourceUnregistered which make you aware of the UUIDs as they come and go. Is it clearer? Regards, Pierre On Mon, Jul 28, 2014 at 2:44 PM, guillaume.mary guillaume.m...@interview-efm.com wrote: Hi ! I want to implement a simple use case where a notification is sent to a client when its reports is finished, with Wicket Atmosphere. I’m new to Atmosphere concepts, but not to Wicket. So I had a look at Wicket-Atmosphere Quick Start. A broadcast is very simple to create as it is done there, but I can’t understand how I can notify only one client. The API doesn’t seem clear to me since the EventBus.post(..) methods talks about UUID or AtmosphereResource. I found AtmosphereBehavior.getUUID(Page) but how can I know on which page my client is ? Is there any registration mecanism ? how to interrogate it ? In my scenario, the only information I have about the client is its sessionId. Please advice -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-how-to-post-to-only-one-client-tp4666768.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.
Re: Wicket-Atmosphere: how to post to only one client ?
Yes, thanks for the entry point. So I came to the following solution: register a ResourceRegistrationListener on the EventBus which fills a Map (concurrent) of SessionId to UUID. The SessionId is took from Session.get(), and the UUID is the one from resourceRegistered(..). Then my reporter (which has the SessionId) can ask for UUID thru this Map and so notifies the client with post(message, uuid) It works for my prototype. Is that a correct design ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-how-to-post-to-only-one-client-tp4666768p4666772.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Atmosphere: how to post to only one client ?
Yes, it should be OK. On Mon, Jul 28, 2014 at 6:19 PM, guillaume.mary guillaume.m...@interview-efm.com wrote: Yes, thanks for the entry point. So I came to the following solution: register a ResourceRegistrationListener on the EventBus which fills a Map (concurrent) of SessionId to UUID. The SessionId is took from Session.get(), and the UUID is the one from resourceRegistered(..). Then my reporter (which has the SessionId) can ask for UUID thru this Map and so notifies the client with post(message, uuid) It works for my prototype. Is that a correct design ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-how-to-post-to-only-one-client-tp4666768p4666772.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.
wicket-atmosphere
Good evening, I'm still in the process of making wicket-atmosphere testable, after a long pause. For the moment in my EventBus, I am able to retrieve the broadcasted messages. I'd like to be able to retrieve this (Ajax-like) response with tester.getLastResponse().getDocument(). Because if I do this, I have the full WicketTester API to work with. When I do this in the EventBus: private void post(final AtmosphereResource _resource, final PageKey pageKey, final CollectionEventSubscription subscriptionsForPage, final AtmosphereEvent event) { ... snap ... final Response response = new AtmosphereWebResponse(_resource.getResponse()); if (this.application.createRequestCycle(request, response).processRequestAndDetach()) { System.out.println(response.toString()); this.broadcaster.broadcast(response.toString(), _resource); } } the Sys.out do gives me a non-empty ajax-response but I can't figure out how to hook it into the WicketTester's getLastResponse(). Any help will be much appreciated. Regards, Pierre Goupil -- La vie est source de joie, la mort est source de paix, seule la transition est difficile.
Re: Wicket atmosphere
Hi, On Sat, May 17, 2014 at 4:59 PM, Olivier Dutrieux olivier.dutri...@pasteur.fr wrote: Hello Emond, Very thanks to the update but I found a problem when I use long polling for the transport : When the EventBus loop to the list of AtmosphereResource (on post method) and if the update is too long of each AtmosphereResource, the list of AtmosphereResource is update and reorder (because atmosphere remove and registry the AtmosphereResource due to long polling) and then the loop on EventBus never stop and update is infinitie. To solve the probleme I do that on line 366 of EventBus.java : for (AtmosphereResource resource : ImmutableList.copyOf(broadcaster.getAtmosphereResources())) rather than for (AtmosphereResource resource : broadcaster.getAtmosphereResources()) I can if you want attach I short sample. Yes, please. If a fix or an improvement is needed in Wicket then create a ticket in Jira and attach a demo app or a unit test if possible. Thanks! Duto Le 17/05/2014 01:22, Papegaaij [via Apache Wicket] a écrit : I replied to your mail already, but it seems my message was lost in the mail outage. Atmosphere and the JS are upgraded on the wicket-6.x and master branches. I've also fixed the filter. https://issues.apache.org/jira/browse/WICKET-5589 Best regards, Emond On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote: Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L 72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=0 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=1 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665902.html To unsubscribe from Wicket atmosphere, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4665687code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg= . NAML http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Olivier Dutrieux Groupe Projets (Tél : 31 62) - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665909.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
Could you create a JIRA issue for this, so we (and other users) can track this issue? A short sample is not needed, because I can see in the code that this can indeed go wrong. I'll make sure this gets fixed in the next version. Best regards, Emond On Sat, May 17, 2014 at 3:59 PM, Olivier Dutrieux olivier.dutri...@pasteur.fr wrote: Hello Emond, Very thanks to the update but I found a problem when I use long polling for the transport : When the EventBus loop to the list of AtmosphereResource (on post method) and if the update is too long of each AtmosphereResource, the list of AtmosphereResource is update and reorder (because atmosphere remove and registry the AtmosphereResource due to long polling) and then the loop on EventBus never stop and update is infinitie. To solve the probleme I do that on line 366 of EventBus.java : for (AtmosphereResource resource : ImmutableList.copyOf(broadcaster.getAtmosphereResources())) rather than for (AtmosphereResource resource : broadcaster.getAtmosphereResources()) I can if you want attach I short sample. Duto Le 17/05/2014 01:22, Papegaaij [via Apache Wicket] a écrit : I replied to your mail already, but it seems my message was lost in the mail outage. Atmosphere and the JS are upgraded on the wicket-6.x and master branches. I've also fixed the filter. https://issues.apache.org/jira/browse/WICKET-5589 Best regards, Emond On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote: Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L 72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=0 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=1 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665902.html To unsubscribe from Wicket atmosphere, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4665687code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg= . NAML http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Olivier Dutrieux Groupe Projets (Tél : 31 62) - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665909.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
I do it : https://issues.apache.org/jira/browse/WICKET-5595 Bet regards Duto Le 19/05/2014 08:57, Papegaaij [via Apache Wicket] a écrit : Could you create a JIRA issue for this, so we (and other users) can track this issue? A short sample is not needed, because I can see in the code that this can indeed go wrong. I'll make sure this gets fixed in the next version. Best regards, Emond - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665923.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
Hello Emond, Very thanks to the update but I found a problem when I use long polling for the transport : When the EventBus loop to the list of AtmosphereResource (on post method) and if the update is too long of each AtmosphereResource, the list of AtmosphereResource is update and reorder (because atmosphere remove and registry the AtmosphereResource due to long polling) and then the loop on EventBus never stop and update is infinitie. To solve the probleme I do that on line 366 of EventBus.java : for (AtmosphereResource resource : ImmutableList.copyOf(broadcaster.getAtmosphereResources())) rather than for (AtmosphereResource resource : broadcaster.getAtmosphereResources()) I can if you want attach I short sample. Duto Le 17/05/2014 01:22, Papegaaij [via Apache Wicket] a écrit : I replied to your mail already, but it seems my message was lost in the mail outage. Atmosphere and the JS are upgraded on the wicket-6.x and master branches. I've also fixed the filter. https://issues.apache.org/jira/browse/WICKET-5589 Best regards, Emond On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote: Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L 72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=0 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=4665902i=1 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665902.html To unsubscribe from Wicket atmosphere, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4665687code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg=. NAML http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Olivier Dutrieux Groupe Projets (Tél : 31 62) - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687p4665909.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
I replied to your mail already, but it seems my message was lost in the mail outage. Atmosphere and the JS are upgraded on the wicket-6.x and master branches. I've also fixed the filter. https://issues.apache.org/jira/browse/WICKET-5589 Best regards, Emond On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote: Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L 72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
Hello, I up my question : someone can help me ? Duto On 05/05/2014 23:08, Olivier Dutrieux wrote : Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modules/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L72 I can pull a request if you want. Duto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket atmosphere
Hi Duto, I've just pushed the upgrade to the latest version of Atmosphere to the wicket-6.x and master branches. It should be in the next release of wicket- atmosphere for both versions. I've also changed the TrackMessageSizeFilter to extend the atmosphere class. Best regards, Emond On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote: Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L 72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket atmosphere
Could you please update the wicket-atmosphere with the last release 2.1.4 : I know that this version depend of jquery 2.0.3+ but there is a pure javascript version (no jquery depend) : https://github.com/Atmosphere/atmosphere-javascript And I notice that's your version of TrackMessageSizeFilter don't extend the org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be use everywhere my atmosphere : check line 72 of this JavaScriptProtocol file for why : https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modules/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L72 I can pull a request if you want. Duto - Duto -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-atmosphere
Good evening, This may be off-topic but I'd like to congratulate Emond for his work on wicket-atmosphere. I've tried version 0.16-SNAPSHOT and it works like a charm: the migration to Atmosphere 2 is just painless. And regarding the performance boost promised by JF Arcand, there is no surprise: it's sensibly faster. No, it's really, really faster! For me, you can now close the WICKET-5367 ticket. Thumbs up for Emond! \O/ Cheers, Pierre
Wicket-Atmosphere IE8 Issue
Hello, We are having a problem that is reproducible with the wicket atmosphere example. Every so often updates(Pushes) will stop being processed by the browser. If we refresh the page on the browser, the problem will go away for awhile, but will eventually happen again. It doesn't seem to matter if it's being run from Jetty or Tomcat. We have run wireshark and verified that the data is being sent to the browser. This does not happen on all our WinXP IE8 browsers, but it does happen on more then one. The version of IE8 is the same between machines where it breaks and machines where it works. Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-IE8-Issue-tp4661791.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Atmosphere IE8 Issue
Hi, Try with plain Atmosphere app. If the problem reproduces then ask in Atmosphere mailing list. If not - create a ticket in Wicket's JIRA. Next time also provide the versions of the libraries On Thu, Oct 10, 2013 at 8:54 PM, wsuetholz wsueth...@centonline.com wrote: Hello, We are having a problem that is reproducible with the wicket atmosphere example. Every so often updates(Pushes) will stop being processed by the browser. If we refresh the page on the browser, the problem will go away for awhile, but will eventually happen again. It doesn't seem to matter if it's being run from Jetty or Tomcat. We have run wireshark and verified that the data is being sent to the browser. This does not happen on all our WinXP IE8 browsers, but it does happen on more then one. The version of IE8 is the same between machines where it breaks and machines where it works. Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-IE8-Issue-tp4661791.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, When many people facing the same issue means may be there is some issue which can't be replicate in a small application. Me also facing the same issue in a big application which cannot be attached. So, is that possible for you guys to do a screen sharing with me through team viewer to see the issue and the code behind the same. On Wed, Aug 14, 2013 at 5:39 PM, Martin Grigorov-4 [via Apache Wicket] ml-node+s1842946n4660881...@n4.nabble.com wrote: Hi, I closed the ticket because the reporter didn't provide us (the Wicket developers) with an application that reproduces the problem for a long period. As soon such application is attached to the ticket the ticket will be reopened and addressed. Please feel free to attach a quickstart application. Thanks! On Wed, Aug 14, 2013 at 2:59 PM, souvikbhattacharyas [hidden email] http://user/SendEmail.jtp?type=nodenode=4660881i=0 wrote: Thanks, Let me try to generate the error. But it's quite shocking that before mentioning the error number, it was open and after mention suddenly you can not re produce. May be in small application it can not be reproduce but in large production it can. Over net you will find few others also get the issue. So, wicked people should look into it more closely. On Tue, Aug 13, 2013 at 5:33 PM, Papegaaij [via Apache Wicket] [hidden email] http://user/SendEmail.jtp?type=nodenode=4660881i=1 wrote: As you can see in the web.xml, the WicketFilter runs under /app. You can start it in jetty using the maven jetty plugin: mvn jetty:run (which will make the application available under localhost:8080/app) On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote: Hi, I have compiled the mentioned application and deployed in the glassfish server. But what is the url to run the same and also let me know how to run it on Jetty. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post- throwing-Null-pointer-exception-sometime-tp4660815p4660865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4660867i=0 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4660867i=1 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660867.html To unsubscribe from wicket-atmosphere EventBus.post throwing Null pointer exception sometime, click here . NAML http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Thanks Regards, Souvik Bhattacharya -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660880.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4660881i=2 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4660881i=3 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660881.html To unsubscribe from wicket-atmosphere EventBus.post throwing Null pointer exception sometime, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4660815code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ== . NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Thanks Regards, Souvik Bhattacharya -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660922.html Sent
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Thanks, Let me try to generate the error. But it's quite shocking that before mentioning the error number, it was open and after mention suddenly you can not re produce. May be in small application it can not be reproduce but in large production it can. Over net you will find few others also get the issue. So, wicked people should look into it more closely. On Tue, Aug 13, 2013 at 5:33 PM, Papegaaij [via Apache Wicket] ml-node+s1842946n4660867...@n4.nabble.com wrote: As you can see in the web.xml, the WicketFilter runs under /app. You can start it in jetty using the maven jetty plugin: mvn jetty:run (which will make the application available under localhost:8080/app) On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote: Hi, I have compiled the mentioned application and deployed in the glassfish server. But what is the url to run the same and also let me know how to run it on Jetty. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post- throwing-Null-pointer-exception-sometime-tp4660815p4660865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4660867i=0 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4660867i=1 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660867.html To unsubscribe from wicket-atmosphere EventBus.post throwing Null pointer exception sometime, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4660815code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ== . NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Thanks Regards, Souvik Bhattacharya -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660880.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, I closed the ticket because the reporter didn't provide us (the Wicket developers) with an application that reproduces the problem for a long period. As soon such application is attached to the ticket the ticket will be reopened and addressed. Please feel free to attach a quickstart application. Thanks! On Wed, Aug 14, 2013 at 2:59 PM, souvikbhattacharyas souvikbhattachar...@gmail.com wrote: Thanks, Let me try to generate the error. But it's quite shocking that before mentioning the error number, it was open and after mention suddenly you can not re produce. May be in small application it can not be reproduce but in large production it can. Over net you will find few others also get the issue. So, wicked people should look into it more closely. On Tue, Aug 13, 2013 at 5:33 PM, Papegaaij [via Apache Wicket] ml-node+s1842946n4660867...@n4.nabble.com wrote: As you can see in the web.xml, the WicketFilter runs under /app. You can start it in jetty using the maven jetty plugin: mvn jetty:run (which will make the application available under localhost:8080/app) On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote: Hi, I have compiled the mentioned application and deployed in the glassfish server. But what is the url to run the same and also let me know how to run it on Jetty. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post- throwing-Null-pointer-exception-sometime-tp4660815p4660865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4660867i=0 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4660867i=1 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660867.html To unsubscribe from wicket-atmosphere EventBus.post throwing Null pointer exception sometime, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4660815code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ== . NAML http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Thanks Regards, Souvik Bhattacharya -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660880.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
HI Emond, Thanks for your reply. We have updated all the jar's but no luck. What we found is the error is related to https://issues.apache.org/jira/browse/WICKET-5282 . So, this is not a atmosphere error rather error in wicket component. Is any wayout to solve the issue -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660862.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, As you can see in the ticket, we are unable to reproduce this problem. It is likely to be related to a particular way of using wicket-atmosphere. If you can provide us with a quickstart (you can clone the wicket-atmosphere- quickstart project at https://github.com/papegaaij/wicket-atmosphere-quickstart), we can probably help you. Best regards, Emond On Tuesday 13 August 2013 02:14:12 souvikbhattacharyas wrote: HI Emond, Thanks for your reply. We have updated all the jar's but no luck. What we found is the error is related to https://issues.apache.org/jira/browse/WICKET-5282 . So, this is not a atmosphere error rather error in wicket component. Is any wayout to solve the issue -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post- throwing-Null-pointer-exception-sometime-tp4660815p4660862.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, I have compiled the mentioned application and deployed in the glassfish server. But what is the url to run the same and also let me know how to run it on Jetty. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
As you can see in the web.xml, the WicketFilter runs under /app. You can start it in jetty using the maven jetty plugin: mvn jetty:run (which will make the application available under localhost:8080/app) On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote: Hi, I have compiled the mentioned application and deployed in the glassfish server. But what is the url to run the same and also let me know how to run it on Jetty. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post- throwing-Null-pointer-exception-sometime-tp4660815p4660865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, We have tried the version you mentioned, but no luck. Any other alternative to overcome this issue. Still sometimes it sending relative URI path as null. Help Appreciated. org.apache.wicket.protocol.http.servlet.ServletWebRequest|_ThreadName=hz._hzInstance_1_ssp.cached.thread-5|Calculating context relative path from: context path '', filterPrefix 'ssp/', uri 'null'|#] Thanks In Advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660860.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, I suggest you try upgrading wicket, wicket-atmosphere and atmosphere to more recent versions first. The version of wicket-atmosphere you are using is almost a year old. The most recent version is 0.12. Several bugs have been fixed since then. Best regards, Emond On Friday 09 August 2013 14:04:36 souvikbhattacharyas wrote: Hi, Recently I am stuck with problem of Wicket-atmosphere and it seems to be very strange to me. In my application, I am publishing data through Hazelcast and after HazelCast receives data, it uses wicket atmosphere's EventBus.post() method to push the data and then methods with @subscribe annotation receives the same and process. Now it's working fine but sometime it's giving nullpointer exception. There is no proper scenario when EventBus.post() will through null pointer exception but suddenly it's giving nullpointer exception for few EventBus.post() and after few exception EventBus.post() again start working. This become very strange thing to me now. I am giving all the code below. Please help me to identify the issue why I am getting the error. *hazelcast.verison = 2.2 wicket-atmosphere.version = 0.5 atmosphere.version = 1.0.4* *Web.xml* servlet servlet-namewicket/servlet-name servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueWebPortal/param-value /init-param init-param param-namelistings/param-name param-valuefalse/param-value /init-param init-param param-nameconfiguration/param-name param-valuedeployment/param-value /init-param init-param param-nameorg.atmosphere.useWebSocket/param- name param-valuefalse/param-value /init-param init-param param-nameorg.atmosphere.useNative/param-name param-valuetrue/param-value /init-param init-param param-nameorg.atmosphere.cpr.sessionSupport/param- name param-valuetrue/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/ssp/*/param-value /init-param init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param- name param-valueorg.atmosphere.client.TrackMessageSizeFilter/param- value /init-param load-on-startup0/load-on-startup /servlet *atmosphere.xml* atmosphere-handlers atmosphere-handler context-root=/* class- name=org.atmosphere.handler.ReflectorServletProcessor property name=filterClassName value=org.apache.wicket.protocol.http.WicketFilter / /atmosphere-handler /atmosphere-handlers *WebPortal object:* public class WebPortal extends AuthenticatedWebApplication { public WebPortal() { EventBus eventbus = new EventBus(this); HazelcastBroadcaster bc = (HazelcastBroadcaster) BroadcasterFactory.getDefault() .get(HazelcastBroadcaster.class, confEvnt); bc.setApplication(this); bc.getBroadcasterConfig().addFilter(new TrackMessageSizeFilter()); bc.getBroadcasterConfig().setBroadcasterCache(new HeaderBroadcasterCache()); } } *HazelcastBroadcaster* public class HazelcastBroadcaster extends AbstractBroadcasterProxy { private ITopic topic; private WebApplication application; private static HazelcastInstance hazelcastInstance = SspHazelcast.getInstance(); public HazelcastBroadcaster(String id, AtmosphereConfig config) { this(id, URI.create(http://localhost:6379;), config); } public HazelcastBroadcaster(String id, URI uri, AtmosphereConfig config) { super(id, uri, config); } @Override public void incomingBroadcast() { topic.addMessageListener(new MessageListenerString() { @Override public void onMessage(MessageString message) {
wicket-atmosphere EventBus.post throwing Null pointer exception sometime
Hi, Recently I am stuck with problem of Wicket-atmosphere and it seems to be very strange to me. In my application, I am publishing data through Hazelcast and after HazelCast receives data, it uses wicket atmosphere's EventBus.post() method to push the data and then methods with @subscribe annotation receives the same and process. Now it's working fine but sometime it's giving nullpointer exception. There is no proper scenario when EventBus.post() will through null pointer exception but suddenly it's giving nullpointer exception for few EventBus.post() and after few exception EventBus.post() again start working. This become very strange thing to me now. I am giving all the code below. Please help me to identify the issue why I am getting the error. *hazelcast.verison = 2.2 wicket-atmosphere.version = 0.5 atmosphere.version = 1.0.4* *Web.xml* servlet servlet-namewicket/servlet-name servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valueWebPortal/param-value /init-param init-param param-namelistings/param-name param-valuefalse/param-value /init-param init-param param-nameconfiguration/param-name param-valuedeployment/param-value /init-param init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param init-param param-nameorg.atmosphere.useNative/param-name param-valuetrue/param-value /init-param init-param param-nameorg.atmosphere.cpr.sessionSupport/param-name param-valuetrue/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/ssp/*/param-value /init-param init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.atmosphere.client.TrackMessageSizeFilter/param-value /init-param load-on-startup0/load-on-startup /servlet *atmosphere.xml* atmosphere-handlers atmosphere-handler context-root=/* class-name=org.atmosphere.handler.ReflectorServletProcessor property name=filterClassName value=org.apache.wicket.protocol.http.WicketFilter / /atmosphere-handler /atmosphere-handlers *WebPortal object:* public class WebPortal extends AuthenticatedWebApplication { public WebPortal() { EventBus eventbus = new EventBus(this); HazelcastBroadcaster bc = (HazelcastBroadcaster) BroadcasterFactory.getDefault() .get(HazelcastBroadcaster.class, confEvnt); bc.setApplication(this); bc.getBroadcasterConfig().addFilter(new TrackMessageSizeFilter()); bc.getBroadcasterConfig().setBroadcasterCache(new HeaderBroadcasterCache()); } } *HazelcastBroadcaster* public class HazelcastBroadcaster extends AbstractBroadcasterProxy { private ITopic topic; private WebApplication application; private static HazelcastInstance hazelcastInstance = SspHazelcast.getInstance(); public HazelcastBroadcaster(String id, AtmosphereConfig config) { this(id, URI.create(http://localhost:6379;), config); } public HazelcastBroadcaster(String id, URI uri, AtmosphereConfig config) { super(id, uri, config); } @Override public void incomingBroadcast() { topic.addMessageListener(new MessageListenerString() { @Override public void onMessage(MessageString message) { String stringMessage = message.getMessageObject(); EventBus.get(application).post(stringMessage); } }); } } *Hazelcast.xml:* hazelcast xsi:schemaLocation=http://www.hazelcast.com/schema/config hazelcast-basic.xsd xmlns=http://www.hazelcast.com/schema/config; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; group namessp/name passwordssp-pass/password /group network port auto-increment=true7301/port join tcp-ip enabled=true interface127.0.0.1/interface /tcp-ip /join interfaces enabled=true interface127.0.0.1/interface /interfaces /network /hazelcast *Exception:* java.lang.NullPointerException at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl
Re: Wicket Atmosphere - Encoding and MultiTab issues
On Wed, Jul 24, 2013 at 11:39 PM, fliptaboada fliptabo...@gmail.com wrote: Ticket filed :) https://issues.apache.org/jira/browse/WICKET-5285 The browsers have a limit of max opened connections to a domain. For Firefox and Chrome it is 6 connections. For IE 7/8 (not sure about the newer versions) it is 2. Interesting, Is this diferent when using websocket? We use JBoss EAP 6.1, so the Atmosphere version included in wicket-atmosphere (1.0.13) don't support JBoss Websockets, it fallsback to streaming and this issue happens, but I tried to implement a websocket based on this https://github.com/Atmosphere/jboss-websockets using a servlet and then this issue don't happens anymore, none of the tabs get blocked. In this test I've not used the jquery.atmosphere javascript, only the servlet implementation and basic Websocket javascript api. The only reference I can find is http://stackoverflow.com/questions/12475462/html5-websockets-max-number-of-open-connections http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser - this is about http connections in general -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342p4660474.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere - Encoding and MultiTab issues
Ticket filed :) https://issues.apache.org/jira/browse/WICKET-5285 The browsers have a limit of max opened connections to a domain. For Firefox and Chrome it is 6 connections. For IE 7/8 (not sure about the newer versions) it is 2. Interesting, Is this diferent when using websocket? We use JBoss EAP 6.1, so the Atmosphere version included in wicket-atmosphere (1.0.13) don't support JBoss Websockets, it fallsback to streaming and this issue happens, but I tried to implement a websocket based on this https://github.com/Atmosphere/jboss-websockets using a servlet and then this issue don't happens anymore, none of the tabs get blocked. In this test I've not used the jquery.atmosphere javascript, only the servlet implementation and basic Websocket javascript api. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342p4660474.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere - Encoding and MultiTab issues
Hi, On Thu, Jul 18, 2013 at 4:22 PM, fliptaboada fliptabo...@gmail.com wrote: Hi, I'm using wicket atmosphere on multiple pages to push some messages, like when a report is ready. The first problem is that the html updated by the wicket-atmosphere response arrives with broken enconding. Everything is fine until the respose reaches the jquery.atmosphere javascript. Already tried to do this on the javascript resources, but without success: @Override public JavaScriptPackageResource getResource() { JavaScriptPackageResource resource = super.getResource(); resource.setTextEncoding(UTF-8); return resource; } The second one is that when the user keep opening tabs, after 6 tabs, pages got locked and wait until you close another tab. Is there a parameter or something about this? Both problems are reproducibles at http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/ For the first just try to send a message with á Please file a ticket about this. For the second, keep opening tabs with this address, the sixth tab don't finish and the seventh still waiting. The browsers have a limit of max opened connections to a domain. For Firefox and Chrome it is 6 connections. For IE 7/8 (not sure about the newer versions) it is 2. Thanks, Felipe Taboada. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Atmosphere - Encoding and MultiTab issues
Hi, I'm using wicket atmosphere on multiple pages to push some messages, like when a report is ready. The first problem is that the html updated by the wicket-atmosphere response arrives with broken enconding. Everything is fine until the respose reaches the jquery.atmosphere javascript. Already tried to do this on the javascript resources, but without success: @Override public JavaScriptPackageResource getResource() { JavaScriptPackageResource resource = super.getResource(); resource.setTextEncoding(UTF-8); return resource; } The second one is that when the user keep opening tabs, after 6 tabs, pages got locked and wait until you close another tab. Is there a parameter or something about this? Both problems are reproducibles at http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/ For the first just try to send a message with á For the second, keep opening tabs with this address, the sixth tab don't finish and the seventh still waiting. Thanks, Felipe Taboada. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere - How to unsubscribe?
A quick update... After upgrading to the latest versions (wicket-6.9.0, wicket-atmosphere-0.11 atmosphere-runtime-1.0.13) I was still experiencing the issue. However I noticed that some of the retained pages where being held by Jetty specific classes (I was profiling the app locally via eclipse). I decided to carry out the same profiling on a deployed instance of the application (runniing in Tomcat7) and the problem disappeared, pages are cleared up as you would expect and nothing untoward is retained in memory. Therefore I can only assume that the issue is somehow related to the Jetty implementation, but as I am not deploying to Jetty (I only use it to develop with locally), I guess this is no longer a problem for me. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-How-to-unsubscribe-tp4660170p4660206.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-Atmosphere : best way to call server
Hi, I think you should use the Atmosphere APIs. Wicket.Ajax.get() knows nothing about WebSocket technology so it won't work. Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is no such thing in WIcket-Atmosphere. On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil goupilpie...@gmail.comwrote: Good afternoon, When using Wicket-Atmosphere (0.11), which is the recommended way to send a message to the server in order to receive a WebSocket (or fallback transport) response? I mean, I am supposed to do: var socket = $.atmosphere;var request = new $.atmosphere.AtmosphereRequest();var subSocket = socket.subscribe(request); subSocket.push(JSON.stringify({ 'blah' })); Or: Wicket.Ajax.get() ? I doubt that there is a sensible performance difference, but I prefer to ask. Sorry if this is a silly question. Regards, Pierre
Re: Wicket-Atmosphere : best way to call server
Thanks, Martin! So it definitely worth giving it a try: I'll do that ASAP. Regards, Pierre On Mon, Jul 8, 2013 at 8:13 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I think you should use the Atmosphere APIs. Wicket.Ajax.get() knows nothing about WebSocket technology so it won't work. Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is no such thing in WIcket-Atmosphere. On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil goupilpie...@gmail.com wrote: Good afternoon, When using Wicket-Atmosphere (0.11), which is the recommended way to send a message to the server in order to receive a WebSocket (or fallback transport) response? I mean, I am supposed to do: var socket = $.atmosphere;var request = new $.atmosphere.AtmosphereRequest();var subSocket = socket.subscribe(request); subSocket.push(JSON.stringify({ 'blah' })); Or: Wicket.Ajax.get() ? I doubt that there is a sensible performance difference, but I prefer to ask. Sorry if this is a silly question. Regards, Pierre
Re: Wicket-Atmosphere : best way to call server
Hi, I've tried to provide the same URL than with Wicket.Ajax.get to my request objet but it miserably fails with a client-side exception that Firebug is unable to copy / paste. I'm a bit disappointed. Is there anything I should be aware of? Regards, Pierre On Mon, Jul 8, 2013 at 10:12 AM, Pierre Goupil goupilpie...@gmail.comwrote: Thanks, Martin! So it definitely worth giving it a try: I'll do that ASAP. Regards, Pierre On Mon, Jul 8, 2013 at 8:13 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I think you should use the Atmosphere APIs. Wicket.Ajax.get() knows nothing about WebSocket technology so it won't work. Wicket NativeWebSocket exposes Wicket.WebSocket.** APIs but afaik there is no such thing in WIcket-Atmosphere. On Sat, Jul 6, 2013 at 6:43 PM, Pierre Goupil goupilpie...@gmail.com wrote: Good afternoon, When using Wicket-Atmosphere (0.11), which is the recommended way to send a message to the server in order to receive a WebSocket (or fallback transport) response? I mean, I am supposed to do: var socket = $.atmosphere;var request = new $.atmosphere.AtmosphereRequest();var subSocket = socket.subscribe(request); subSocket.push(JSON.stringify({ 'blah' })); Or: Wicket.Ajax.get() ? I doubt that there is a sensible performance difference, but I prefer to ask. Sorry if this is a silly question. Regards, Pierre -- Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas mal. Alors frappez-moi de musique ! Frappez-moi de musique, maintenant ! (Bob Marley : Trenchtown Rock)
Wicket-Atmosphere : best way to call server
Good afternoon, When using Wicket-Atmosphere (0.11), which is the recommended way to send a message to the server in order to receive a WebSocket (or fallback transport) response? I mean, I am supposed to do: var socket = $.atmosphere;var request = new $.atmosphere.AtmosphereRequest();var subSocket = socket.subscribe(request); subSocket.push(JSON.stringify({ 'blah' })); Or: Wicket.Ajax.get() ? I doubt that there is a sensible performance difference, but I prefer to ask. Sorry if this is a silly question. Regards, Pierre
Re: Wicket-Atmosphere ResourceRegistrationListener
Heads up, men! :-) I'm gonna file in a bug, then. Hopefully, Emond will be able to do something for me. Regards, Pierre On Tue, Jun 25, 2013 at 8:19 PM, Pierre Goupil goupilpie...@gmail.comwrote: Good evening all, I use ResourceRegistrationListener in my HomePage with wicket-atmosphere 0.10 and neither resourceRegistered() nor resourceUnregistered() are called. Does anyone have a clue, please? I have a working clock, as in the examples, but I can't find the UUID for EventBus#post(Object event, String resourceUuid). If I do this: AtmosphereBehavior.getUUID(homePage), it returns null. Any help is appreciated. Regards, Pierre
Wicket-Atmosphere ResourceRegistrationListener
Good evening all, I use ResourceRegistrationListener in my HomePage with wicket-atmosphere 0.10 and neither resourceRegistered() nor resourceUnregistered() are called. Does anyone have a clue, please? I have a working clock, as in the examples, but I can't find the UUID for EventBus#post(Object event, String resourceUuid). If I do this: AtmosphereBehavior.getUUID(homePage), it returns null. Any help is appreciated. Regards, Pierre
Re: wicket-atmosphere issues
On Tue, Mar 26, 2013 at 4:31 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: On Monday 25 March 2013 00:59:30 Leonid Bogdanov wrote: 3) In my app Apache Shiro framework is integrated via a plugin adapted from fiftyfive-wicket-shiro project. User credentials are checked in an AJAX login form. In order to prevent a session fixation attack there is a call to invalidate old and create new session right before credentials check: getSession().replaceSession(); // inside AjaxFallbackButton.onSubmit() After integration with Atmosphere this code no longer works, an exception in thrown on login attempt: cut IllegalStateException in Session I'm not sure what happens here. It seems Wicket tries to read an attribute from the invalidated session. Does this happen even without a suspended connected? I encountered this same issue, and traced it back to the AtmosphereRequest caching and returning the original session, even after it had been invalidated and replaced. I reported it upstream. https://github.com/Atmosphere/atmosphere/pull/1139 Dan
Re: wicket-atmosphere issues
Hi, Jira issue: https://issues.apache.org/jira/browse/WICKET-5145 I couldn't find any way to add a patch in Jira, so I attached both the new source code and a diff between the old and new code as files. Greetings, Martin On Apr 15, 2013, at 9:50 PM, Martin Grigorov wrote: Hi, Please create a ticket and attach the patch you propose. Thanks! On Sun, Apr 14, 2013 at 5:59 PM, Martin Geisse martingei...@googlemail.comwrote: Hi, 2) It seems like sometimes empty Atmosphere messages are sent to a page when a filter rejected the specific message. For such events I have the following log record on the server [Atmosphere-AsyncWrite-1] INFO o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0|msg| and there is a JS error in a browser after receiveing the event ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element What is the purpose of sending empty messages to a browser? I had similar issues, and after a short look at the EventBus class, it doesn't even seem as if empty subscription sets are handled specially at all. postToSingleResource() has special handling for the case that the UUID has become unknown, but an empty subscription set would still be passed to post() and handled in a normal request cycle. As a first guess, I'd change the else at the bottom of postToSingleResource() into an else if (!subscriptionsForPage.isEmpty()), i.e. not remove the atmosphere resource as for unknown UUIDs, but also not starting a request cycle. Greetings, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: wicket-atmosphere issues
Hi, Please create a ticket and attach the patch you propose. Thanks! On Sun, Apr 14, 2013 at 5:59 PM, Martin Geisse martingei...@googlemail.comwrote: Hi, 2) It seems like sometimes empty Atmosphere messages are sent to a page when a filter rejected the specific message. For such events I have the following log record on the server [Atmosphere-AsyncWrite-1] INFO o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0|msg| and there is a JS error in a browser after receiveing the event ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element What is the purpose of sending empty messages to a browser? I had similar issues, and after a short look at the EventBus class, it doesn't even seem as if empty subscription sets are handled specially at all. postToSingleResource() has special handling for the case that the UUID has become unknown, but an empty subscription set would still be passed to post() and handled in a normal request cycle. As a first guess, I'd change the else at the bottom of postToSingleResource() into an else if (!subscriptionsForPage.isEmpty()), i.e. not remove the atmosphere resource as for unknown UUIDs, but also not starting a request cycle. Greetings, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: wicket-atmosphere issues
Hi, 2) It seems like sometimes empty Atmosphere messages are sent to a page when a filter rejected the specific message. For such events I have the following log record on the server [Atmosphere-AsyncWrite-1] INFO o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0|msg| and there is a JS error in a browser after receiveing the event ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element What is the purpose of sending empty messages to a browser? I had similar issues, and after a short look at the EventBus class, it doesn't even seem as if empty subscription sets are handled specially at all. postToSingleResource() has special handling for the case that the UUID has become unknown, but an empty subscription set would still be passed to post() and handled in a normal request cycle. As a first guess, I'd change the else at the bottom of postToSingleResource() into an else if (!subscriptionsForPage.isEmpty()), i.e. not remove the atmosphere resource as for unknown UUIDs, but also not starting a request cycle. Greetings, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-atmosphere issues
On Monday 25 March 2013 00:59:30 Leonid Bogdanov wrote: Hello! I'm playing with the wicket-atmosphere module and, while generally it works fine, I stumbled upon a couple of issues: 1) Suppose I have a Page with a method marked with @Subscribe annotation, this subscribtion has a filter attached. Is it possible to get the Page instance inside the filter to, e.g., access Page instance variables when deciding on event filtering? Filtering is performed outside the scope of the pages. Fetching pages from the page store is very expensive, especially if you are going to push events to many pages. I suggest you put data you need for filtering in the atmosphere resource, which is available in the filter. If that's not possible, you can try a contextAwareFilter, but beware of the performance issues. 2) It seems like sometimes empty Atmosphere messages are sent to a page when a filter rejected the specific message. For such events I have the following log record on the server [Atmosphere-AsyncWrite-1] INFO o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0|msg| and there is a JS error in a browser after receiveing the event ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element What is the purpose of sending empty messages to a browser? This seems like a bug. Please file a bug report with a quickstart. You can use https://github.com/papegaaij/wicket-atmosphere-quickstart as a starting point. 3) In my app Apache Shiro framework is integrated via a plugin adapted from fiftyfive-wicket-shiro project. User credentials are checked in an AJAX login form. In order to prevent a session fixation attack there is a call to invalidate old and create new session right before credentials check: getSession().replaceSession(); // inside AjaxFallbackButton.onSubmit() After integration with Atmosphere this code no longer works, an exception in thrown on login attempt: cut IllegalStateException in Session I'm not sure what happens here. It seems Wicket tries to read an attribute from the invalidated session. Does this happen even without a suspended connected? Best regards, Emond
wicket-atmosphere issues
Hello! I'm playing with the wicket-atmosphere module and, while generally it works fine, I stumbled upon a couple of issues: 1) Suppose I have a Page with a method marked with @Subscribe annotation, this subscribtion has a filter attached. Is it possible to get the Page instance inside the filter to, e.g., access Page instance variables when deciding on event filtering? 2) It seems like sometimes empty Atmosphere messages are sent to a page when a filter rejected the specific message. For such events I have the following log record on the server [Atmosphere-AsyncWrite-1] INFO o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0|msg| and there is a JS error in a browser after receiveing the event ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element What is the purpose of sending empty messages to a browser? 3) In my app Apache Shiro framework is integrated via a plugin adapted from fiftyfive-wicket-shiro project. User credentials are checked in an AJAX login form. In order to prevent a session fixation attack there is a call to invalidate old and create new session right before credentials check: getSession().replaceSession(); // inside AjaxFallbackButton.onSubmit() After integration with Atmosphere this code no longer works, an exception in thrown on login attempt: 22:11:41.698 [qtp18908406-24] ERROR o.a.wicket.DefaultExceptionMapper - Unexpected error occurred org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton$1@f78197 on component [AjaxFallbackButton [Component id = submit]] threw an exception at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268) ~[wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) ~[wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:247) ~[wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) ~[wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840) ~[wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.6.0.jar:6.6.0] at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) [wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) [wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) [wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244) [wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) [wicket-core-6.6.0.jar:6.6.0] at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267) [wicket-core-6.6.0.jar:6.6.0] at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:132) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:314) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:172) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:256) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:166) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:96) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.container.JettyAsyncSupportWithWebSocket.service(JettyAsyncSupportWithWebSocket.java:70) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1307) [atmosphere-runtime-1.0.8.jar:1.0.8] at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:293) [atmosphere-runtime-1.0.8.jar:1.0.8] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [javax.servlet-3.0.0.v201112011016.jar:na] Caused by: java.lang.IllegalStateException: null
Re: [wicket-atmosphere] Spring Security context while rendering subscribed components
Hi, I'm sorry for the late reply, but I haven't been well last week. Wicket-atmosphere follows the wicket request cycle. Perhaps you can add a RequestCycleListener to setup the context? Keep in mind though that this listener is also called for normal requests. Let me know if this is ok for you. Another solution would be to add another listener system, but I think it's better to try to use existing systems before adding another wheel. Best regards, Emond Op 8 mrt. 2013 14:31 schreef Andrei Badea andrei.ba...@movzx.net het volgende: Our Wicket application uses Spring Security for authentication and authorization. All service methods check that the current user (in the Spring Security context) has the right to execute the method. When the subscribed components are rendered for an Atmosphere broadcast, the security context is not the right one. We call EventBus.post() in a background (non-HTTP) thread, so there is no security context at all (and even if it were, its user would not be the right one). I can use ResourceRegistrationListener to keep track of the resource-UUID-to-user assignment, but I see no way to set the user into the security context before the subscribed components are rendered. Is there one? If not, it is conceivable to add one, such as some sort of hook to EventBus.post()? The security context would ideally be set around postToSingleResource(), and it must be reset after all resources have been handled. Thank you, Andrei --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere with CryptoMapper gives exception.
) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Thread.java:662) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-with-CryptoMapper-gives-exception-tp4657223.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
[wicket-atmosphere] Spring Security context while rendering subscribed components
Our Wicket application uses Spring Security for authentication and authorization. All service methods check that the current user (in the Spring Security context) has the right to execute the method. When the subscribed components are rendered for an Atmosphere broadcast, the security context is not the right one. We call EventBus.post() in a background (non-HTTP) thread, so there is no security context at all (and even if it were, its user would not be the right one). I can use ResourceRegistrationListener to keep track of the resource-UUID-to-user assignment, but I see no way to set the user into the security context before the subscribed components are rendered. Is there one? If not, it is conceivable to add one, such as some sort of hook to EventBus.post()? The security context would ideally be set around postToSingleResource(), and it must be reset after all resources have been handled. Thank you, Andrei - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket+Atmosphere behind Apache proxy problems
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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket+Atmosphere behind Apache proxy problems
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 ma...@glitchbox.nl 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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket+Atmosphere behind Apache proxy problems
Thx for the reply Martin, Unfortunately I'm stuck with Apache, for the next ~3 years or so, until I've rewritten all other applications into a Wicket variant. Is there an option to somehow force the Atmosphere framework to use the older cometd/long-polling methods instead of the WebSocket technology? 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 ma...@glitchbox.nl 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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket+Atmosphere behind Apache proxy problems
Yes, Atmosphere JS client supports that. Since recently Wicket-Atmosphere supports configuring the JS client settings. See https://github.com/apache/wicket/commit/c24a561d5220a96f5bbac6af4393ed2478613331 Consult with Atmosphere docs for all supported settings. On Wed, Feb 20, 2013 at 4:47 PM, Marco Springer ma...@glitchbox.nl wrote: Thx for the reply Martin, Unfortunately I'm stuck with Apache, for the next ~3 years or so, until I've rewritten all other applications into a Wicket variant. Is there an option to somehow force the Atmosphere framework to use the older cometd/long-polling methods instead of the WebSocket technology? 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 ma...@glitchbox.nl 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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket+Atmosphere behind Apache proxy problems
I tinkered around and I did the following: init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/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 ma...@glitchbox.nl 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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [wicket-atmosphere] resource UUID
can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957. I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: [wicket-atmosphere] resource UUID
then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957. I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] resource UUID
Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] atmosphere version
Sure! But it doesn't help. And as I said, there is no error in my logs, neither client-side nor server-side. As I understand things, it should work with any version of Atmosphere starting from 1.0.0, right? Do you have any clue? Regards, Pierre On Thu, Jan 10, 2013 at 1:07 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: With recent versions of wicket-atmosphere, you are required to add this parameter to the AtmosphereServlet: init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param- value /init-param Did you add that? Best regards, Emond On Tuesday 08 January 2013 23:52:40 Pierre Goupil wrote: Good evening, Which version of the atmosphere runtime am I supposed to use with wicket-atmosphere? In my app, when I use atmosphere 1.0.0 everything works, but when I use atmosphere 1.0.4 or 1.0.5, no Comet channel works. I use wicket-atmosphere 0.7-SNAPSHOT. Regards, Pierre -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] atmosphere version
Yes, it should work with any 1.0 version. I think you should try to verify the AJAX-messges, perhaps with Wicket's AJAX-debugger. Best regards, Emond On Friday 11 January 2013 17:06:09 Pierre Goupil wrote: Sure! But it doesn't help. And as I said, there is no error in my logs, neither client-side nor server-side. As I understand things, it should work with any version of Atmosphere starting from 1.0.0, right? Do you have any clue? Regards, Pierre On Thu, Jan 10, 2013 at 1:07 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: With recent versions of wicket-atmosphere, you are required to add this parameter to the AtmosphereServlet: init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param- value /init-param Did you add that? Best regards, Emond On Tuesday 08 January 2013 23:52:40 Pierre Goupil wrote: Good evening, Which version of the atmosphere runtime am I supposed to use with wicket-atmosphere? In my app, when I use atmosphere 1.0.0 everything works, but when I use atmosphere 1.0.4 or 1.0.5, no Comet channel works. I use wicket-atmosphere 0.7-SNAPSHOT. Regards, Pierre
Re: [wicket-atmosphere] atmosphere version
I've found it! I had a HttpSession supported: false in my start-up Tomcat logs when using Atmosphere 1.0.5. I don't know why, but I assume it's a default behaviour change because when using Atmosphere 1.0.0 and changing nothing else, I had: HttpSession supported: true. So I've followed instructions on this page: https://github.com/Atmosphere/atmosphere/wiki/Enabling-HttpSession-Supportand it works like a charm! Cheers, men! Pierre On Fri, Jan 11, 2013 at 5:22 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Yes, it should work with any 1.0 version. I think you should try to verify the AJAX-messges, perhaps with Wicket's AJAX-debugger. Best regards, Emond On Friday 11 January 2013 17:06:09 Pierre Goupil wrote: Sure! But it doesn't help. And as I said, there is no error in my logs, neither client-side nor server-side. As I understand things, it should work with any version of Atmosphere starting from 1.0.0, right? Do you have any clue? Regards, Pierre On Thu, Jan 10, 2013 at 1:07 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: With recent versions of wicket-atmosphere, you are required to add this parameter to the AtmosphereServlet: init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param- value /init-param Did you add that? Best regards, Emond On Tuesday 08 January 2013 23:52:40 Pierre Goupil wrote: Good evening, Which version of the atmosphere runtime am I supposed to use with wicket-atmosphere? In my app, when I use atmosphere 1.0.0 everything works, but when I use atmosphere 1.0.4 or 1.0.5, no Comet channel works. I use wicket-atmosphere 0.7-SNAPSHOT. Regards, Pierre -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] atmosphere version
That's good to hear. I totally forgot about that option. It was added some time ago and is indeed needed for Wicket. Without it the behavior does not work because it is stateful. Best regards, Emond Op 11 jan. 2013 19:01 schreef Pierre Goupil goupilpie...@gmail.com het volgende: I've found it! I had a HttpSession supported: false in my start-up Tomcat logs when using Atmosphere 1.0.5. I don't know why, but I assume it's a default behaviour change because when using Atmosphere 1.0.0 and changing nothing else, I had: HttpSession supported: true. So I've followed instructions on this page: https://github.com/Atmosphere/atmosphere/wiki/Enabling-HttpSession-Supportand it works like a charm! Cheers, men! Pierre On Fri, Jan 11, 2013 at 5:22 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Yes, it should work with any 1.0 version. I think you should try to verify the AJAX-messges, perhaps with Wicket's AJAX-debugger. Best regards, Emond On Friday 11 January 2013 17:06:09 Pierre Goupil wrote: Sure! But it doesn't help. And as I said, there is no error in my logs, neither client-side nor server-side. As I understand things, it should work with any version of Atmosphere starting from 1.0.0, right? Do you have any clue? Regards, Pierre On Thu, Jan 10, 2013 at 1:07 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: With recent versions of wicket-atmosphere, you are required to add this parameter to the AtmosphereServlet: init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param- value /init-param Did you add that? Best regards, Emond On Tuesday 08 January 2013 23:52:40 Pierre Goupil wrote: Good evening, Which version of the atmosphere runtime am I supposed to use with wicket-atmosphere? In my app, when I use atmosphere 1.0.0 everything works, but when I use atmosphere 1.0.4 or 1.0.5, no Comet channel works. I use wicket-atmosphere 0.7-SNAPSHOT. Regards, Pierre -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] resource UUID
I've just pushed the fix for WICKET-4957: you can now listen to the registration of resources for pages. Best regards, Emond On Tuesday 08 January 2013 23:49:36 Pierre Goupil wrote: Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.comwrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] atmosphere version
With recent versions of wicket-atmosphere, you are required to add this parameter to the AtmosphereServlet: init-param param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param- value /init-param Did you add that? Best regards, Emond On Tuesday 08 January 2013 23:52:40 Pierre Goupil wrote: Good evening, Which version of the atmosphere runtime am I supposed to use with wicket-atmosphere? In my app, when I use atmosphere 1.0.0 everything works, but when I use atmosphere 1.0.4 or 1.0.5, no Comet channel works. I use wicket-atmosphere 0.7-SNAPSHOT. Regards, Pierre
Re: [wicket-atmosphere] resource UUID
Hi Emond, I must be doing something wrong, as it doesn't work. I have implemented ResourceRegistrationListener in my HomePage and I set the UUIDs in the method resourceRegistered() but my logs show that it's never called. Is there any more than implementing ResourceRegistrationListener that I'm supposed to do? Regards, Pierre On Thu, Jan 10, 2013 at 1:05 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: I've just pushed the fix for WICKET-4957: you can now listen to the registration of resources for pages. Best regards, Emond On Tuesday 08 January 2013 23:49:36 Pierre Goupil wrote: Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.com wrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] resource UUID
You have to register it in the EventBus On Thu, Jan 10, 2013 at 4:27 PM, Pierre Goupil goupilpie...@gmail.comwrote: Hi Emond, I must be doing something wrong, as it doesn't work. I have implemented ResourceRegistrationListener in my HomePage and I set the UUIDs in the method resourceRegistered() but my logs show that it's never called. Is there any more than implementing ResourceRegistrationListener that I'm supposed to do? Regards, Pierre On Thu, Jan 10, 2013 at 1:05 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: I've just pushed the fix for WICKET-4957: you can now listen to the registration of resources for pages. Best regards, Emond On Tuesday 08 January 2013 23:49:36 Pierre Goupil wrote: Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.com wrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: [wicket-atmosphere] resource UUID
Indeed. I've tried this in my page constructor: Application.get().getEventBus().registerPage(hp + UUID.randomUUID(), this); But it doesn't do the trick. Sorry to bug you, but I can't find the right method! Regards, Pierre On Thu, Jan 10, 2013 at 3:30 PM, Martin Grigorov mgrigo...@apache.orgwrote: You have to register it in the EventBus On Thu, Jan 10, 2013 at 4:27 PM, Pierre Goupil goupilpie...@gmail.com wrote: Hi Emond, I must be doing something wrong, as it doesn't work. I have implemented ResourceRegistrationListener in my HomePage and I set the UUIDs in the method resourceRegistered() but my logs show that it's never called. Is there any more than implementing ResourceRegistrationListener that I'm supposed to do? Regards, Pierre On Thu, Jan 10, 2013 at 1:05 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: I've just pushed the fix for WICKET-4957: you can now listen to the registration of resources for pages. Best regards, Emond On Tuesday 08 January 2013 23:49:36 Pierre Goupil wrote: Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.com wrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957. I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: [wicket-atmosphere] resource UUID
You should register it with EventBus.addRegistrationListener and a page should not implement the interface, it is meant as an application global listener. Emond On Thursday 10 January 2013 15:50:12 Pierre Goupil wrote: Indeed. I've tried this in my page constructor: Application.get().getEventBus().registerPage(hp + UUID.randomUUID(), this); But it doesn't do the trick. Sorry to bug you, but I can't find the right method! Regards, Pierre On Thu, Jan 10, 2013 at 3:30 PM, Martin Grigorov mgrigo...@apache.orgwrote: You have to register it in the EventBus On Thu, Jan 10, 2013 at 4:27 PM, Pierre Goupil goupilpie...@gmail.com wrote: Hi Emond, I must be doing something wrong, as it doesn't work. I have implemented ResourceRegistrationListener in my HomePage and I set the UUIDs in the method resourceRegistered() but my logs show that it's never called. Is there any more than implementing ResourceRegistrationListener that I'm supposed to do? Regards, Pierre On Thu, Jan 10, 2013 at 1:05 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: I've just pushed the fix for WICKET-4957: you can now listen to the registration of resources for pages. Best regards, Emond On Tuesday 08 January 2013 23:49:36 Pierre Goupil wrote: Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.com wrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957. I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket Atmosphere does not run in Firefox 17
Disabling WS will cause atmosphere to fall back on a different protocol, such as http streaming or polling. WS is designed to support 2-way communication, http is not. These other implementations might not be as reliable or might consume more resources. This page contains a nice description of the benefits of WS: http://www.websocket.org/quantum.html Best regards, Emond On Monday 07 January 2013 17:48:34 Noven wrote: Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Wicket Atmosphere does not run in Firefox 17
Emond, Thank you for the link. Btw didn't you find the quickstart does not work in firefox? I will enable WS back and figure it out how to fix in firefox. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 3:38 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Disabling WS will cause atmosphere to fall back on a different protocol, such as http streaming or polling. WS is designed to support 2-way communication, http is not. These other implementations might not be as reliable or might consume more resources. This page contains a nice description of the benefits of WS: http://www.websocket.org/quantum.html Best regards, Emond On Monday 07 January 2013 17:48:34 Noven wrote: Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Wicket Atmosphere does not run in Firefox 17
The quickstart does work on Firefox, but not on your provider. You should only enable WS if your provider supports it. Atmosphere tries to autodetect the capabilities of the browser and server to determine the best protocol to use. For some reason, this system fails to detect that WS is not working on your server, but only on Firefox. Chrome reverts to streaming and IE does not support WS at all, so it starts with streaming right away. Best regards, Emond On Tuesday 08 January 2013 17:25:07 Noven wrote: Emond, Thank you for the link. Btw didn't you find the quickstart does not work in firefox? I will enable WS back and figure it out how to fix in firefox. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 3:38 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Disabling WS will cause atmosphere to fall back on a different protocol, such as http streaming or polling. WS is designed to support 2-way communication, http is not. These other implementations might not be as reliable or might consume more resources. This page contains a nice description of the benefits of WS: http://www.websocket.org/quantum.html Best regards, Emond On Monday 07 January 2013 17:48:34 Noven wrote: Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: [wicket-atmosphere] resource UUID
Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil
Re: [wicket-atmosphere] resource UUID
Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nlwrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: Wicket Atmosphere does not run in Firefox 17
Emond, Thank you for your support. I will contact my provider about this. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 7:27 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 The quickstart does work on Firefox, but not on your provider. You should only enable WS if your provider supports it. Atmosphere tries to autodetect the capabilities of the browser and server to determine the best protocol to use. For some reason, this system fails to detect that WS is not working on your server, but only on Firefox. Chrome reverts to streaming and IE does not support WS at all, so it starts with streaming right away. Best regards, Emond On Tuesday 08 January 2013 17:25:07 Noven wrote: Emond, Thank you for the link. Btw didn't you find the quickstart does not work in firefox? I will enable WS back and figure it out how to fix in firefox. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 3:38 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Disabling WS will cause atmosphere to fall back on a different protocol, such as http streaming or polling. WS is designed to support 2-way communication, http is not. These other implementations might not be as reliable or might consume more resources. This page contains a nice description of the benefits of WS: http://www.websocket.org/quantum.html Best regards, Emond On Monday 07 January 2013 17:48:34 Noven wrote: Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: [wicket-atmosphere] resource UUID
Emond, I've tried it like you said and it almost works! It works in the sense that I'm able to send an event to only one resource : that alone is fine in itself. But unfortunately, when doing: broadcaster.getAtmosphereResources() I don't know which browser corresponds to which resource. So I definitively need your functionality of resource creation listening. Keep up the good work! Cheers, Pierre On Tue, Jan 8, 2013 at 2:07 PM, Pierre Goupil goupilpie...@gmail.comwrote: Excellent, Emond! I'll try it like you said and tell you what happens. Cheers, Pierre On Tue, Jan 8, 2013 at 1:55 PM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi Pierre, The UUID is bound to a page when atmosphere makes to call back to the server, which makes sense because before then, there is no AtmosphereResource, which means there cannot be a UUID. I think this is a bit of a design flaw, because it is not possible to listen to the registration of this uuid. I'll see if I can add a listener to EventBus to act on the registration and removal of tracked pages: https://issues.apache.org/jira/browse/WICKET-4957 . I'll try to fix this later today. For the testcase, you can use post with a resource and take the resource from the Broadcaster: BroadcasterFactory.getDefault() to get the BroadcasterFactory factory.lookup... to get the Broadcaster broadcaster.getAtmosphereResources() and pick one Best regards, Emond On Monday 07 January 2013 22:43:43 Pierre Goupil wrote: Good evening, As asked in WICKET-4879 https://issues.apache.org/jira/browse/WICKET-4879I was supposed to create a quickstart demonstrating that Application.get().getEventBus().post(MyObject, pageUuid) sends its messages to all connected clients. I'd like to apologize here because I haven't created it yet: it's been 1 month since I'm sick and / or in holidays and I've only managed to create it this evening. My bad, sorry. So I'm in the process of creating this quickstart and I have a problem, when I do: AtmosphereBehavior.getUUID(this) in a WebPage (a sub-class of it, in fact) it always returns null. So I'm unable to have a working post(MyObject, pageUuid). Does anyone has an idea regarding this? I use wicket-atmosphere 0.7-SNAPSHOT: in 0.4-SNAPSHOT it used to work well (at least the UUID retrieving part) but it looks like it's not the case anymore. Thanks in advance, Pierre Goupil -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand -- Parce que c'est la nuit qu'il est beau de croire à la lumière. Edmond Rostand
Re: Wicket Atmosphere does not run in Firefox 17
Emond, Today I got the solution of this issue. After contacting my hosting provider, we found out that the problem is that Apache does not support proxying websockets via AJP or other protocols with the currently installed modules. References: http://serverfault.com/questions/290121/configuring-apache2-to-proxy-websocket https://issues.apache.org/bugzilla/show_bug.cgi?id=47485 It may be possible to install an additional module to support websockets. There is at least one project to add this functionality to apache: http://blog.alex.org.uk/2012/02/16/using-apache-websocket-to-proxy-tcp-connection/ Then we try using http protocol to connect to tomcat instead of ajp. We may actually have to bypass apache and direct a port on the server directly to tomcat. Hope this may be useful for others. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 7:27 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 The quickstart does work on Firefox, but not on your provider. You should only enable WS if your provider supports it. Atmosphere tries to autodetect the capabilities of the browser and server to determine the best protocol to use. For some reason, this system fails to detect that WS is not working on your server, but only on Firefox. Chrome reverts to streaming and IE does not support WS at all, so it starts with streaming right away. Best regards, Emond On Tuesday 08 January 2013 17:25:07 Noven wrote: Emond, Thank you for the link. Btw didn't you find the quickstart does not work in firefox? I will enable WS back and figure it out how to fix in firefox. Regards, Noven From: Emond Papegaaij emond.papega...@topicus.nl To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Tuesday, January 8, 2013 3:38 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Disabling WS will cause atmosphere to fall back on a different protocol, such as http streaming or polling. WS is designed to support 2-way communication, http is not. These other implementations might not be as reliable or might consume more resources. This page contains a nice description of the benefits of WS: http://www.websocket.org/quantum.html Best regards, Emond On Monday 07 January 2013 17:48:34 Noven wrote: Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Wicket Atmosphere does not run in Firefox 17
Emond, Finally I can make it run in Firefox by disable using websocket in web.xml init-param param-nameorg.atmosphere.useWebSocket/param-name param-valuefalse/param-value /init-param Don't know if there's drawback doing that since it comes as default setting in the quickstart. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Thursday, December 27, 2012 2:29 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Example of wicket atmosphere with channel
Emond, Sorry for my late reply. Just come back from holiday. I saw at contextAwareFilter and find it useful. But I have not tried it yet in my project. Currently I still depend on wicketstuff-push instead wicket-atmosphere. I was thinking to move to wicket-atmosphere because it is more easy to implement and has less code than wicketstuff-push. Regards, Noven From: Emond Papegaaij emond.papega...@gmail.com To: users@wicket.apache.org Sent: Thursday, December 27, 2012 1:56 PM Subject: Re: Example of wicket atmosphere with channel I presume you are refering to WICKET-4879, There are no examples of the new API yet, but the changes are not that big. I did not really implement channels, but made the changes that would allow you to implement channels. It is now possible to post an event to a single client (rather than all clients), either via the AtmosphereResource for that client, or its UUID. I also added a contextAwareFilter() to @Subscribe, which allows you to access the RequestCycle and session from the filter. This can be used to differentiate on the receiver of the event, where filter() can only be used to differentiate on the content of the event. Be careful with this new method though, because it will not scale very will with large numbers of concurrent users. Looking at the code again, I think I'm going to change the Predicate into a Function on AtmosphereResource. That would allow you to keep track of some attributes in AtmosphereRequest on which to write your filter, which puts a lot less weight on the server than setting up a RequestCycle. Best regards, Emond Papegaaij On Thu, Dec 20, 2012 at 8:31 PM, Noven noven_...@yahoo.com wrote: Hi, I just saw new features released at wicket 6.40. And I am interested to see example code of the atmosphere channel. Where can i find the example of this feature? Thanks.
Re: Example of wicket atmosphere with channel
I presume you are refering to WICKET-4879, There are no examples of the new API yet, but the changes are not that big. I did not really implement channels, but made the changes that would allow you to implement channels. It is now possible to post an event to a single client (rather than all clients), either via the AtmosphereResource for that client, or its UUID. I also added a contextAwareFilter() to @Subscribe, which allows you to access the RequestCycle and session from the filter. This can be used to differentiate on the receiver of the event, where filter() can only be used to differentiate on the content of the event. Be careful with this new method though, because it will not scale very will with large numbers of concurrent users. Looking at the code again, I think I'm going to change the Predicate into a Function on AtmosphereResource. That would allow you to keep track of some attributes in AtmosphereRequest on which to write your filter, which puts a lot less weight on the server than setting up a RequestCycle. Best regards, Emond Papegaaij On Thu, Dec 20, 2012 at 8:31 PM, Noven noven_...@yahoo.com wrote: Hi, I just saw new features released at wicket 6.40. And I am interested to see example code of the atmosphere channel. Where can i find the example of this feature? Thanks.
Re: Wicket Atmosphere does not run in Firefox 17
It seems you hosting provider does not support websockets. For some reason, in Chrome the downgrade to 'streaming' works fine, but in Firefox it does not. Firefox keeps trying to establish a ws connection, which fails over and over again. I think this is a problem in Atmosphere. You could try asking this question at their google groups. I've created a ticket (WICKET-4946) for passing parameters to atmosphere, which would allow you to disable websocket. Best regards, Emond Papegaaij On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote: Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Example of wicket atmosphere with channel
Have you tried looking at the Wicket framework's examples? http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-wicket-atmosphere-with-channel-tp4654979p4655038.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere does not run in Firefox 17
Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Example of wicket atmosphere with channel
I opened the link but unfortunately I couldn't view the source. It appears as internal error. Thank you for the link, I will download the example and run in my local instead. Regards, Noven From: Arun Chauhan arundraj...@gmail.com To: users@wicket.apache.org Sent: Monday, December 24, 2012 5:06 PM Subject: Re: Example of wicket atmosphere with channel Have you tried looking at the Wicket framework's examples? http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-wicket-atmosphere-with-channel-tp4654979p4655038.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Atmosphere does not run in Firefox 17
Hi, Thank you for your reply before. I did not change anything in firefox. If I have to, I can't use this feature. I doubt if the problem caused from firefox. When the quickstart deployed in my localhost (both tomcat and jetty), it run well in firefox. From: Andreas Kuhtz andreas.ku...@gmail.com To: users@wicket.apache.org; Noven noven_...@yahoo.com Sent: Monday, December 24, 2012 5:21 PM Subject: Re: Wicket Atmosphere does not run in Firefox 17 Hi, Have you configured a proxy in firefox? if so, you may enable the ws://* to use the proxy, not only http and https. Hope this helps. Cheers 2012/12/24 Noven noven_...@yahoo.com Hi All, I just tried deploy the wicket-atmosphere-quickstart here at http://api.bola54.com into tomcat v.7.0.32 It's able run well on safari and chrome, but fail run on newest firefox v.17. By using the same tomcat version, I am able to run it on firefox v.17 in my localhost but failed at http://api.bola54.com. Did anybody know this issue before? Thank you.
Re: Wicket-Atmosphere complex JS
Good afternoon, I've created a Jira ticket with a quickstart. Here is the link: https://issues.apache.org/jira/browse/WICKET-4869 Thanks a lot in advance. Regards, Pierre -- Le bonheur n'est pas une destination, mais une façon de voyager. Papa d'une petite Lou-Ann depuis le 30 juin.
Re: Wicket-Atmosphere complex JS
Good evening, So, I've tried what you said. I forgot one JS file in my initial attempt but, even with this configuration I have now a different symptom. But it still doesn't work. For now, the problem is that I have an empty ajax-response! Here is my code for the filter: public class ResponseSizeFilter implements PerRequestBroadcastFilter { @Override public BroadcastAction filter(final AtmosphereResource r, final Object originalMessage, final Object message) { final AtmosphereRequest request = r.getRequest(); if (true.equalsIgnoreCase(request.getHeader(HeaderConfig.X_ATMOSPHERE_TRACKMESSAGESIZE))) { final String msg = message.toString(); return new BroadcastAction(BroadcastAction.ACTION.CONTINUE, msg.length() + \r\n.length() + |); } return new BroadcastAction(BroadcastAction.ACTION.CONTINUE, message); } @Override public BroadcastAction filter(final Object originalMessage, final Object message) { final String msg = message.toString(); return new BroadcastAction(BroadcastAction.ACTION.CONTINUE, message); } } I can see in my logs that it's called. But whether I call the server-side by: Wicket.Ajax.get({u: ${url}, e: click, c : blah}) or by: jQuery('blah').wicketAtmosphere({url : ${url} }); It fails to update my component because the response is: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response The strange thing being that in my Filter, the message really contains the right (non-empty) ajax-response! Here is the Ajax / WebSocket managing code (it's in an AbstractDefaultAjaxBehavior): @Override protected void respond(final AjaxRequestTarget target) { final CometChannel chan = new CometChannel(isTapped())); Application.get().getEventBus().post(chan); } @Subscribe public void rotate(final AjaxRequestTarget target, final CometChannel event) { if (event.isTapped()) { target.appendJavaScript(jQuery('#card + event.getUuid() + ').rotate(90);); } else { target.appendJavaScript(jQuery('#card + event.getUuid() + ').rotate(0);); } } I thought that maybe the empty ajax-response came from the respond() method not adding anything to the AjaxRequestTarget but in the examples from Wicket GitHub, it's done like that for the chat message. So I ran out of solutions. As a side-note, this not the same code as in the original message, but the symptom in this Comet channel is the same as here. The only difference being that in this other channel, the message to broadcast is quite long, hence the need for the BroadcastFilter. So, is the idea of filing a Jira issue still valid? Sorry for that long message. And thanks in advance for any help. Regards, Pierre Goupil -- Le bonheur n'est pas une destination, mais une façon de voyager. Papa d'une petite Lou-Ann depuis le 30 juin.