Re: using cometd

2010-10-13 Thread Rodolfo Hansen
Yes, this message is safe to ignore. 

It is the bayeux implementation stating JSONCommented is deprecated. 

Later versions of push do not try to use it.

On Tue, 2010-10-12 at 19:32 -0700, fachhoch wrote:

 JSONCommented


using cometd

2010-10-12 Thread fachhoch

I get this message 

JSONCommented is deprecated null null


I am using org.wicketstuff.push  version 1.4.8,
I get the above message sometimes  , do not know when , please tell  me is
this any problem ? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-tp2993011p2993011.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



session timeout notification using cometd

2010-09-01 Thread fachhoch

I want to notify clients about their session timeout.If the user is idle and
his session is about to expire I want to   warn users about this , can I do
this with wicket-cometd ?  
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html
Sent from the Wicket - User 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: session timeout notification using cometd

2010-09-01 Thread jcgarciam

You indeed can use wicket-cometd on that, but why not setting a simple
Javascript timer on the page (set to your server-timeout configuratin) which
get reset on user interaction.


On Wed, Sep 1, 2010 at 11:21 AM, fachhoch [via Apache Wicket] 
ml-node+2403249-1689023062-65...@n4.nabble.comml-node%2b2403249-1689023062-65...@n4.nabble.com
 wrote:

 I want to notify clients about their session timeout.If the user is idle
 and his session is about to expire I want to   warn users about this , can I
 do this with wicket-cometd ?

 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403283.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: session timeout notification using cometd

2010-09-01 Thread fachhoch

I can do that, do you have any examples for java script notification when
session is about to timeoout ?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html
Sent from the Wicket - User 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: session timeout notification using cometd

2010-09-01 Thread jcgarciam

Here is a very rough example,  keep in mind there a several  factors that
can reset the timeout to happen in the server and then you need to reset
your timer in the client,  the most troublesome to handle are ajax
interaction and iframe.

So assuming you don't have any ajax component or iframe on the page that can
actually trigger any server interaction and the user just sit in the page
and wait, something like this is the easiest way:

setTimeout(showAboutToTimeout(), (1000 * (60 * 28) );  //28min

function showAboutToTimeout(){
  // Here you can build you message or show floating div, what ever you like
  alert(Your session may timeout in 2 minutes unless you interact with the
page :) );
}

On Wed, Sep 1, 2010 at 11:52 AM, fachhoch [via Apache Wicket] 
ml-node+2403332-1651621642-65...@n4.nabble.comml-node%2b2403332-1651621642-65...@n4.nabble.com
 wrote:

 I can do that, do you have any examples for java script notification when
 session is about to timeoout ?

 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403388.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: using cometd with threads

2010-08-17 Thread fachhoch

I wan to inject  Bayeaux service  in a  pojo  initialized by spring , please
sugest me how  can I get servlet context in a spring bean ?
 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2328511.html
Sent from the Wicket - User 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: using cometd with threads

2010-08-17 Thread Rodolfo Hansen
You may use a servlet context listener...

Get the spring applicationContext and add the Bayuex Service been to it
when it context is initialized

http://www.java-tips.org/java-ee-tips/java-servlet/how-to-work-with-servletcontextlistener.html



On Tue, 2010-08-17 at 08:06 -0700, fachhoch wrote:

 I wan to inject  Bayeaux service  in a  pojo  initialized by spring , please
 sugest me how  can I get servlet context in a spring bean ?
  




Re: using cometd with threads

2010-08-17 Thread jcgarciam

I haven't tried this myself, but take a look into the Spring interface
ServletContextAwarehttp://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/ServletContextAware.htmlit
may shed some light to achieve what you want.
*
*
*
*
On Tue, Aug 17, 2010 at 12:06 PM, fachhoch [via Apache Wicket] 
ml-node+2328511-1648896416-65...@n4.nabble.comml-node%2b2328511-1648896416-65...@n4.nabble.com
 wrote:

 I wan to inject  Bayeaux service  in a  pojo  initialized by spring ,
 please sugest me how  can I get servlet context in a spring bean ?


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2328511.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2328532.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: using cometd with threads

