Re: Atmosphere

2016-02-27 Thread expresso
Ok
It's done
Sorry, I had a lot of work

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-tp4671736p4673743.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 Clustering

2015-12-14 Thread mashleyttu
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: Atmosphere

2015-08-03 Thread Martin Grigorov
Hi,

Please send us a patch/PullRequest.
On Aug 4, 2015 8:03 AM, "expresso"  wrote:

> Hi
>
> Is it possible to upgrade to last version ?
> I have quicky look. Broadcaster should use
> Broadcasterfactory etc..
>
> Gracias
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Atmosphere-tp4671736.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
>
>


Atmosphere

2015-08-03 Thread expresso
Hi

Is it possible to upgrade to last version ? 
I have quicky look. Broadcaster should use 
Broadcasterfactory etc..

Gracias 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-tp4671736.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: Atmosphere - Reconnect after Disconnect

2015-06-10 Thread mashleyttu
Always great help out of this group! Invisible iFrame did the trick.
window.open caused popup warnings. The easiest solution is usually the best.

Thanks again! Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-Reconnect-after-Disconnect-tp4671118p4671130.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: Atmosphere - Reconnect after Disconnect

2015-06-10 Thread Martin Grigorov
Hi,


On Wed, Jun 10, 2015 at 12:52 AM, mashleyttu  wrote:

> Hi All, I asked an Atmosphere question a few days ago and have another one.
>
> We are adding Atmosphere support to our application, and have added a
> ResourceRegistrationListener to the EventBus so we can track and push
> messages to users who request certain files. These files are generated on
> the fly, and we don't want the user to have to wait for them to be created.
>
> When the file has been created, we use the EventBus to push a success
> message to the client who requested the file. The issue is the message has
> a
> window.location.href = '/path/to/file.pdf' which is causing the page to
>

Have you tried with a custom iframe? I.e. create a temporary iframe and set
its src to '/path/to/file.pdf'.
Or with window.open(url)

These approaches will leave the current page loaded.


> disconnect and the resourceUnregistered event to fire. This is causing
> problems for future download request.
>
> After the push message, I'm trying to have the client reconnect to the
> server. I'm currently doing something like this:
>
> public void reconnect(AjaxRequestTarget target, WebPage page) throws
> JSONException{
> JSONObject options = bus.getParameters().toJSON();
> List lstAtmoBehaviors =
> page.getBehaviors(AtmosphereBehavior.class);
> if(CollectionUtils.isNotEmpty(lstAtmoBehaviors)){
> options.put("url",
> page.urlFor(lstAtmoBehaviors.get(0),
> IResourceListener.INTERFACE, new PageParameters()).toString());
> }
> //wait a quarter of a second for the download to fire
> before reconnecting
> target.appendJavaScript("setTimeout(function(){jQuery('#" +
> page.getMarkupId() +
> "').wicketAtmosphere("+options.toString()+");},250);");
> }
>
>
> This generates the same connection ajax call that the AtmosphereBehavior
> renderHead method method generates. I've verified it calls the EventBus
> resourceRegistered method. The uuid is unfortunately blank though.
>
> Manually hitting the browser refresh button re-registers the page with the
> uuid.
>
> Is there a fancy Wicket Atmosphere method to say "reconnect"? Or how do I
> get Wicket to generate a UUID? Or a setting that says "reconnect"
> automatically?
>
> THanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Atmosphere-Reconnect-after-Disconnect-tp4671118.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
>
>


Atmosphere - Reconnect after Disconnect

2015-06-09 Thread mashleyttu
Hi All, I asked an Atmosphere question a few days ago and have another one.

We are adding Atmosphere support to our application, and have added a
ResourceRegistrationListener to the EventBus so we can track and push
messages to users who request certain files. These files are generated on
the fly, and we don't want the user to have to wait for them to be created.

When the file has been created, we use the EventBus to push a success
message to the client who requested the file. The issue is the message has a
window.location.href = '/path/to/file.pdf' which is causing the page to
disconnect and the resourceUnregistered event to fire. This is causing
problems for future download request.

After the push message, I'm trying to have the client reconnect to the
server. I'm currently doing something like this:

public void reconnect(AjaxRequestTarget target, WebPage page) throws
JSONException{
JSONObject options = bus.getParameters().toJSON();
List lstAtmoBehaviors =
page.getBehaviors(AtmosphereBehavior.class);
if(CollectionUtils.isNotEmpty(lstAtmoBehaviors)){
options.put("url", page.urlFor(lstAtmoBehaviors.get(0),
IResourceListener.INTERFACE, new PageParameters()).toString());
}
//wait a quarter of a second for the download to fire before 
reconnecting
target.appendJavaScript("setTimeout(function(){jQuery('#" +
page.getMarkupId() + "').wicketAtmosphere("+options.toString()+");},250);");
}


This generates the same connection ajax call that the AtmosphereBehavior
renderHead method method generates. I've verified it calls the EventBus
resourceRegistered method. The uuid is unfortunately blank though.

Manually hitting the browser refresh button re-registers the page with the
uuid. 

Is there a fancy Wicket Atmosphere method to say "reconnect"? Or how do I
get Wicket to generate a UUID? Or a setting that says "reconnect"
automatically?

THanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-Reconnect-after-Disconnect-tp4671118.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

2015-06-03 Thread mashleyttu
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 jQuery noConflict

2015-06-03 Thread Martin Grigorov
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 
wrote:

> Hi,
>
> On Wed, Jun 3, 2015 at 4:32 PM, mashleyttu  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

2015-06-03 Thread Martin Grigorov
Hi,

On Wed, Jun 3, 2015 at 4:32 PM, mashleyttu  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

2015-06-03 Thread mashleyttu
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 broadcast to all except for orign page

2015-02-24 Thread Emond Papegaaij
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

2015-02-23 Thread fachhoch
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: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-12 Thread Martin Grigorov
On Fri, Dec 12, 2014 at 4:32 PM, Daniel Stoch 
wrote:

> On Fri, Dec 12, 2014 at 11:38 AM, Martin Grigorov 
> wrote:
> > I see it is a bit ugly, but oh well... this is how it works now.
> >
> > in YourComponent#renderHead():
> >
> > AtmosphereBehavior atmo =
> > getPage().getBehaviors(AtmosphereBehavior.class).get(0);
> > CharSequence callbackUrl = atmo.getCallbackUrl();
> > headerResponse.render(OnDomReadyHeaderItem.forScript("Wicket.Ajax.get({u:
> > "+callbackUrl+"})"));
>
> Thanks, it works.
> But I call whole atmo.renderHead(page, response); method.
>

Right! This is the right way!


>
> >
> > You may need to use some flag to make sure this happens once per page
> > instance. Otherwise every re-render of such component will initialize a
> new
> > web socket connection (or whatever fallback you may use)
> >
>
> Hmmm, do we really need this check if I call whole atmo.renderHead method?
>

I think so.
Without the flag I think there will be more than one Atmosphere connections
to the server.


>
> Thanks for your help.
>
> --
> Daniel
>
>
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, Dec 12, 2014 at 11:36 AM, Daniel Stoch 
> > wrote:
> >
> >> Hi,
> >>
> >> Ok, I think I didn't described a problem well.
> >>
> >> When you add a component which subscribes some events, then
> >> AtmosphereBehavior is added to page. But the wicketAtmosphere JS
> >> callback is registered inside AtmosphereBehavior.renderHead() method,
> >> so only (I think) when the whole page is rendered. When you add a
> >> component using ajax, then this code (renderHead) is not called, so
> >> events are not broadcasted to client: because page is not registered
> >> in EventBus and does not have atmosphere resource assigned.
> >>
> >> So maybe my original question should be: how to invode this JS
> >> callback from AtmosphereBehavior.renderHead in ajax requests?
> >>
> >> --
> >> Daniel
> >>
> >> On Wed, Dec 10, 2014 at 12:19 PM, Daniel Stoch 
> >> wrote:
> >> > Hi,
> >> >
> >> > It seems that I am using an older version of AtmosphereBehavior which
> >> > implements IResourceListener. Since 6.17.0 this implementation was
> >> > removed and the code is moved to onRequest() method.
> >> > So I must check a newer version, maybe my problem is solved.
> >> >
> >> > Thanks for a tip!
> >> >
> >> > --
> >> > Daniel
> >> >
> >> > On Wed, Dec 10, 2014 at 11:03 AM, Martin Grigorov <
> mgrigo...@apache.org>
> >> wrote:
> >> >> Hi,
> >> >>
> >> >> Please give more details.
> >> >>
> >>
> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
> >> >> doesn't implement IResourceListener, so it seems you do something
> >> custom.
> >> >>
> >> >> Just implementing IResourceListener doesn't mean anything to Wicket.
> >> >> You need to create a callback url with
> >> >>
> >>
> org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
> >> >> org.apache.wicket.request.mapper.parameter.PageParameters) and use it
> >> >> somehow to invoke
> >> org.apache.wicket.IResourceListener#onResourceRequested
> >> >>
> >> >>
> >> >> Martin Grigorov
> >> >> Wicket Training and Consulting
> >> >> https://twitter.com/mtgrigorov
> >> >>
> >> >> On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch <
> daniel.st...@gmail.com>
> >> >> wrote:
> >> >>
> >> >>> Is it possible to invoke this listener manually, or maybe this is a
> >> >>> generally a bad practise?
> >> >>>
> >> >>> --
> >> >>> Daniel
> >> >>>
> >> >>> > On 9 gru 2014, at 12:24, Daniel Stoch 
> >> wrote:
> >> >>> >
> >> >>> > Hi,
> >> >>> >
> >> >>> > I have a behavior which implements IResourceListener
> >> >>> > (AtmosphereBehavior). The problem is when this behavior is added
> to
> >> >>> > page during ajax request (eg. some panel is dynamically added to
> >> page)
> >> >>> > - then onResourceRequested is not invoked for page. So when using
> >> >>> > AtmosphereBehavior the suspended connection from the client is not
> >> >>> > registered.
> >> >>> >
> >> >>> > How should I solve this problem: how and when call this
> >> >>> > onResourceRequested method?
> >> >>> >
> >> >>> > --
> >> >>> > Best regards,
> >> >>> > Daniel
> >> >>>
> >> >>>
> -
> >> >>> 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
> >>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-12 Thread Daniel Stoch
On Fri, Dec 12, 2014 at 11:38 AM, Martin Grigorov  wrote:
> I see it is a bit ugly, but oh well... this is how it works now.
>
> in YourComponent#renderHead():
>
> AtmosphereBehavior atmo =
> getPage().getBehaviors(AtmosphereBehavior.class).get(0);
> CharSequence callbackUrl = atmo.getCallbackUrl();
> headerResponse.render(OnDomReadyHeaderItem.forScript("Wicket.Ajax.get({u:
> "+callbackUrl+"})"));

