Hi Jeff,

In continuation to the previous mail,

I am getting the following exception:

CommonRpcServiceImpl.cancelTripEnquiry() java.io.NotSerializableException:
com.googlecode.objectify.impl.ObjectifyImpl


Thanks
Deepak

On Wed, Apr 25, 2012 at 10:52 PM, Deepak Singh <deepaksingh...@gmail.com>wrote:

> Hi Jeff,
>
> Here is the complete code:
>
> here is my static inner class,
>
> public static class CancelTriptaskOperation implements DeferredTask,
> Serializable {
>
>  private PackageEnqFormDTO enq = null;
> Objectify objectifyDeferred = ObjectifyService.begin();
>
> public CancelTriptaskOperation(final PackageEnqFormDTO enq1) {
> this.enq = enq1;
>  }
>
> @Override
>  public void run() {
> try{
>  enq.setStatus(YFConstant.CANCELLED_ENQUIRY);
> LinkedHashMap<String, PackageConversationDTO> convMap =
> enq.getLeadAndConvMap();
>  Set<String> keys = convMap.keySet();
> Iterator<String> itr = keys.iterator();
>  while(itr.hasNext()) {
> String key = itr.next();
>  PackageConversationDTO convDto = convMap.get(key);
> convDto.setStatus(YFConstant.CANCELLED_TRIP_PACKAGE_CONVERSATION);
>  convMap.put(key, convDto);
> }
>  objectifyDeferred.put(enq);
>  List<HolidayInvoiceDTO> list =
> objectifyDeferred.query(HolidayInvoiceDTO.class).filter("tripId",
> enq.getId()).list();
>  for(HolidayInvoiceDTO holiday : list) {
> holiday.setStatus(YFConstant.INVOICE_GENERATED_THEN_TRIP_CANCELLED);
>  objectifyDeferred.put(holiday);
> }
>  }catch (Exception e) {
> System.out.println("CommonRpcServiceImpl.TaskOp.run() "+e.getMessage());
>  }
> }
>
>  }
>
>
> Here is my method in outer class:
>
> @Override
> public boolean cancelTripEnquiry(final PackageEnqFormDTO enq) {
>   try{
>  TaskOptions taskOpt = TaskOptions.Builder.withPayload(new
> CancelTriptaskOperation(enq));
>  Queue defQueue = QueueFactory.getDefaultQueue();
>  defQueue.add(taskOpt);
>  }catch (Exception e) {
>  System.out.println("CommonRpcServiceImpl.cancelTripEnquiry()
> "+e.getMessage());
>  }
> return true;
>  }
>
>
>
> Hope the code is understandable.
>
>
> Thanks
> Deepak
>
>
>
> On Wed, Apr 18, 2012 at 5:27 AM, Jeff Schnitzer <j...@infohazard.org>wrote:
>
>> On Tue, Apr 17, 2012 at 6:25 PM, Deepak Singh <deepaksingh...@gmail.com>
>> wrote:
>> > Still no luck. is it a problem with Objectify ?
>>
>> That is extraordinarily unlikely.
>>
>> You'll have to post a lot more code if you want help.
>>
>> Jeff
>>
>
>
>
> --
> Deepak Singh
>



-- 
Deepak Singh

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

Reply via email to