Skip to content

Purchase status is not updated #6

@calinvoichita

Description

@calinvoichita

Hi,

Here is a simplified version of what I am trying to do:

  1. initiate purchase
  2. get status
  3. while status is pending
  4.          wait a little
    
  5.          get status
    

This works as expected in the Eclipse environment, but when deploying it as a Web Start the status is never updated. It "hangs" at pending.

I tracked down the problem, and found that the url for the purchase is cached and every time is requested at line 5, the BaseSpace server is not contacted and the initial cached value is used instead.

The solution I am working with involved changing the function "getHttpURLConnection" in the class "BaseSpaceURLConnectionFactory" (in the SDK). Here is the change I made:

  • removed
    • added
  •    return (HttpURLConnection) (proxy != null?url.openConnection(proxy):url.openConnection());
    
  •    URLConnection urlc = proxy != null?url.openConnection(proxy):url.openConnection();
    
  •    urlc.setUseCaches(false);
    
  •    return (HttpURLConnection) (urlc);
    

Maybe this will be useful for others as well and you can include it in the next sdk version.

Thanks,
Calin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions