Hi,

Extending the RemoveCallback and with remove() methods works fine, thanks.

Maxime.

2008/7/3 Martin Feller <[EMAIL PROTECTED]>:

> Maxime,
>
> If your resource class implements the interface
> org.globus.wsrf.RemoveCallback
> and your home class extends from org.globus.wsrf.impl.ResourceHomeImpl,
> then the remove() method of your resource will be called before it is
> removed
> from the resource home (unless you overwrote remove() from
> ResourceHomeImpl)
> as part of a destroy() call.
>
> (
>   Snippet from ResourceHomeImpl.remove():
>   ...
>   if (resource instanceof RemoveCallback) {
>       ((RemoveCallback)resource).remove();
>   }
>   ...
> )
>
> If your home does not extend from ResourceHomeImpl, you could probably just
> define that mechanism yourself.
>
> Martin
>
>
> ----- Original Message -----
> From: "BRACHET Maxime" <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Tuesday, July 1, 2008 8:07:28 AM GMT -06:00 US/Canada Central
> Subject: [gt-user] Resources Management Destroy
>
> Hi,
>
> Using the Programmer guide and GT 4.0.7 I have implemented a simple service
> with multiple resources.
> I wanted to destroy the Resources after I have done the job.
> Using ImmediateResourceTermination I can destroy the resource, but I wanted
> to perform some tasks before the destruction.
> Example the Resources are String which represent files stocked on the
> computer.
> So before destroying the resources named infile I wanted to delete the real
> file on the computer.
>
> Is it possible in overwriting the destroy operation or must I implement my
> own destroy method in the service ?
>
> Regards,
>
> Maxime.
>

Reply via email to