Bug 5789 - lifetime of subscription resources
: lifetime of subscription resources
Status: RESOLVED FIXED
: Java WS Core
globus_wsrf_core
: alpha
: Macintosh All
: P2 normal
: 4.2.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-01-18 11:51 by
Modified: 2008-03-21 15:06 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-01-18 11:51:26

    
------- Comment #1 From 2008-01-18 11:52:37 -------
shoot, hit the submit button somehow. description will follow ...
------- Comment #2 From 2008-01-18 12:21:03 -------
About renewing the lifetime of a subscription resource:
The schema (b-2.xsd) says that the 'TerminationTime' element is nillable
in the input type 'Renew' of the call to the 'Renew' operation.
But the 'TerminationTime' element is not defined as nillable in the output
type 'RenewResponse' of the 'Renew' operation.

BaseSubscriptionProvider.java however sets the 'TerminationTime' element
in the response to null in case it is null in the request.
This causes exceptions like

2008-01-18T11:27:49.748-06:00 ERROR ser.BeanSerializer
[ServiceThread-20,serialize:287] Exception:
java.io.IOException: Non nillable element 'terminationTime' is null.
        at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:228)
....

The current way to make a resource never expire however in ResourceHomeImpl
is setting its lifetime null in Java, because the ResourceSweeper that's
responsible for this does the following check:

    public static boolean isExpired(ResourceLifetime resource,
                                    Calendar currentTime) {
        Calendar terminationTime = resource.getTerminationTime();
        return (terminationTime != null &&
                terminationTime.before(currentTime));
    }

But this causes the above exceptions.
As a workaround i'll set the lifetime of subscription resources
to a far point in time in the future.
------- Comment #3 From 2008-03-21 15:06:33 -------
Fixed in trunk. The specification uses reference to TerminationTime, but Axis
doesn't seem to recogonize the nillable=true in that element. Changed the
definition to explicitly use type.

Martin, thanks for reporting this.