Thanks, it works.
But I call whole atmo.renderHead(page, response); method.

>
> You may need to use some flag to make sure this happens once per page
> instance. Otherwise every re-render of such component will initialize a new
> web socket connection (or whatever fallback you may use)
>

Hmmm, do we really need this check if I call whole atmo.renderHead method?

Thanks for your help.

--
Daniel


> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Dec 12, 2014 at 11:36 AM, Daniel Stoch 
> wrote:
>
>> Hi,
>>
>> Ok, I think I didn't described a problem well.
>>
>> When you add a component which subscribes some events, then
>> AtmosphereBehavior is added to page. But the wicketAtmosphere JS
>> callback is registered inside AtmosphereBehavior.renderHead() method,
>> so only (I think) when the whole page is rendered. When you add a
>> component using ajax, then this code (renderHead) is not called, so
>> events are not broadcasted to client: because page is not registered
>> in EventBus and does not have atmosphere resource assigned.
>>
>> So maybe my original question should be: how to invode this JS
>> callback from AtmosphereBehavior.renderHead in ajax requests?
>>
>> --
>> Daniel
>>
>> On Wed, Dec 10, 2014 at 12:19 PM, Daniel Stoch 
>> wrote:
>> > Hi,
>> >
>> > It seems that I am using an older version of AtmosphereBehavior which
>> > implements IResourceListener. Since 6.17.0 this implementation was
>> > removed and the code is moved to onRequest() method.
>> > So I must check a newer version, maybe my problem is solved.
>> >
>> > Thanks for a tip!
>> >
>> > --
>> > Daniel
>> >
>> > On Wed, Dec 10, 2014 at 11:03 AM, Martin Grigorov 
>> wrote:
>> >> Hi,
>> >>
>> >> Please give more details.
>> >>
>> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
>> >> doesn't implement IResourceListener, so it seems you do something
>> custom.
>> >>
>> >> Just implementing IResourceListener doesn't mean anything to Wicket.
>> >> You need to create a callback url with
>> >>
>> org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
>> >> org.apache.wicket.request.mapper.parameter.PageParameters) and use it
>> >> somehow to invoke
>> org.apache.wicket.IResourceListener#onResourceRequested
>> >>
>> >>
>> >> Martin Grigorov
>> >> Wicket Training and Consulting
>> >> https://twitter.com/mtgrigorov
>> >>
>> >> On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch 
>> >> wrote:
>> >>
>> >>> Is it possible to invoke this listener manually, or maybe this is a
>> >>> generally a bad practise?
>> >>>
>> >>> --
>> >>> Daniel
>> >>>
>> >>> > On 9 gru 2014, at 12:24, Daniel Stoch 
>> wrote:
>> >>> >
>> >>> > Hi,
>> >>> >
>> >>> > I have a behavior which implements IResourceListener
>> >>> > (AtmosphereBehavior). The problem is when this behavior is added to
>> >>> > page during ajax request (eg. some panel is dynamically added to
>> page)
>> >>> > - then onResourceRequested is not invoked for page. So when using
>> >>> > AtmosphereBehavior the suspended connection from the client is not
>> >>> > registered.
>> >>> >
>> >>> > How should I solve this problem: how and when call this
>> >>> > onResourceRequested method?
>> >>> >
>> >>> > --
>> >>> > Best regards,
>> >>> > Daniel
>> >>>
>> >>> -
>> >>> 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
>>
>>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-12 Thread Martin Grigorov
I see it is a bit ugly, but oh well... this is how it works now.

in YourComponent#renderHead():

AtmosphereBehavior atmo =
getPage().getBehaviors(AtmosphereBehavior.class).get(0);
CharSequence callbackUrl = atmo.getCallbackUrl();
headerResponse.render(OnDomReadyHeaderItem.forScript("Wicket.Ajax.get({u:
"+callbackUrl+"})"));

You may need to use some flag to make sure this happens once per page
instance. Otherwise every re-render of such component will initialize a new
web socket connection (or whatever fallback you may use)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Dec 12, 2014 at 11:36 AM, Daniel Stoch 
wrote:

> Hi,
>
> Ok, I think I didn't described a problem well.
>
> When you add a component which subscribes some events, then
> AtmosphereBehavior is added to page. But the wicketAtmosphere JS
> callback is registered inside AtmosphereBehavior.renderHead() method,
> so only (I think) when the whole page is rendered. When you add a
> component using ajax, then this code (renderHead) is not called, so
> events are not broadcasted to client: because page is not registered
> in EventBus and does not have atmosphere resource assigned.
>
> So maybe my original question should be: how to invode this JS
> callback from AtmosphereBehavior.renderHead in ajax requests?
>
> --
> Daniel
>
> On Wed, Dec 10, 2014 at 12:19 PM, Daniel Stoch 
> wrote:
> > Hi,
> >
> > It seems that I am using an older version of AtmosphereBehavior which
> > implements IResourceListener. Since 6.17.0 this implementation was
> > removed and the code is moved to onRequest() method.
> > So I must check a newer version, maybe my problem is solved.
> >
> > Thanks for a tip!
> >
> > --
> > Daniel
> >
> > On Wed, Dec 10, 2014 at 11:03 AM, Martin Grigorov 
> wrote:
> >> Hi,
> >>
> >> Please give more details.
> >>
> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
> >> doesn't implement IResourceListener, so it seems you do something
> custom.
> >>
> >> Just implementing IResourceListener doesn't mean anything to Wicket.
> >> You need to create a callback url with
> >>
> org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
> >> org.apache.wicket.request.mapper.parameter.PageParameters) and use it
> >> somehow to invoke
> org.apache.wicket.IResourceListener#onResourceRequested
> >>
> >>
> >> Martin Grigorov
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch 
> >> wrote:
> >>
> >>> Is it possible to invoke this listener manually, or maybe this is a
> >>> generally a bad practise?
> >>>
> >>> --
> >>> Daniel
> >>>
> >>> > On 9 gru 2014, at 12:24, Daniel Stoch 
> wrote:
> >>> >
> >>> > Hi,
> >>> >
> >>> > I have a behavior which implements IResourceListener
> >>> > (AtmosphereBehavior). The problem is when this behavior is added to
> >>> > page during ajax request (eg. some panel is dynamically added to
> page)
> >>> > - then onResourceRequested is not invoked for page. So when using
> >>> > AtmosphereBehavior the suspended connection from the client is not
> >>> > registered.
> >>> >
> >>> > How should I solve this problem: how and when call this
> >>> > onResourceRequested method?
> >>> >
> >>> > --
> >>> > Best regards,
> >>> > Daniel
> >>>
> >>> -
> >>> 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: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-12 Thread Daniel Stoch
Hi,

Ok, I think I didn't described a problem well.

When you add a component which subscribes some events, then
AtmosphereBehavior is added to page. But the wicketAtmosphere JS
callback is registered inside AtmosphereBehavior.renderHead() method,
so only (I think) when the whole page is rendered. When you add a
component using ajax, then this code (renderHead) is not called, so
events are not broadcasted to client: because page is not registered
in EventBus and does not have atmosphere resource assigned.

So maybe my original question should be: how to invode this JS
callback from AtmosphereBehavior.renderHead in ajax requests?

--
Daniel