2010-08-03 Thread fachhoch

If I do that I am using web api in service which is not good , so any other
way ?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2311905.html
Sent from the Wicket - User 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: using cometd with threads

2010-08-03 Thread jcgarciam

If you are starting your Job from a Web Request, initialize your Bayeaux
service (as Rodolfo mentioned) and pass that to your processing Job (Your
Job doesn't  have to be WebApi aware) as Rodolfo said, Bauyeaux is meant to
be used a messaging API.


On Tue, Aug 3, 2010 at 11:00 AM, fachhoch [via Apache Wicket] 
ml-node+2311905-1356455233-229...@n4.nabble.comml-node%2b2311905-1356455233-229...@n4.nabble.com
 wrote:

 If I do that I am using web api in service which is not good , so any other
 way ?

 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2311905.html
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDExOTE5MDc4OTQ=.





-- 
Sincerely,
JC

Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2311920.html
Sent from the Wicket - User mailing list archive at Nabble.com.


using cometd with threads

2010-08-02 Thread fachhoch

I was looking into cometd , I tried the example it worked for me.I havea
new requirement ,
I have to update a panel in my page if a job running   seperately in a
thread has finished processing.


for example user clicks a link, this starts a job in a thread 
asychronously.  This job might take several days , when this user  logs in
back and if the   job is completed I want to show the user that the job is
completed,
 in my case a thread   has to publish to a channel  is this possible ?
 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2310323.html
Sent from the Wicket - User 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: using cometd with threads

2010-08-02 Thread Rodolfo Hansen
Yes, the code is designed to be thread safe.

On Mon, 2010-08-02 at 07:15 -0700, fachhoch wrote:
 I was looking into cometd , I tried the example it worked for me.I havea
 new requirement ,
 I have to update a panel in my page if a job running   seperately in a
 thread has finished processing.
 
 
 for example user clicks a link, this starts a job in a thread 
 asychronously.  This job might take several days , when this user  logs in
 back and if the   job is completed I want to show the user that the job is
 completed,
  in my case a thread   has to publish to a channel  is this possible ?
  
 
 



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



Re: using cometd with threads

2010-08-02 Thread fachhoch

but is it write to use web api in  my service  classes  ?
My job is in service  layer as its a thread and web has nothing to do with ,
now I have to call  web api (cometd api )  inside my service classes is 
this write ?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2310404.html
Sent from the Wicket - User 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: using cometd with threads

2010-08-02 Thread Rodolfo Hansen
How are you getting the Bayeux service?

It is alright to think of the Bayeux service as a messaging api, that
jumps across your various layers (from the service to the javascript
client). As long as you remember you can't trust the javascript clients
(malicious users), you are fine.

On Mon, 2010-08-02 at 08:14 -0700, fachhoch wrote:
 but is it write to use web api in  my service  classes  ?
 My job is in service  layer as its a thread and web has nothing to do with ,
 now I have to call  web api (cometd api )  inside my service classes is 
 this write ?
 



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



Re: using cometd with threads

2010-08-02 Thread fachhoch

Please suggest me how to get   Bayeux service  in service layer , right now I
have in subclass of org.apache.wicket.protocol.http.Application  


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-cometd-with-threads-tp2310323p2310715.html
Sent from the Wicket - User 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: using cometd with threads

2010-08-02 Thread Rodolfo Hansen
You can get it from the ServletContext:

getServletContext().getAttribute(BayeuxServer.ATTRIBUTE);


On Mon, 2010-08-02 at 11:18 -0700, fachhoch wrote:
 Please suggest me how to get   Bayeux service  in service layer , right now I
 have in subclass of org.apache.wicket.protocol.http.Application  
 
 



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