I am using CairngormServiceLocator to get access to my RemoteObjects:
But now that i want to add a new remote method call I run into a problem. Since CairngormServiceLocator returns the same instance of RemoteService when I add more remote listeners - it is not the effect i am trying to achieve. Perhaps i need a <prototype>?Code:var r:RemoteObject = CairngormServiceLocator.getInstance().getRemoteObject(RemoteServices.PROPERTY_SERVICE); r.addEventListener(ResultEvent.RESULT, onGetSpaceTreeResult); r.addEventListener(FaultEvent.FAULT, fault); r.getSpaces(nodeId);
My config:
Code:<object id="remoteObjectSecure" class="mx.rpc.remoting.mxml.RemoteObject" abstract="true"> <property name="endpoint" value="http://${host}:${port}/${context-root}/spring/messagebroker/amf" /> <property name="showBusyCursor" value="true" /> </object> <object id="serviceLocator" class="org.springextensions.actionscript.cairngorm.business.CairngormServiceLocator" factory-method="getInstance"> <property name="propertyService"> <object id="propertyService" parent="remoteObjectSecure"> <property name="destination" value="propertyService" /> </object> </property> </object>


Reply With Quote