On Wed, Dec 10, 2014 at 12:19 PM, Daniel Stoch  wrote:
> Hi,
>
> It seems that I am using an older version of AtmosphereBehavior which
> implements IResourceListener. Since 6.17.0 this implementation was
> removed and the code is moved to onRequest() method.
> So I must check a newer version, maybe my problem is solved.
>
> Thanks for a tip!
>
> --
> Daniel
>
> On Wed, Dec 10, 2014 at 11:03 AM, Martin Grigorov  
> wrote:
>> Hi,
>>
>> Please give more details.
>> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
>> doesn't implement IResourceListener, so it seems you do something custom.
>>
>> Just implementing IResourceListener doesn't mean anything to Wicket.
>> You need to create a callback url with
>> org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
>> org.apache.wicket.request.mapper.parameter.PageParameters) and use it
>> somehow to invoke org.apache.wicket.IResourceListener#onResourceRequested
>>
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch 
>> wrote:
>>
>>> Is it possible to invoke this listener manually, or maybe this is a
>>> generally a bad practise?
>>>
>>> --
>>> Daniel
>>>
>>> > On 9 gru 2014, at 12:24, Daniel Stoch  wrote:
>>> >
>>> > Hi,
>>> >
>>> > I have a behavior which implements IResourceListener
>>> > (AtmosphereBehavior). The problem is when this behavior is added to
>>> > page during ajax request (eg. some panel is dynamically added to page)
>>> > - then onResourceRequested is not invoked for page. So when using
>>> > AtmosphereBehavior the suspended connection from the client is not
>>> > registered.
>>> >
>>> > How should I solve this problem: how and when call this
>>> > onResourceRequested method?
>>> >
>>> > --
>>> > Best regards,
>>> > Daniel
>>>
>>> -
>>> 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: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-10 Thread Daniel Stoch
Hi,

It seems that I am using an older version of AtmosphereBehavior which
implements IResourceListener. Since 6.17.0 this implementation was
removed and the code is moved to onRequest() method.
So I must check a newer version, maybe my problem is solved.

Thanks for a tip!

--
Daniel

On Wed, Dec 10, 2014 at 11:03 AM, Martin Grigorov  wrote:
> Hi,
>
> Please give more details.
> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
> doesn't implement IResourceListener, so it seems you do something custom.
>
> Just implementing IResourceListener doesn't mean anything to Wicket.
> You need to create a callback url with
> org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
> org.apache.wicket.request.mapper.parameter.PageParameters) and use it
> somehow to invoke org.apache.wicket.IResourceListener#onResourceRequested
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch 
> wrote:
>
>> Is it possible to invoke this listener manually, or maybe this is a
>> generally a bad practise?
>>
>> --
>> Daniel
>>
>> > On 9 gru 2014, at 12:24, Daniel Stoch  wrote:
>> >
>> > Hi,
>> >
>> > I have a behavior which implements IResourceListener
>> > (AtmosphereBehavior). The problem is when this behavior is added to
>> > page during ajax request (eg. some panel is dynamically added to page)
>> > - then onResourceRequested is not invoked for page. So when using
>> > AtmosphereBehavior the suspended connection from the client is not
>> > registered.
>> >
>> > How should I solve this problem: how and when call this
>> > onResourceRequested method?
>> >
>> > --
>> > Best regards,
>> > Daniel
>>
>> -
>> 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: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-10 Thread Martin Grigorov
Hi,

Please give more details.
https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java#L51
doesn't implement IResourceListener, so it seems you do something custom.

Just implementing IResourceListener doesn't mean anything to Wicket.
You need to create a callback url with
org.apache.wicket.Component#urlFor(org.apache.wicket.RequestListenerInterface,
org.apache.wicket.request.mapper.parameter.PageParameters) and use it
somehow to invoke org.apache.wicket.IResourceListener#onResourceRequested


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Dec 10, 2014 at 11:45 AM, Daniel Stoch 
wrote:

> Is it possible to invoke this listener manually, or maybe this is a
> generally a bad practise?
>
> --
> Daniel
>
> > On 9 gru 2014, at 12:24, Daniel Stoch  wrote:
> >
> > Hi,
> >
> > I have a behavior which implements IResourceListener
> > (AtmosphereBehavior). The problem is when this behavior is added to
> > page during ajax request (eg. some panel is dynamically added to page)
> > - then onResourceRequested is not invoked for page. So when using
> > AtmosphereBehavior the suspended connection from the client is not
> > registered.
> >
> > How should I solve this problem: how and when call this
> > onResourceRequested method?
> >
> > --
> > Best regards,
> > Daniel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-10 Thread Daniel Stoch
Is it possible to invoke this listener manually, or maybe this is a generally a 
bad practise?

--
Daniel

> On 9 gru 2014, at 12:24, Daniel Stoch  wrote:
> 
> Hi,
> 
> I have a behavior which implements IResourceListener
> (AtmosphereBehavior). The problem is when this behavior is added to
> page during ajax request (eg. some panel is dynamically added to page)
> - then onResourceRequested is not invoked for page. So when using
> AtmosphereBehavior the suspended connection from the client is not
> registered.
> 
> How should I solve this problem: how and when call this
> onResourceRequested method?
> 
> --
> Best regards,
> Daniel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to call onResourceRequested for page behavior in ajax update (Atmosphere related)

2014-12-09 Thread Daniel Stoch
Hi,

I have a behavior which implements IResourceListener
(AtmosphereBehavior). The problem is when this behavior is added to
page during ajax request (eg. some panel is dynamically added to page)
- then onResourceRequested is not invoked for page. So when using
AtmosphereBehavior the suspended connection from the client is not
registered.

How should I solve this problem: how and when call this
onResourceRequested method?

--
Best regards,
Daniel

-
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

2014-09-05 Thread fachhoch
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

2014-09-04 Thread Martin Grigorov
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"  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:  encoding="UTF-8"?> > >
> 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

2014-09-04 Thread fachhoch
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: 
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

2014-09-04 Thread fachhoch
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

2014-09-04 Thread fachhoch
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

2014-09-04 Thread fachhoch
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

2014-09-04 Thread Martin Grigorov
/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  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

2014-09-04 Thread fachhoch
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

2014-09-03 Thread Martin Grigorov
Hi,


On Wed, Sep 3, 2014 at 10:24 PM, fachhoch  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
>
>


wicket atmosphere not updating the page

2014-09-03 Thread fachhoch
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

2014-08-14 Thread Martin Grigorov
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


Re: Wicket-Atmosphere: how to post to only one client ?

2014-07-28 Thread Pierre Goupil
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.


Re: Wicket-Atmosphere: how to post to only one client ?

2014-07-28 Thread guillaume.mary
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 ?

2014-07-28 Thread Pierre Goupil
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.


Wicket-Atmosphere: how to post to only one client ?

2014-07-28 Thread guillaume.mary
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



wicket-atmosphere

2014-07-24 Thread Pierre Goupil
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 Collection 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  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

2014-05-19 Thread Olivier Dutrieux
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

2014-05-18 Thread Emond Papegaaij
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]
> > 
> > > For additional commands, e-mail: [hidden email]
> > 
> >
> >
> >
> > 
> > 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_code&node=4665687&code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg=
> >.
> > NAML
> > <
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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

2014-05-18 Thread Martin Grigorov
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]
> > 
> > > For additional commands, e-mail: [hidden email]
> > 
> >
> >
> >
> > 
> > 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_code&node=4665687&code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg=
> >.
> > NAML
> > <
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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

2014-05-17 Thread Olivier Dutrieux
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] 
> 
> > For additional commands, e-mail: [hidden email] 
> 
>
>
>
> ----
> 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_code&node=4665687&code=b2xpdmllci5kdXRyaWV1eEBwYXN0ZXVyLmZyfDQ2NjU2ODd8LTExODI0MjM1MTg=>.
> NAML 
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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

2014-05-16 Thread Emond Papegaaij
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

2014-05-15 Thread Emond Papegaaij
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



Re: Wicket atmosphere

2014-05-15 Thread Olivier Dutrieux

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



Wicket atmosphere

2014-05-05 Thread Olivier Dutrieux
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



Atmosphere - multiple browser tabs and page versioning

2014-04-29 Thread Daniel Stoch
Hi,

I have modified wicket-atmosphere example with sending messages, to display
a browser (DataView) with all received messages. So when user sends a
message (String) it will be added to list of messages stored in a page and
the browser is refreshed. There is a strange behavior when we open two
browser tabs (FF 28, Wicket 6.15.0, Wicket-Atmosphere 0.18).

1. Start example app and opens home page in two tabs:
   tab0 = http://localhost:8080/app/?0
   tab1 = http://localhost:8080/app/?1
2. Enter "1" in input field on tab0, click "Send message". Both tabs
receive "1" message and it will be displayed in a browser.
3. Send "2" in tab0:
- on tab1 browser displays 2 rows: 2, 1
- on tab0 browser displays only 1 row: 2
4. Test sending another messages on tab0 or tab1 - you will see that not
all messages are received.

It looks like a problem with page versioning or something similar. The list
of messages (messages field in a page) is not properly restored in
following requests. Here is a simple log from example app using above
scenario:

