Hello Alexey,
                       thanks for the information, then what is the
right way to clear/remove/release persistent SharedObjects?
should I call release on the SO instead of clearSharedObjects? The
problem is, that the next time the server starts I have all
these SO files in the persistence/SharedObjects directory, so as a
workaround a do so.removeAtribute() on the SharedObjects
that get used again, the thing is that I want to maintain persistency of
some SharedObjects only during the server session,
but when it restarts I don't want some of the SharedObjects to exist as
files, the workaround would be to delete them with
a shell script, but I don't see this to be a clear solution.

Thanks
David

Alexey wrote:
> Hello David,
>
> Tuesday, July 10, 2007, 5:09:21 PM, you wrote:
>
>   
>> Hello, i would like to ask for an advice on this issue, i'm clearing SO
>> with the following code. Eventhough the clearSharedObjects method
>> returns true,
>> the file of the SharedObject doesn't get deleted from the filesystem and
>> remains in the persistence/SharedObject directory, i'm using red5-0.6.2
>> WARlet
>> in Tomcat 5.5.23 on the Mac OS X 10.4.10 system with Java 5.
>>  
>> // remove the SharedObject belonging to this client
>> String soName = "MessangerPSO_" +
>> this.clientIDToUserIDHashtable.get(clientId).toString();
>> this.clearSharedObjects(this.appScope, soName);
>>     
>
>   
>> // this clears all the persistent objects when the server is stopped
>> this.clearSharedObjects(this.appScope, "/");
>>     
>
>   
>> Thanks for any light shed on the behaviour of the clearSO method
>> David Engelmaier
>>     
>
>   
>> _______________________________________________
>> Red5 mailing list
>> [email protected]
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>     
>
>
> As I can see from the code, clearSharedObjects() invocation does not lead to 
> file
> removal - it is done later, at SO removal.
>
> clearSharedObjects() does only clear memory attributes of the SOs for
> now (despite the spec of ISharedObjectService).
>
> Hope Red5 developers will correct me if I went wrong.
>
>
> [+] A question to the Red5 Team: guys, is it correct code?
> (SharedObject.java)
>
>     protected void checkRelease() {
>                 if (!isPersistentObject() && listeners.isEmpty() && 
> !isAcquired()) {
>                         log.info("Deleting shared object " + name
>                                         + " because all clients disconnected 
> and it is no longer acquired.");
>                         if (storage != null) {
>                                 if (!storage.remove(this)) {
>                                         log.error("Could not remove shared 
> object.");
>                                 }
>                         }
>                         close();
>                 }
>     }
>
>
>
> What is the sense of removal SO from persistent storage if it is not
> persistent?
>
> If an SO is persistent, close() won't be ever invoked?
>
>
> Thanks.
>
>
>   


-- 

David Engelmaier

Software development consultant

http://www.ixperience.net

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to