Hmm, just to make sure, i assume you know it: Do you feel or do you know that 
the
remove() method of your resource objects is not invoked when a resource is 
destroyed
(adding a logging statement should clarify this)?

How does RgbWSDFAttHome look like: Does it extend from 
org.globus.wsrf.impl.ResourceHomeImpl?
If so: Do you maybe overwrite 'public void remove(ResourceKey key)'?

Btw: Your timeout value of 600 in the LRUCache is pretty low: The unit is ms

Martin

Donglai Zhang wrote:
Hi, Martin:

Thanks for your hints!

I have got a service named RgbWSDFAtt and the "resourceClass" is "PersistentRgbWSDFAtt" and the signature of this class is:

public class PersistentRgbWSDFAtt
    extends RgbWSDFAtt
    implements PersistenceCallback, RemoveCallback {
...
// I also implemented the  remove() method
public void remove() throws ResourceException {
//Remove the resource...
}
...
}

However, I feel this has never been invoked. I am not sure if the parameters in the deploy-jndi-config.xml has been configured properly so the wscore server understands when it should remove the resource.
Donglai

On Tue, Jan 20, 2009 at 3:25 AM, Martin Feller <[email protected] <mailto:[email protected]>> wrote:

    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
    
<http://www.mcs.anl.gov/%7Egawor/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-jndi-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




--
Donglai Zhang

Ph.D Candidate
School of Computer Science
University of Adelaide,
SA, Australia  5083

Tel: 0061 8 83036166




Reply via email to