- sending 1
BEFORE: 1, messages=[]
AFTER: 1, messages=[1]
BEFORE: 1, messages=[]
AFTER: 1, messages=[1]
- sending 2
BEFORE: 2, messages=[1]
AFTER: 2, messages=[2, 1]
BEFORE: 2, messages=[]
AFTER: 2, messages=[2]

As you can see a list of messages on one tab becomes empty on the second
send. You can try to send messages from tab0 or tab1 and you should see
that strange behavior (messages list is not updated properly).

Is it a bug or maybe it is something wrong in my example? Maybe I should
turn on (somehow) multiple tabs support, there is such setting in Wicket
1.4 but in Wicket 6 I belive there is not necessary to configure such
support in any special way?

BTW: Why in the original example page versioning is disabled:
setVersioned(false); ?


Example project:
https://dl.dropboxusercontent.com/u/138504/wicket-atmosphere-tabs-example.zip

--
Best regards,
Daniel


wicket-atmosphere

2013-11-20 Thread Pierre Goupil
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


Re: Wicket-Atmosphere IE8 Issue

2013-10-10 Thread Martin Grigorov
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  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
>
>


Wicket-Atmosphere IE8 Issue

2013-10-10 Thread wsuetholz
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: WicketTester with Atmosphere

2013-10-08 Thread Vit Rozkovec
Ok, so I'll have to either introduce conditions in the code to check if 
I am running the application in test mode

or use something else like a selenium perhaps..
Thanks anyway.

On 8.10.2013 14:08, Martin Grigorov wrote:

WebSocketTester is for Native WebSockets, not for Wicket-Atmosphere
integration.



v.


On 8.10.2013 12:09, Martin Grigorov wrote:


Yes, because WicketTester doesn't use web.xml/atmosphere.xml.
The bootstrap of Atmosphere should be done manually. But I'm not sure that
even this will be enough. WicketTester doesn't do real http calls, so
Atmosphere won't be able to process them.

You can see WebSocketTester in Native WebSocket module. It works like
WicketTester.


On Tue, Oct 8, 2013 at 1:02 PM, francois meillet <
francois.meil...@gmail.com


wrote:
The WicketRuntimeException says that there is no Atmosphere
BroadcasterFactory configured


On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov 
wrote:
On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
francois.meil...@gmail.com> wrote:

  Did you include the atmosphere.xml configuration file and configured
the
AtmosphereServlet ?

  He asks about WicketTester+Atmosphere.


  François


On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
wrote:

  Any hints, please?

Vit


On 6.10.2013 17:43, Vit Rozkovec wrote:

  How is it possible to unit test Wicket application that uses
Atmosphere?

When I run the application everything is ok, when testing, see

excerpt

of

the stacktrace -

org.apache.wicket.WicketRuntimeException: There is no Atmosphere
BroadcasterFactory configured. Did you include the atmosphere.xml
configuration file and configured AtmosphereServlet?
  at org.apache.wicket.atmosphere.EventBus.**
lookupDefaultBroadcaster(EventBus.java:131)
  at


org.apache.wicket.atmosphere.EventBus.(EventBus.**java:**

  123)

  at name.berries.projects.doprava42.DopravaApplication.
init(DopravaApplication.java:144)
.


I'm creating the EventBus in the init() method as is done in the


examples:
  eventBus = new EventBus(this);

  eventBus.getParameters().setTransport(

AtmosphereTransport.STREAMING)***


  *;

eventBus.getParameters().setLogLevel(
AtmosphereLogLevel.DEBUG);


How can I use WicketTester along with properly setted up Atmosphere
application (using AtmosphereServlet)?


Thank you.
Vit


  --**

--**-


  To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.org<http://apache.org>

<


users-unsubscribe@wicket.**apache.org

For additional commands, e-mail: users-h...@wicket.apache.org





  --**

--**-


To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.org<http://apache.org>

<


users-unsubscribe@wicket.**apache.org

For additional commands, e-mail: users-h...@wicket.apache.org




--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@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: WicketTester with Atmosphere

2013-10-08 Thread Martin Grigorov
On Tue, Oct 8, 2013 at 2:44 PM, Vit Rozkovec  wrote:

>
> Thank you, I'll check it out.
>

WebSocketTester is for Native WebSockets, not for Wicket-Atmosphere
integration.


> v.
>
>
> On 8.10.2013 12:09, Martin Grigorov wrote:
>
>> Yes, because WicketTester doesn't use web.xml/atmosphere.xml.
>> The bootstrap of Atmosphere should be done manually. But I'm not sure that
>> even this will be enough. WicketTester doesn't do real http calls, so
>> Atmosphere won't be able to process them.
>>
>> You can see WebSocketTester in Native WebSocket module. It works like
>> WicketTester.
>>
>>
>> On Tue, Oct 8, 2013 at 1:02 PM, francois meillet <
>> francois.meil...@gmail.com
>>
>>> wrote:
>>> The WicketRuntimeException says that there is no Atmosphere
>>> BroadcasterFactory configured
>>>
>>>
>>> On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov >>
>>>> wrote:
>>>> On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
>>>> francois.meil...@gmail.com> wrote:
>>>>
>>>>  Did you include the atmosphere.xml configuration file and configured
>>>>>
>>>> the
>>>
>>>> AtmosphereServlet ?
>>>>>
>>>>>  He asks about WicketTester+Atmosphere.
>>>>
>>>>
>>>>  François
>>>>>
>>>>>
>>>>> On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
>>>>> wrote:
>>>>>
>>>>>  Any hints, please?
>>>>>>
>>>>>> Vit
>>>>>>
>>>>>>
>>>>>> On 6.10.2013 17:43, Vit Rozkovec wrote:
>>>>>>
>>>>>>  How is it possible to unit test Wicket application that uses
>>>>>>>
>>>>>> Atmosphere?
>>>>
>>>>> When I run the application everything is ok, when testing, see
>>>>>>>
>>>>>> excerpt
>>>
>>>> of
>>>>>
>>>>>> the stacktrace -
>>>>>>>
>>>>>>> org.apache.wicket.WicketRuntimeException: There is no Atmosphere
>>>>>>> BroadcasterFactory configured. Did you include the atmosphere.xml
>>>>>>> configuration file and configured AtmosphereServlet?
>>>>>>>  at org.apache.wicket.atmosphere.EventBus.**
>>>>>>> lookupDefaultBroadcaster(EventBus.java:131)
>>>>>>>  at
>>>>>>>
>>>>>> org.apache.wicket.atmosphere.EventBus.(EventBus.**java:**
>>>
>>>>  123)
>>>>>>>  at name.berries.projects.doprava42.DopravaApplication.
>>>>>>> init(DopravaApplication.java:144)
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>> I'm creating the EventBus in the init() method as is done in the
>>>>>>>
>>>>>> examples:
>>>>>
>>>>>>  eventBus = new EventBus(this);
>>>>>>>
>>>>>>>  eventBus.getParameters().setTransport(
>>> AtmosphereTransport.STREAMING)***
>>>
>>>>  *;
>>>>>>> eventBus.getParameters().setLogLevel(
>>>>>>> AtmosphereLogLevel.DEBUG);
>>>>>>>
>>>>>>>
>>>>>>> How can I use WicketTester along with properly setted up Atmosphere
>>>>>>> application (using AtmosphereServlet)?
>>>>>>>
>>>>>>>
>>>>>>> Thank you.
>>>>>>> Vit
>>>>>>>
>>>>>>>
>>>>>>>  --**
>>> --**-
>>>
>>>>  To unsubscribe, e-mail: 
>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>>>> <
>>>>>>>
>>>>>> users-unsubscribe@wicket.**apache.org
>>>>> >
>>>>>
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>  --**
>>>> --**-
>>>>
>>>>> To unsubscribe, e-mail: 
>>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>>> <
>>>>>>
>>>>> users-unsubscribe@wicket.**apache.org
>>>>> >
>>>>>
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: WicketTester with Atmosphere

2013-10-08 Thread Vit Rozkovec


Thank you, I'll check it out.
v.

On 8.10.2013 12:09, Martin Grigorov wrote:

Yes, because WicketTester doesn't use web.xml/atmosphere.xml.
The bootstrap of Atmosphere should be done manually. But I'm not sure that
even this will be enough. WicketTester doesn't do real http calls, so
Atmosphere won't be able to process them.

You can see WebSocketTester in Native WebSocket module. It works like
WicketTester.


On Tue, Oct 8, 2013 at 1:02 PM, francois meillet 
wrote:
The WicketRuntimeException says that there is no Atmosphere
BroadcasterFactory configured


On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov 
wrote:
On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
francois.meil...@gmail.com> wrote:


Did you include the atmosphere.xml configuration file and configured

the

AtmosphereServlet ?


He asks about WicketTester+Atmosphere.



François


On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
wrote:


Any hints, please?

Vit


On 6.10.2013 17:43, Vit Rozkovec wrote:


How is it possible to unit test Wicket application that uses

Atmosphere?

When I run the application everything is ok, when testing, see

excerpt

of

the stacktrace -

org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
BroadcasterFactory configured. Did you include the atmosphere.xml
configuration file and configured AtmosphereServlet?
 at org.apache.wicket.atmosphere.**EventBus.**
lookupDefaultBroadcaster(**EventBus.java:131)
 at

