I should have said this before, but thanks for providing this code!

For reasons that are still not clear to me, my task was not
deserializing properly (very odd complaints about HashMap).  Not
having a stack trace made it even more confusing than usual.
Ultimately I fixed the problem by making my class Externalizable and
serializing my object graph as JSON.

I would definitely want to see deserialization exceptions in the logs.
 Even if the container is behaving perfectly rationally, developers
can easily hork up the process with Externalizable.  What is to be
gained by hiding the stack trace?

Thanks,
Jeff

On Wed, Nov 25, 2009 at 11:03 AM, Vince Bonfanti <[email protected]> wrote:
> Hi Jeff,
> Thanks for the suggestions and the code. David Chandler sent me a patch to
> support user-specified queue names (almost exactly the same as your
> changes), and I've committed that patch to SVN. Regarding your other
> changes:
>   - I've probably make the <url-pattern> init parameter optional and have it
> default to "/_ah/<queue_name>" rather than throw an exception from the init
> method if it's missing.
>   - While we're at it, the default queue name could be optionally specified
> by an init parameter also.
>   - I'm not sure a stacktrace from the doPost method is really going to give
> you much more information, but would be open to that  change.
> It looks like the Deferred class is going to be added to the official GAE/J
> SDK, though I'm not sure when. Rather than make any more changes to the code
> right now, I'd rather wait to see what shows up the SDK and then work
> through normal Google channels to get any further modifications made. In the
> mean time, I'm glad it's working for you.
> Vince
> On Tue, Nov 24, 2009 at 8:09 PM, Jeff Schnitzer <[email protected]> wrote:
>>
>> Attached is a modified version of that class that lets you define any
>> path you want for the servlet and lets you specify which queue to use
>> like this: Deferred.defer(task, "queueName");
>>
>> (I needed this for my own purposes)
>>
>> Do with it as you wish :-)
>>
>> The only other major change I would make is to stop masking all the
>> exceptions during the task processing.  Or at least, if you're going
>> to log the exception and stop propagation, log the whole thing so we
>> get a stacktrace in the logs.
>>
>> Jeff
>>
>> On Fri, Nov 20, 2009 at 1:03 PM, David Chandler <[email protected]>
>> wrote:
>> > Vince, this is great! I hadn't been watching my own issue, so didn't
>> > see this until now. Thanks so much!
>> >
>> > Only enhancement I would suggest is to enable multiple deferred
>> > queues. For example. I would like to defer tasks in an email throttle
>> > queue separately from a general background queue. Perhaps the
>> > Deferrable interface could have a getQueueName() method, or
>> > Deferred.defer could have an additional signature defer(Deferrable
>> > task, String queueName).
>> >
>> > Thanks again,
>> > /dmc
>>
>> --
>
> --
>
> 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.
>

--

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