資源描述:
《基于blazeds的flex4與spring的程序?qū)嵗襟E和flex中的session管理》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、基于blazeDS的flex4與spring的程序?qū)嵗襟E和Flex中的Session管理?AdobeFlashBuilder4簡體中文正式版Windows版點擊下載:http://g.csdn.net/5134151AdobeFlashBuilder4簡體中文正式版Mac版點擊下載:http://g.csdn.net/5134152Adobe在線課堂:http://adobev.csdn.net/zx/index.htmlAdobe平臺技術(shù)峰會課程視頻:http://adobev.csdn.net/環(huán)境:???jdk1.6???j2ee1.5???spring2.5.6???bla
2、zeDS3.3???tomcat6.0???flex4???myeclipse8.5???flashBuilder4步驟:一、啟動好blazeDS(即啟動tomcat,在[tomcat]/webapps目錄下產(chǎn)生一個blazeds文件夾(三個war包產(chǎn)生一個blazeds文件夾));????在myeclipse8.5新建一個webProject工程,工程名為webSpring;????把此工程加入blazeDS支持(即用blazeds下的WEB-INF文件夾替換掉web工程下的WEB-INF文件夾);????加入spring支持(把spring相關(guān)的jar包拷貝到webSpring/
3、WebRoot/WEB-INF/lib目錄下即可)。二、1.在javaWeb工程webSpring的str目錄下分別新建一下兩個包:???????cn.xuediit.myFactory、cn.xuediit.myService;????2.在cn.xuediit.myFctory包下新建兩個類:FlexFactoryImpl.java和SpringFactoryInstance.java???????(1).FlexFactoryImpl.java:?????????????packagecn.xuediit.myFactory;??????importorg.apache.com
4、mons.logging.Log;?????????????importorg.apache.commons.logging.LogFactory;??????importflex.messaging.FactoryInstance;?????????????importflex.messaging.FlexFactory;?????????????importflex.messaging.config.ConfigMap;?????????????publicclassFlexFactoryImplimplementsFlexFactory{?????????????????pri
5、vateLoglog=LogFactory.getLog(getClass());?????????????????/*overrideinterfacemethod*/?????????????????publicvoidinitialize(Stringid,ConfigMapconfigMap){?????????????????????System.out.println("1---flex工廠實現(xiàn)類重寫的方法initialize");?????????????????}?????????????????/*overrideinterfacemethod*/?????????
6、????????publicFactoryInstancecreateFactoryInstance(Stringid,ConfigMapproperties){?????????????????????System.out.println("2---flex工廠實現(xiàn)類重寫的方法createFactoryInstance");?????????????????????log.info("CreateFactoryInstance.");?????????????????????SpringFactoryInstanceinstance=newSpringFactoryInstance
7、(this,id,properties);?????????????????????instance.setSource(properties.getPropertyAsString(SOURCE,instance.getId()));?????????????????????returninstance;?????????????????}?????????????????/*overrideinterfacemethod*/??????????????