org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**

123)
 at name.berries.projects.**doprava42.DopravaApplication.**
init(DopravaApplication.java:**144)
.


I'm creating the EventBus in the init() method as is done in the

examples:

 eventBus = new EventBus(this);


eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*

*;
eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);


How can I use WicketTester along with properly setted up Atmosphere
application (using AtmosphereServlet)?


Thank you.
Vit



--**--**-

To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

users-unsubscr...@wicket.apache.org>

For additional commands, e-mail: users-h...@wicket.apache.org






--**--**-

To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

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: WicketTester with Atmosphere

2013-10-08 Thread Vit Rozkovec

In normal production mode everything is ok,
but the problem is when unittesting atmospherised wicket application 
with WicketTester as application trips on init() method when 
inicializing EventBus.
And I did not wanted to check in the code whether I am in test mode to 
disable atmosphere calls.





On 8.10.2013 12:02, francois meillet wrote:

The WicketRuntimeException says that there is no Atmosphere
BroadcasterFactory configured


On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov wrote:


On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
francois.meil...@gmail.com> wrote:


Did you include the atmosphere.xml configuration file and configured the
AtmosphereServlet ?


He asks about WicketTester+Atmosphere.



François


On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
wrote:


Any hints, please?

Vit


On 6.10.2013 17:43, Vit Rozkovec wrote:


How is it possible to unit test Wicket application that uses

Atmosphere?

When I run the application everything is ok, when testing, see excerpt

of

the stacktrace -

org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
BroadcasterFactory configured. Did you include the atmosphere.xml
configuration file and configured AtmosphereServlet?
 at org.apache.wicket.atmosphere.**EventBus.**
lookupDefaultBroadcaster(**EventBus.java:131)
 at org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**
123)
 at name.berries.projects.**doprava42.DopravaApplication.**
init(DopravaApplication.java:**144)
.


I'm creating the EventBus in the init() method as is done in the

examples:

 eventBus = new EventBus(this);


eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*

*;
eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);


How can I use WicketTester along with properly setted up Atmosphere
application (using AtmosphereServlet)?


Thank you.
Vit



--**--**-

To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

users-unsubscr...@wicket.apache.org>

For additional commands, e-mail: users-h...@wicket.apache.org






--**--**-

To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

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: WicketTester with Atmosphere

2013-10-08 Thread Martin Grigorov
Yes, because WicketTester doesn't use web.xml/atmosphere.xml.
The bootstrap of Atmosphere should be done manually. But I'm not sure that
even this will be enough. WicketTester doesn't do real http calls, so
Atmosphere won't be able to process them.

You can see WebSocketTester in Native WebSocket module. It works like
WicketTester.


On Tue, Oct 8, 2013 at 1:02 PM, francois meillet  wrote:

> The WicketRuntimeException says that there is no Atmosphere
> BroadcasterFactory configured
>
>
> On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov  >wrote:
>
> > On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
> > francois.meil...@gmail.com> wrote:
> >
> > > Did you include the atmosphere.xml configuration file and configured
> the
> > > AtmosphereServlet ?
> > >
> >
> > He asks about WicketTester+Atmosphere.
> >
> >
> > >
> > > François
> > >
> > >
> > > On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
> > > wrote:
> > >
> > > > Any hints, please?
> > > >
> > > > Vit
> > > >
> > > >
> > > > On 6.10.2013 17:43, Vit Rozkovec wrote:
> > > >
> > > >> How is it possible to unit test Wicket application that uses
> > Atmosphere?
> > > >>
> > > >> When I run the application everything is ok, when testing, see
> excerpt
> > > of
> > > >> the stacktrace -
> > > >>
> > > >> org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
> > > >> BroadcasterFactory configured. Did you include the atmosphere.xml
> > > >> configuration file and configured AtmosphereServlet?
> > > >> at org.apache.wicket.atmosphere.**EventBus.**
> > > >> lookupDefaultBroadcaster(**EventBus.java:131)
> > > >> at
> org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**
> > > >> 123)
> > > >> at name.berries.projects.**doprava42.DopravaApplication.**
> > > >> init(DopravaApplication.java:**144)
> > > >> .
> > > >>
> > > >>
> > > >> I'm creating the EventBus in the init() method as is done in the
> > > examples:
> > > >> eventBus = new EventBus(this);
> > > >>
> > >
> eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*
> > > >> *;
> > > >> eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);
> > > >>
> > > >>
> > > >> How can I use WicketTester along with properly setted up Atmosphere
> > > >> application (using AtmosphereServlet)?
> > > >>
> > > >>
> > > >> Thank you.
> > > >> Vit
> > > >>
> > > >>
> > >
> --**--**-
> > > >> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> > > users-unsubscr...@wicket.apache.org>
> > > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > --**--**-
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> > > users-unsubscr...@wicket.apache.org>
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> >
>


Re: WicketTester with Atmosphere

2013-10-08 Thread francois meillet
The WicketRuntimeException says that there is no Atmosphere
BroadcasterFactory configured


On Tue, Oct 8, 2013 at 11:58 AM, Martin Grigorov wrote:

> On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
> francois.meil...@gmail.com> wrote:
>
> > Did you include the atmosphere.xml configuration file and configured the
> > AtmosphereServlet ?
> >
>
> He asks about WicketTester+Atmosphere.
>
>
> >
> > François
> >
> >
> > On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
> > wrote:
> >
> > > Any hints, please?
> > >
> > > Vit
> > >
> > >
> > > On 6.10.2013 17:43, Vit Rozkovec wrote:
> > >
> > >> How is it possible to unit test Wicket application that uses
> Atmosphere?
> > >>
> > >> When I run the application everything is ok, when testing, see excerpt
> > of
> > >> the stacktrace -
> > >>
> > >> org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
> > >> BroadcasterFactory configured. Did you include the atmosphere.xml
> > >> configuration file and configured AtmosphereServlet?
> > >> at org.apache.wicket.atmosphere.**EventBus.**
> > >> lookupDefaultBroadcaster(**EventBus.java:131)
> > >> at org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**
> > >> 123)
> > >> at name.berries.projects.**doprava42.DopravaApplication.**
> > >> init(DopravaApplication.java:**144)
> > >> .
> > >>
> > >>
> > >> I'm creating the EventBus in the init() method as is done in the
> > examples:
> > >> eventBus = new EventBus(this);
> > >>
> > eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*
> > >> *;
> > >> eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);
> > >>
> > >>
> > >> How can I use WicketTester along with properly setted up Atmosphere
> > >> application (using AtmosphereServlet)?
> > >>
> > >>
> > >> Thank you.
> > >> Vit
> > >>
> > >>
> > --**--**-
> > >> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> > users-unsubscr...@wicket.apache.org>
> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> --**--**-
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> > users-unsubscr...@wicket.apache.org>
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>


Re: WicketTester with Atmosphere

2013-10-08 Thread Martin Grigorov
On Tue, Oct 8, 2013 at 12:55 PM, francois meillet <
francois.meil...@gmail.com> wrote:

> Did you include the atmosphere.xml configuration file and configured the
> AtmosphereServlet ?
>

He asks about WicketTester+Atmosphere.


>
> François
>
>
> On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec 
> wrote:
>
> > Any hints, please?
> >
> > Vit
> >
> >
> > On 6.10.2013 17:43, Vit Rozkovec wrote:
> >
> >> How is it possible to unit test Wicket application that uses Atmosphere?
> >>
> >> When I run the application everything is ok, when testing, see excerpt
> of
> >> the stacktrace -
> >>
> >> org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
> >> BroadcasterFactory configured. Did you include the atmosphere.xml
> >> configuration file and configured AtmosphereServlet?
> >> at org.apache.wicket.atmosphere.**EventBus.**
> >> lookupDefaultBroadcaster(**EventBus.java:131)
> >> at org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**
> >> 123)
> >> at name.berries.projects.**doprava42.DopravaApplication.**
> >> init(DopravaApplication.java:**144)
> >> .
> >>
> >>
> >> I'm creating the EventBus in the init() method as is done in the
> examples:
> >> eventBus = new EventBus(this);
> >>
> eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*
> >> *;
> >> eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);
> >>
> >>
> >> How can I use WicketTester along with properly setted up Atmosphere
> >> application (using AtmosphereServlet)?
> >>
> >>
> >> Thank you.
> >> Vit
> >>
> >>
> --**--**-
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> users-unsubscr...@wicket.apache.org>
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >>
> >
> > --**--**-
> > To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> users-unsubscr...@wicket.apache.org>
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: WicketTester with Atmosphere

2013-10-08 Thread francois meillet
Did you include the atmosphere.xml configuration file and configured the
AtmosphereServlet ?

François


On Tue, Oct 8, 2013 at 11:26 AM, Vit Rozkovec  wrote:

