DUMANT Bruno FTRD/DTL wrote:

 
Anne,

It seems that we have not been very clever here ! There is no way to simply unexport an object. We should add the following method to UnicastRemoteObject:

static boolean unexportObject(Remote obj, boolean force) {
    return context.unexport(obj,force);
}

Calling that method should do what you expect. I will add this to the next versions of Jonathan.

Well... after a try, it is not exactly as I expected... You need also to add the following method to UnicastRemoteObject:

public int hashCode() {
    return System.identityHashCode(this);
}

This is because UnicastRemoteObject inherits indirectly from java.rmi.RemoteObject that redefines hashCode in a way that makes the hashCode change between the calls to exportObject() (possibly hidden in the constructor) and unexportObject()... It makes unexport difficult !

I have tested, now it works.

Bruno
 
 
 
 

 

Thanks for pointing this out.

Bruno

GERODOLLE Anne FTRD/DTL wrote:

Hi,I have an application that creates many instances of a subclass of jeremie.moa.UnicastRemoteObject .

Instances are automatically exported when created. I would like to know how to make them eligible for gc,I suppose I have to use some unexport method, however, the unexportObject method requires an argument(JRMIBFactory binder) that I do not know how to set.Can somebody help me in and give me the right procedure to follow in order to make a remote objectgarbage collectable ?Thanks,Anne

--
*******************************************************************
Bruno Dumant
DTL/ASR
france telecom R&D
38-40 rue du général Leclerc
92794 Issy Moulineaux Cedex 9
FRANCE

mailto:[EMAIL PROTECTED]
tel: +33 1 45 29 46 03
fax: +33 1 45 29 66 04
*******************************************************************
 

--
*******************************************************************
Bruno Dumant
DTL/ASR
france telecom R&D
38-40 rue du général Leclerc
92794 Issy Moulineaux Cedex 9
FRANCE

mailto:[EMAIL PROTECTED]
tel: +33 1 45 29 46 03
fax: +33 1 45 29 66 04
*******************************************************************
 

Reply via email to