How to pass a serialized object to appengine java task?

Posted by aloo on Stack Overflow See other posts from Stack Overflow or by aloo
Published on 2010-03-20T21:48:33Z Indexed on 2010/03/20 21:51 UTC
Read the original article Hit count: 421

Hi all,

I'm using java appengine and the task queue API to run async tasks. I would like to add a task to the task queue but pass a a java object as a parameter. I notic the task options api can add a parameter as a byte[] but I'm unsure how to use it.

1) How would I serialize my object to a byte[]? and 2) How would the task read the byte[] and reconstruct the original object?

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about appengine