> Any hints, please?
>
> Vit
>
>
> On 6.10.2013 17:43, Vit Rozkovec wrote:
>
>> How is it possible to unit test Wicket application that uses Atmosphere?
>>
>> When I run the application everything is ok, when testing, see excerpt of
>> the stacktrace -
>>
>> org.apache.wicket.**WicketRuntimeException: There is no Atmosphere
>> BroadcasterFactory configured. Did you include the atmosphere.xml
>> configuration file and configured AtmosphereServlet?
>> at org.apache.wicket.atmosphere.**EventBus.**
>> lookupDefaultBroadcaster(**EventBus.java:131)
>> at org.apache.wicket.atmosphere.**EventBus.(EventBus.java:**
>> 123)
>> at name.berries.projects.**doprava42.DopravaApplication.**
>> init(DopravaApplication.java:**144)
>> .
>>
>>
>> I'm creating the EventBus in the init() method as is done in the examples:
>> eventBus = new EventBus(this);
>> eventBus.getParameters().**setTransport(**AtmosphereTransport.STREAMING)*
>> *;
>> eventBus.getParameters().**setLogLevel(**AtmosphereLogLevel.DEBUG);
>>
>>
>> How can I use WicketTester along with properly setted up Atmosphere
>> application (using AtmosphereServlet)?
>>
>>
>> Thank you.
>> Vit
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: WicketTester with Atmosphere

2013-10-08 Thread Vit Rozkovec

Any hints, please?

Vit

On 6.10.2013 17:43, Vit Rozkovec wrote:

How is it possible to unit test Wicket application that uses Atmosphere?

When I run the application everything is ok, when testing, see excerpt 
of the stacktrace -


org.apache.wicket.WicketRuntimeException: There is no Atmosphere 
BroadcasterFactory configured. Did you include the atmosphere.xml 
configuration file and configured AtmosphereServlet?
at 
org.apache.wicket.atmosphere.EventBus.lookupDefaultBroadcaster(EventBus.java:131)

at org.apache.wicket.atmosphere.EventBus.(EventBus.java:123)
at 
name.berries.projects.doprava42.DopravaApplication.init(DopravaApplication.java:144)

.


I'm creating the EventBus in the init() method as is done in the 
examples:

eventBus = new EventBus(this);
eventBus.getParameters().setTransport(AtmosphereTransport.STREAMING);
eventBus.getParameters().setLogLevel(AtmosphereLogLevel.DEBUG);


How can I use WicketTester along with properly setted up Atmosphere 
application (using AtmosphereServlet)?



Thank you.
Vit

-
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



WicketTester with Atmosphere

2013-10-06 Thread Vit Rozkovec

How is it possible to unit test Wicket application that uses Atmosphere?

When I run the application everything is ok, when testing, see excerpt 
of the stacktrace -


org.apache.wicket.WicketRuntimeException: There is no Atmosphere 
BroadcasterFactory configured. Did you include the atmosphere.xml 
configuration file and configured AtmosphereServlet?
at 
org.apache.wicket.atmosphere.EventBus.lookupDefaultBroadcaster(EventBus.java:131)

at org.apache.wicket.atmosphere.EventBus.(EventBus.java:123)
at 
name.berries.projects.doprava42.DopravaApplication.init(DopravaApplication.java:144)

.


I'm creating the EventBus in the init() method as is done in the examples:
eventBus = new EventBus(this);
eventBus.getParameters().setTransport(AtmosphereTransport.STREAMING);
eventBus.getParameters().setLogLevel(AtmosphereLogLevel.DEBUG);


How can I use WicketTester along with properly setted up Atmosphere 
application (using AtmosphereServlet)?



Thank you.
Vit

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WebSockets / Atmosphere with Glassfish 4.0?

2013-09-02 Thread Martin Grigorov
On Sat, Aug 31, 2013 at 9:38 AM, Phill Ashworth wrote:

> Thanks Martin, that saves me some pain.
> I'd be all for a bit of extra Wicket configuration rather than hope the GF
> team acts on your request.


OK. I'll do it soon.


>
>
> On 30 Aug 2013, at 10:46, Martin Grigorov wrote:
>
>  Hi,
>>
>> I've tried to make a module for GF 3 for Native WebSockets when Native WS
>> module has been introduced -
>> https://github.com/apache/**wicket/tree/sandbox/wicket-**
>> native-websocket-glassfish<https://github.com/apache/wicket/tree/sandbox/wicket-native-websocket-glassfish>
>> But it didn't work well because of: bugs in GF 3, lack of demo apps, lack
>> of interest.
>>
>> Recently I've added JSR356 based implementation to Wicket 7 -
>> https://github.com/apache/**wicket/tree/master/wicket-**
>> experimental/wicket-native-**websocket/wicket-native-**websocket-javax<https://github.com/apache/wicket/tree/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-javax>
>> But again this doesn't work on GF 4 :-/ due to
>> https://java.net/jira/browse/**WEBSOCKET_SPEC-181<https://java.net/jira/browse/WEBSOCKET_SPEC-181>.
>> The impl works with Tomcat
>> 8, and Tomcat 7 (next release will have the JSR based impl backported).
>> This can be improved by moving the WebSocket Endpoint creation logic to a
>> ServletContextListener instead of a Filter but this will require
>> additional
>> setup steps that I'd like to avoid.
>>
>>
>>
>>  Has anyone managed to use Wicket + native WebSockets or Atmosphere on
>>> Glassfish 4.0?
>>> Neither of the current modules work out of the box on Glassfish 4.0, just
>>> wondering if anyone has had any success with this combination or can give
>>> me any time saving pointers.
>>> -Phill
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: WebSockets / Atmosphere with Glassfish 4.0?

2013-08-30 Thread Phill Ashworth

Thanks Martin, that saves me some pain.
I'd be all for a bit of extra Wicket configuration rather than hope the 
GF team acts on your request.


On 30 Aug 2013, at 10:46, Martin Grigorov wrote:


Hi,

I've tried to make a module for GF 3 for Native WebSockets when Native 
WS

module has been introduced -
https://github.com/apache/wicket/tree/sandbox/wicket-native-websocket-glassfish
But it didn't work well because of: bugs in GF 3, lack of demo apps, 
lack

of interest.

Recently I've added JSR356 based implementation to Wicket 7 -
https://github.com/apache/wicket/tree/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-javax
But again this doesn't work on GF 4 :-/ due to
https://java.net/jira/browse/WEBSOCKET_SPEC-181. The impl works with 
Tomcat
8, and Tomcat 7 (next release will have the JSR based impl 
backported).
This can be improved by moving the WebSocket Endpoint creation logic 
to a
ServletContextListener instead of a Filter but this will require 
additional

setup steps that I'd like to avoid.




Has anyone managed to use Wicket + native WebSockets or Atmosphere on
Glassfish 4.0?
Neither of the current modules work out of the box on Glassfish 4.0, 
just
wondering if anyone has had any success with this combination or can 
give

me any time saving pointers.
-Phill

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@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: WebSockets / Atmosphere with Glassfish 4.0?

2013-08-30 Thread Martin Grigorov
Hi,

I've tried to make a module for GF 3 for Native WebSockets when Native WS
module has been introduced -
https://github.com/apache/wicket/tree/sandbox/wicket-native-websocket-glassfish
But it didn't work well because of: bugs in GF 3, lack of demo apps, lack
of interest.

Recently I've added JSR356 based implementation to Wicket 7 -
https://github.com/apache/wicket/tree/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-javax
But again this doesn't work on GF 4 :-/ due to
https://java.net/jira/browse/WEBSOCKET_SPEC-181. The impl works with Tomcat
8, and Tomcat 7 (next release will have the JSR based impl backported).
This can be improved by moving the WebSocket Endpoint creation logic to a
ServletContextListener instead of a Filter but this will require additional
setup steps that I'd like to avoid.


On Thu, Aug 29, 2013 at 6:12 PM, Phill Ashworth wrote:

> Has anyone managed to use Wicket + native WebSockets or Atmosphere on
> Glassfish 4.0?
> Neither of the current modules work out of the box on Glassfish 4.0, just
> wondering if anyone has had any success with this combination or can give
> me any time saving pointers.
> -Phill
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


WebSockets / Atmosphere with Glassfish 4.0?

2013-08-29 Thread Phill Ashworth
Has anyone managed to use Wicket + native WebSockets or Atmosphere on 
Glassfish 4.0?
Neither of the current modules work out of the box on Glassfish 4.0, 
just wondering if anyone has had any success with this combination or 
can give me any time saving pointers.

-Phill

-
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

2013-08-15 Thread souvikbhattacharyas
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=node&node=4660881&i=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=node&node=4660881&i=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=node&node=4660867&i=0>
> > > > For additional commands, e-mail: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=4660867&i=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_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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=node&node=4660881&i=2>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4660881&i=3>
> >
> &g

Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime

2013-08-14 Thread Martin Grigorov
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=node&node=4660867&i=0>
> > > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4660867&i=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_code&node=4660815&code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ==
> >
> > .
> > NAML<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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

2013-08-14 Thread souvikbhattacharyas
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=node&node=4660867&i=0>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4660867&i=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_code&node=4660815&code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ==>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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

2013-08-13 Thread mitrasamrat
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

2013-08-13 Thread Emond Papegaaij
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

2013-08-13 Thread souvikbhattacharyas
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

2013-08-13 Thread Emond Papegaaij
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

2013-08-13 Thread souvikbhattacharyas
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

