public EJBDestinationRegister() { super(); this.list = new ArrayList<EJBDestination>(); //add here add("helloEJB", "HelloServicesImpl/remote"); }
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function helloClick():void{ helloSpring.hello("pomer"); } private function helloEJBFault(e:FaultEvent):void{ Alert.show(e.fault.message.toString()); } private function helloEJBResult(e:ResultEvent):void{ Alert.show(e.result as String); } ]]> </mx:Script> <mx:RemoteObject endpoint="../messagebroker/amf" id="helloEJB" fault="helloEJBFault(event)" result="helloEJBResult(event)" destination="helloEJB" showBusyCursor="true"/> <mx:Button label="hello" click="helloClick();"/> </mx:Application>
Powered by: BlogJava Copyright © linlin yu