Move method1() to a method inside a servlet invoked by the Task Queue, then
inside your servlet call queue.add().

On Tue, Jun 1, 2010 at 8:49 PM, drift elysium <[email protected]>wrote:

> hi,
>
> I'd like to know how exactly I should include the code for TaskQueue.
>
> I saw this line in the docs.
>
> queue.add(url("/path?a=b&c=d").method(Method.GET))
>
>
> So, if I have a servlet like this and if the method1() takes a longer time
> and so I want to implement TaskQueue on it. How do I do it? Someone please
> help!
>
> public class sampleServlet extends HttpServlet{
>
>
>     public void doPost(HttpServletRequest req, HttpServletResponse resp)
>     throws ServletException, IOException {
>
>
>     .......
>
>    //calling the function method1()
>    method1();
>    ......
>
>
>
>     }
>
>
>  public void method1(){
>
>  //here the entities are persisted
>  }
> }
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>



-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to