2013-08-11 Thread Emond Papegaaij
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*
> 
> 
> wicket
> 
> org.atmosphere.cpr.AtmosphereServlet
> 
> applicationClassName
> WebPortal
> 
> 
> listings
> false
> 
> 
> configuration
> deployment
> 
> 
> org.atmosphere.useWebSocket
> false
> 
> 
> org.atmosphere.useNative
> true
> 
> 
> org.atmosphere.cpr.sessionSupport
> true
> 
> 
> filterMappingUrlPattern
> /ssp/*
> 
> 
> 
> org.atmosphere.cpr.broadcastFilterClasses
> 
> org.atmosphere.client.TrackMessageSizeFilter
> 
> 0
> 
> 
> *atmosphere.xml*
> 
> 
>  class-
name="org.atmosphere.handler.ReflectorServletProcessor">
>  value="org.apache.wicket.protocol.http.WicketFilter" />
> 
> 
> 
> *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 MessageListener() {
> @Override
> public void onMessage(Message message) {

wicket-atmosphere EventBus.post throwing Null pointer exception sometime

2013-08-09 Thread souvikbhattacharyas
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*


wicket
   
org.atmosphere.cpr.AtmosphereServlet

applicationClassName
WebPortal


listings
false 


configuration
deployment


org.atmosphere.useWebSocket
false


org.atmosphere.useNative
true


org.atmosphere.cpr.sessionSupport
true


filterMappingUrlPattern
/ssp/*


   
org.atmosphere.cpr.broadcastFilterClasses
   
org.atmosphere.client.TrackMessageSizeFilter

0


*atmosphere.xml*







*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 MessageListener() {
@Override
public void onMessage(Message message) {
String stringMessage = message.getMessageObject();
EventBus.get(application).post(stringMessage);
}
});
}
}


*Hazelcast.xml:*

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";>

ssp
ssp-pass


7301


127.0.0.1



127.0.0.1




*Exception:*

java.lang.NullPointerException
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:207)
at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.getClientUrl(ServletWebRequest.java:161)
at
org.apache.wicket.atmosphere.AtmosphereWebRequest.getClientUrl(AtmosphereWebRequest.java:104)
at org.apache.wicket.request.UrlRenderer.(UrlRenderer.java:63)
at
org.apache.wicket.request.cycle.RequestCycle.newUrlRenderer(RequestCycle.java:145)
at
org.apache.wicket.request.cycle.RequestCycle.getUrlRenderer(RequestCycle.java:170)
at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderHead(AbstractDefaultAjaxBehavior.java:96)
at
org.apache.wicket.ajax.AjaxEventBehavior.renderHead(AjaxEventBehavior.java:79)
at org.apache.wicket.Component.renderHead(Component.java:2700)
at
org.apache.wicket.ajax.AbstractAjaxResponse.writeHeaderContribution(AbstractAjaxResponse.java:465)
at
org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:101)
at
org.apache.wicket.ajax.AbstractAj

Re: Wicket Atmosphere - Encoding and MultiTab issues

2013-07-25 Thread Martin Grigorov
On Wed, Jul 24, 2013 at 11:39 PM, fliptaboada  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

2013-07-24 Thread fliptaboada
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

2013-07-22 Thread Martin Grigorov
Hi,


On Thu, Jul 18, 2013 at 4:22 PM, fliptaboada  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

2013-07-18 Thread fliptaboada
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?

2013-07-11 Thread dlock
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

2013-07-08 Thread Pierre Goupil
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 wrote:

> 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 wrote:
>
>> 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 > >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")


Re: Wicket-Atmosphere : best way to call server

2013-07-08 Thread Pierre Goupil
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 wrote:

> 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  >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

2013-07-07 Thread Martin Grigorov
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 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
>


Wicket-Atmosphere : best way to call server

2013-07-06 Thread Pierre Goupil
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

2013-06-26 Thread Pierre Goupil
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 wrote:

>
> 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

2013-06-25 Thread Pierre Goupil
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

2013-06-11 Thread Dan Retzlaff
On Tue, Mar 26, 2013 at 4:31 AM, Emond Papegaaij  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:
> >
> 
> 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


wicket-atmosphere, named Broadcasters

2013-05-17 Thread Leonid Bogdanov

Hello!

    Atmosphere framework supports named Broadcasters that can be treated as 
topics to which only interested clients are subscribed. Is it possible to 
support named Broadcasters in wicket-atmosphere EventBus class?
    As a workaround of this currently missing feature I tried to use a 
ResourceRegistrationListener that assigns a proper Broadcaster to every new 
Atmosphere resource, then a specific Broadcaster can be asked for all 
Atmosphere resources registered with it, and a message can be sent to only them 
with EventBus.post() method. Unfortunately, this workaround isn't working for 
the moment.
    Also I think I found an issue with getting an Atmosphere resource object by 
its uuid in ResourceRegistrationListener.resourceRegistered():

    public void resourceRegistered(String uuid, Page page) {
        AtmosphereResource resource = 
AtmosphereResourceFactory.getDefault().find(uuid); // resource will be null
    }

    Atmosphere framework version is 1.0.13, wicket-atmosphere version is 
0.10-SNAPSHOT.

Thank you.


Re: Atmosphere NPE

2013-05-03 Thread Martin Grigorov
Hi,

Please create a quickstart and attach it to a ticket in Jira.
Thanks!


On Fri, May 3, 2013 at 7:36 AM, Noven  wrote:

> Hi all,
>
> I have issue with atmosphere, below is the log:
>
> 2013-05-01 19:11:32.880602500 INFO  - AtmosphereBehavior -
> Resuming the streaming response from ip 127.0.0.101:41704
> 2013-05-01 19:11:32.880714500 INFO  - AtmosphereBehavior -
> streaming connection dropped from ip 127.0.0.101:41704
> 2013-05-01 19:11:32.886105500 ERROR - AtmosphereBehavior -
> 2013-05-01 19:11:32.886106500 java.lang.NullPointerException
> 2013-05-01 19:11:32.886106500 at
> org.apache.wicket.atmosphere.EventBus.get(EventBus.java:87)
>
> Also I found that this issue make my application become unresponsive and
> cause tomcat shut down.  Did anybody ever experiencing this?
>
> Any help will be appreciated. Thank you.
>
> Below is my web.xml
>
> 
> contextConfigLocation
> classpath:applicationContext.xml
> 
> 
>
> org.springframework.web.context.ContextLoaderListener
> 
> 
> wicket.admin
> wicket.admin
> org.atmosphere.cpr.AtmosphereServlet
> 
> applicationClassName
> com.admin.WicketApplication
> 
> 
> configuration
> deployment
> 
> 
> org.atmosphere.useWebSocket
> true
> 
> 
> org.atmosphere.useNative
> true
> 
> 
> org.atmosphere.cpr.sessionSupport
> true
> 
> 
> filterMappingUrlPattern
> /*
> 
> 
>
> org.atmosphere.websocket.WebSocketProtocol
>
> org.atmosphere.websocket.protocol.EchoProtocol
> 
> 
>
> org.atmosphere.cpr.broadcastFilterClasses
>
> org.apache.wicket.atmosphere.TrackMessageSizeFilter
> 
> 0
> 
>
> 
> wicket.admin
> /*
> 




-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>


Atmosphere NPE

2013-05-02 Thread Noven
Hi all,

I have issue with atmosphere, below is the log:

2013-05-01 19:11:32.880602500 INFO  - AtmosphereBehavior         - Resuming the 
streaming response from ip 127.0.0.101:41704
2013-05-01 19:11:32.880714500 INFO  - AtmosphereBehavior         - streaming 
connection dropped from ip 127.0.0.101:41704
2013-05-01 19:11:32.886105500 ERROR - AtmosphereBehavior         - 
2013-05-01 19:11:32.886106500 java.lang.NullPointerException
2013-05-01 19:11:32.886106500     at 
org.apache.wicket.atmosphere.EventBus.get(EventBus.java:87)

Also I found that this issue make my application become unresponsive and cause 
tomcat shut down.  Did anybody ever experiencing this? 

Any help will be appreciated. Thank you.

Below is my web.xml


        contextConfigLocation
        classpath:applicationContext.xml
    
    
        
org.springframework.web.context.ContextLoaderListener
    
    
        wicket.admin
        wicket.admin
        org.atmosphere.cpr.AtmosphereServlet
        
            applicationClassName
            com.admin.WicketApplication
        
        
            configuration
            deployment
        
        
            org.atmosphere.useWebSocket
            true
        
        
            org.atmosphere.useNative
            true
        
        
            org.atmosphere.cpr.sessionSupport
            true
        
        
            filterMappingUrlPattern
            /*
        
        
            org.atmosphere.websocket.WebSocketProtocol
            
org.atmosphere.websocket.protocol.EchoProtocol
        
        
            org.atmosphere.cpr.broadcastFilterClasses
            
org.apache.wicket.atmosphere.TrackMessageSizeFilter
        
        0
           
    
    
        wicket.admin
        /*
     

Re: wicket-atmosphere issues

2013-04-16 Thread Martin Geisse
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
> wrote:
> 
>> 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  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

2013-04-15 Thread Martin Grigorov
Hi,

Please create a ticket and attach the patch you propose.
Thanks!


On Sun, Apr 14, 2013 at 5:59 PM, Martin Geisse
wrote:

> 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  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

2013-04-14 Thread Martin Geisse
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  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: Atmosphere problem with JBoss 7.1

2013-04-12 Thread Raul
All libraries are included in the wicket application. The difference is
created in the web.xml. I have set the following parameter to false


 org.atmosphere.useNative 
 true 

And to deploy the application log tells me that the Atmosphere is started,
but on entering the application, I still returns the 404, but now and does
not draw any trace. The content of my web.xml is being

 Atmospherefilter 
 Atmospherefilter 
 org.atmosphere.cpr.AtmosphereServlet 

 org.atmosphere.filter 
 org.apache.wicket.protocol.http.WicketFilter 


 applicationClassName 
 com.myCompany.MyApplication 


 org.atmosphere.useWebSocket 
 true 


 org.atmosphere.useNative 
 false


 org.atmosphere.cpr.sessionSupport 
 true 


 org.atmosphere.websocket.WebSocketProtocol 
 org.atmosphere.websocket.protocol.EchoProtocol 


 org.atmosphere.cpr.broadcastFilterClasses 
 org.apache.wicket.atmosphere.TrackMessageSizeFilter 


 filterMappingUrlPattern 
 / * 


 0 



 Atmospherefilter 
 / * 


And the web.xml before using Atmosphere, (which worked fine). was this.


 wicket.netwie 
 org.apache.wicket.protocol.http.WicketFilter 

 applicationClassName 
 com.myCompany.MyApplication 



 wicket.netwie 
 / * 


 30 


With the new web.xml, although always displays the context returns 404.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-problem-with-JBoss-7-1-tp4657907p4657931.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: Atmosphere problem with JBoss 7.1

2013-04-12 Thread Martin Grigorov
Hi,

The example runs fine with Jetty 7.6.+. To run it on another container you
will have to provide the required libraries.
It is like with databases - if you use MySQL then you need
mysql-connector.jar, if you use H2Database then you need h2.jar instead.

You will need to consult with Atmosphere docu for JBoss implementation.
As I said the warnings are logged by Atmosphere so you will have to see
what is the difference in the available libraries (jars in WEB-INF/lib/**)
between the non-Wicket and Wicket demo apps.



On Fri, Apr 12, 2013 at 11:23 AM, Raul  wrote:

> I have asked in this forum because the problem I have when running Wicket
> application, any of these examples made ​​with other frameworks, work
> perfectly in Jboss,
>
> https://github.com/Atmosphere/atmosphere/wiki/Getting-Started-with-the-samples
> And on the second question, I mean, if you can give me a guide on how to
> use
> the sample. Since we do not know how to use it.
>
> PD.Sería useful to have a similar examples in Wicket because the
> wicketstuff
> QuickStart is quite poor.
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Atmosphere-problem-with-JBoss-7-1-tp4657907p4657919.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/>


Re: Atmosphere problem with JBoss 7.1

2013-04-12 Thread Raul
I have asked in this forum because the problem I have when running Wicket
application, any of these examples made ​​with other frameworks, work
perfectly in Jboss,
https://github.com/Atmosphere/atmosphere/wiki/Getting-Started-with-the-samples
And on the second question, I mean, if you can give me a guide on how to use
the sample. Since we do not know how to use it.

PD.Sería useful to have a similar examples in Wicket because the wicketstuff
QuickStart is quite poor.

Thank you.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-problem-with-JBoss-7-1-tp4657907p4657919.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: Atmosphere problem with JBoss 7.1

2013-04-11 Thread Martin Grigorov
hi

On Apr 12, 2013 12:23 AM, "Raul"  wrote:
>
> Hi, I have two questions concerning the atmosphere framework, I use wicket
> 6.6.0 and JBoss 7.1.
> I configured my application following the example,
> https://github.com/papegaaij/wicket-atmosphere-quickstart. And the
> application displays correctly, but when trying to enter, it returns a
404.
> Taking these traces.
>
> 23:05:40,588 WARN [org.atmosphere.cpr.AtmosphereFramework] (http -
> 127.0.0.1-8443-1) Failed using comet support:
> org.atmosphere.container.JBossWebCometSupport, error: JBoss failed to
detect
> this is a Comet Because the APR Connector application is not enabled.
> Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and
> there is no context.xml under WEB-INF or April Is the Nio Connector
enabled?
> 23:05:40,590 ERROR [org.atmosphere.cpr.AtmosphereFramework] (http -
> 127.0.0.1-8443-1) If you have more than one Connector enabled, make sure
you
> use the same They Both protocol, eg NIO / APR or HTTP for all. If not,
will
> be used org.atmosphere.container.BlockingIOCometSupport and can not be
> changed.
> 23:05:40,593 WARN [org.atmosphere.cpr.AtmosphereFramework] (http -
> 127.0.0.1-8443-1) Using org.atmosphere.container.BlockingIOCometSupport
>

these messages are logged by Atmosphere.  Better ask in their forum.
>
> My other question is, how does this example?
>   http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/?1
>

The  question is incomplete.

>
>
> --
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-problem-with-JBoss-7-1-tp4657907.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
>


Atmosphere problem with JBoss 7.1

2013-04-11 Thread Raul
Hi, I have two questions concerning the atmosphere framework, I use wicket
6.6.0 and JBoss 7.1.
I configured my application following the example,
https://github.com/papegaaij/wicket-atmosphere-quickstart. And the
application displays correctly, but when trying to enter, it returns a 404.
Taking these traces.

23:05:40,588 WARN [org.atmosphere.cpr.AtmosphereFramework] (http -
127.0.0.1-8443-1) Failed using comet support:
org.atmosphere.container.JBossWebCometSupport, error: JBoss failed to detect
this is a Comet Because the APR Connector application is not enabled.
Make sure atmosphere-compat-jboss.jar is not under your WEB-INF/lib and
there is no context.xml under WEB-INF or April Is the Nio Connector enabled?
23:05:40,590 ERROR [org.atmosphere.cpr.AtmosphereFramework] (http -
127.0.0.1-8443-1) If you have more than one Connector enabled, make sure you
use the same They Both protocol, eg NIO / APR or HTTP for all. If not, will
be used org.atmosphere.container.BlockingIOCometSupport and can not be
changed.
23:05:40,593 WARN [org.atmosphere.cpr.AtmosphereFramework] (http -
127.0.0.1-8443-1) Using org.atmosphere.container.BlockingIOCometSupport


My other question is, how does this example?
  http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/?1



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-problem-with-JBoss-7-1-tp4657907.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: Events: Atmosphere vs. Guava vs Wicket native

2013-03-28 Thread Dan Retzlaff
Hi Jarnis. Since this didn't generate a response, I'll share some thoughts.
First a disclaimer: I haven't used Wicket-Atmosphere yet, but I've read
what there is to read and am looking forward to it. (We have several use
cases that will benefit greatly.)

Are there any good arguments for not just using Atmosphere events throughout
> the application, completely avoiding Wicket and Guava events?


Are these events changing the DOM in ways Wicket should know about? It
seems like most non-trivial event content would require corresponding
changes to your Wicket component graph, e.g. preparing for clicks. But if
you have a container that doesn't need to interact with Wicket, and you
don't mind writing the client- and server-side plumbing directly, maybe it
makes sense.


> Are there significants advantages (for instance performance related) to
> using wicket
> native events for the component-component messaging?


Wicket's built-in events work well within the Wicket architecture. If a
random event comes in on a Guava bus, you have to ask yourself, "okay now
how do I get access to this or that component that's serialized in the page
store?" Wicket events have well-defined access to the important objects
(Application, Session, RequestCycle, Page, Components), and a simple way to
target only a subset of those.

I don't think server-side performance should be your concern here. Unless
you have a super crazy component count Wicket events are plenty fast.

Hope that helps.

Dan


Events: Atmosphere vs. Guava vs Wicket native

2013-03-27 Thread yarnish
Hey guys

I'm making a Wicket 6 application that will use Atmosphere for server push
events. I am also planning to use events to communicate between wicket
components (for any messages between components not defined in the same
class) and possibly to use events/observers for internal application
business logic.

One of the guides/examples on using Atmosphere talket about using Guava for
application events and just using Atmosphere for server push events to the
client. I can understand if you want to keep a loose coupling between a
wicket front end and your business logic, but it seems to me that Atmosphere
could be used for events, even in the case that you wanted to use another
front-end framework.

Are there any good arguments for not just using Atmosphere events throughout
the application, completely avoiding Wicket and Guava events? Are there
significants advantages (for instance performance related) to using wicket
native events for the component-component messaging? Is there a consensus
about what is best-practice, or is it mainly a matter of taste.

Looking forward to hearing your thoughts on the matter. Thanks in advance

Jarnis



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Events-Atmosphere-vs-Guava-vs-Wicket-native-tp4657595.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 issues

2013-03-26 Thread Emond Papegaaij
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  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:
> 

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

2013-03-24 Thread Leonid Bogdanov
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  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.Illegal

  1   2   3   >