# Persists SharedObject is not working.

**URL:** <https://community.wowza.com/t/persists-sharedobject-is-not-working/665>\
**Category:** Wowza Streaming Engine\
**Created:** [June 6, 2015, 3:48pm UTC](https://community.wowza.com/t/persists-sharedobject-is-not-working/665 "2015-06-06T15:48:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [June 6, 2015, 3:48pm UTC](https://community.wowza.com/t/persists-sharedobject-is-not-working/665/1 "2015-06-06T15:48:57Z")

</div>

Friends of the Wowza team

we are having trouble persists SharedObjects, we are using the code below, but to persist the object, exit the application, and after application complete with stop app, and return access the SharedObject is not triggered on the client to run.

It seems that everything is lost when you turn INFO server comment - onAppStop.

The file is created successfully within applications / myapp / SharedObjects / my\_shared\_object.rso

Any idea?

server-side:

public void changeConfigurations(IClient client, RequestFunction function, AMFDataList params) {

getLogger().info("configurationsSO: "+params);

ISharedObjects sharedObjects = client.getAppInstance().getSharedObjects(true); // SET TRUE FOR PERSISTENT

ISharedObject sharedObject = sharedObjects.getOrCreate(“configurationsSO”); // CREATE OR GET Sharedobject

sharedObject.lock();

try

{

[//sharedObject.clear](https://sharedObject.clear)();

sharedObject.acquire();

sharedObject.setProperty(params.getObject(PARAM1).getString(“type”), params.getObject(PARAM1).getBoolean(“action”));

}

catch (Exception e)

{

getLogger().info("Error attaching "+e.toString());

}

finally

{

sharedObject.unlock();

}

}

client-side

configurationsSO = SharedObject.getRemote(“configurationsSO”, modelControl.ncManager.uri, true);

modelControl.configurationsSO.addEventListener( SyncEvent.SYNC, syncConfigurations) ;

modelControl.configurationsSO.connect( modelControl.ncManager );

modelControl.configurationsSO.client = this;

private function syncConfigurations(event:SyncEvent):void

{

var resultInteracts:Object = event.target.data;

for( var currentChangeList:String in event.changeList )

{

var change:Boolean = (event.changeList[currentChangeList].code == “change”);

var success:Boolean = (event.changeList[currentChangeList].code == “success”);

var clear:Boolean = (event.changeList[currentChangeList].code == “clear”);

var deletes:Boolean = (event.changeList[currentChangeList].code == “delete”);

if(change){ trace(“change:”) }

if(clear){ trace(“clear:”) }

}

}

---

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_G\_Fra](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@Carlos\_Eduardo\_G\_Fra](https://community.wowza.com/u/Carlos_Eduardo_G_Fra)\
**Post date:** [June 25, 2015, 10:49pm UTC](https://community.wowza.com/t/persists-sharedobject-is-not-working/665/2 "2015-06-25T22:49:27Z")

</div>

Someone from the Wowza team can give me a stand regarding this issue?

When we use persistent sharedoject and the application is stopped the persisted SharedObject is no longer sent to the client when the client returns to reconnect the application.
