Re: Simple message solution Wicket-Spring combined application

2015-04-23 Thread Sandor Feher
Hi Sebastien, 

It would worth a try but session scoped spring bean will fulfill all my
needs right know.
Thank you anyway!

Regards., Sandor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-message-solution-Wicket-Spring-combined-application-tp4670461p4670482.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: Simple message solution Wicket-Spring combined application

2015-04-23 Thread Sandor Feher
Hi Martin,

Thanks! That's it I was looking for. I use spring beans I inject to wicket
context so it should be trivial choice to me but I did not keep it in my
mind.

Regards., Sandor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-message-solution-Wicket-Spring-combined-application-tp4670461p4670481.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



Simple message solution Wicket-Spring combined application

2015-04-22 Thread Sandor Feher
Hi,

I'm looking for a simple and feasible message sending solution for my
application.
The main goal is that components (both wicket and spring) should be send
messages if a specific event occurs to users.
The message will be displayed at top of the page with help
AjaxSelfUpdatingBehaviour.
Spring messages are system wide. (Eg. all users should be notified) while
wicket ones can be session wide.
Wicket's event mechanism can be fine but my Spring based web service does
not know anything about wicket sessions (and should not of course).
I can do it via database table but I will cause overhead because of two
seconds refresh time I set in AjaxSelfUpdatingBehaviour.
So I'm looking for a more lightweight approach.

Thanks!

Regards., Sandor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-message-solution-Wicket-Spring-combined-application-tp4670461.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: Simple message solution Wicket-Spring combined application

2015-04-22 Thread Martin Grigorov
Hi,

The session services could store messages to application scoped bean.
The Wicket components in either the Wicket Session or session scoped bean.
The AjaxSelfUpdatingBehaviour will check both.
The session scoped messages could be deleted after render but you have to
think of a way how to mark an application scoped message as read by a
client and delete it when all it is read by all clients.

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

On Wed, Apr 22, 2015 at 10:58 AM, Sandor Feher sfe...@bluesystem.hu wrote:

 Hi,

 I'm looking for a simple and feasible message sending solution for my
 application.
 The main goal is that components (both wicket and spring) should be send
 messages if a specific event occurs to users.
 The message will be displayed at top of the page with help
 AjaxSelfUpdatingBehaviour.
 Spring messages are system wide. (Eg. all users should be notified) while
 wicket ones can be session wide.
 Wicket's event mechanism can be fine but my Spring based web service does
 not know anything about wicket sessions (and should not of course).
 I can do it via database table but I will cause overhead because of two
 seconds refresh time I set in AjaxSelfUpdatingBehaviour.
 So I'm looking for a more lightweight approach.

 Thanks!

 Regards., Sandor

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Simple-message-solution-Wicket-Spring-combined-application-tp4670461.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: Simple message solution Wicket-Spring combined application

2015-04-22 Thread Sebastien
Hi

If you are looking for another approach, you can give a try to native
websockets.

In the java sample below, the business tier is triggering a listener event,
which received by the web tier, which sends the websocket message.
Client side, the page is registered to the websocket by a Behavior. When a
message arrives, it is displayed.
The scope of the websocket message broadcast can be controlled IIRC
(Session, Application).

Wiki:
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Native+WebSockets

Sample (scala)
https://github.com/martin-g/wicket-native-websocket-example

Sample (java, cdi  ejb)
https://github.com/sebfz1/wicket-quickstart-cdi-async

Best regards,
Sebastien



On Wed, Apr 22, 2015 at 10:22 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 The session services could store messages to application scoped bean.
 The Wicket components in either the Wicket Session or session scoped bean.
 The AjaxSelfUpdatingBehaviour will check both.
 The session scoped messages could be deleted after render but you have to
 think of a way how to mark an application scoped message as read by a
 client and delete it when all it is read by all clients.

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

 On Wed, Apr 22, 2015 at 10:58 AM, Sandor Feher sfe...@bluesystem.hu
 wrote:

  Hi,
 
  I'm looking for a simple and feasible message sending solution for my
  application.
  The main goal is that components (both wicket and spring) should be send
  messages if a specific event occurs to users.
  The message will be displayed at top of the page with help
  AjaxSelfUpdatingBehaviour.
  Spring messages are system wide. (Eg. all users should be notified) while
  wicket ones can be session wide.
  Wicket's event mechanism can be fine but my Spring based web service does
  not know anything about wicket sessions (and should not of course).
  I can do it via database table but I will cause overhead because of two
  seconds refresh time I set in AjaxSelfUpdatingBehaviour.
  So I'm looking for a more lightweight approach.
 
  Thanks!
 
  Regards., Sandor
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Simple-message-solution-Wicket-Spring-combined-application-tp4670461.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