The remove() method of a resource is called by ResourceHome if the resource
is removed, if the resource implements the interface RemoveCallback.
(see
http://www.mcs.anl.gov/~gawor/javawscore/HEAD/doc/javadocs/org/globus/wsrf/RemoveCallback.html)
But there is no magic that deletes persistence data of a resource automatically.
You have to implement in remove() whatever resource-specific you want to happen
in case a resource is removed, including handling of persistence data.
Martin
Donglai Zhang wrote:
Hi,
I am writing a web service with WS-CORE. I found under the directory
/home/globus/.globus/persisted/129.127.XX.XXX-8010/PersistentRgbWSDFAtt,
there are lots of .ser file. I have a remove() method in class
org.globus.wsrf.samples.rgbwsdfatt.PersistentRgbWSDFAtt (Same as the
following one in red). I thought this method could help me remove the
reference, but seems not. The following is the deploy-jnid-config.xml
file of my RgbWSDFAtt service.
<?xml version="1.0" encoding="UTF-8"?>
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
<service name="RgbWSDFAttService">
<resource
name="home"
type="org.globus.wsrf.samples.rgbwsdfatt.RgbWSDFAttHome">
<resourceParams>
<parameter>
<name>resourceClass</name>
<value>org.globus.wsrf.samples.rgbwsdfatt.PersistentRgbWSDFAtt</value>
</parameter>
<parameter>
<name>resourceKeyName</name>
<value>{http://rgbwsdfatt.com}RgbWSDFAttKey</value>
</parameter>
<parameter>
<name>resourceKeyType</name>
<value>java.lang.Integer</value>
</parameter>
<parameter>
<name>cacheLocation</name>
<value>java:comp/env/services/RgbWSDFAttService/cache</value>
</parameter>
</resourceParams>
</resource>
<resource name="cache"
type="org.globus.wsrf.utils.cache.LRUCache">
<resourceParams>
<parameter>
<name>timeout</name>
<value>600</value>
</parameter>
</resourceParams>
</resource>
</service>
.....
I thought the timeout should remove the reference, but it seems not. Can
I (How can I) remove the used resource by setting the configuration file?
--
Cheers,
Donglai Zhang
School of Computer Science
University of Adelaide,
SA, Australia 5083