Spring3 and EJB Integration(I)EJB Client
Spring3 and EJB Integration(I)EJB ClientI used EJB client to call EJB stateless bean, I found it is waste time to lookup the stateless bean every time.
So I tried to use spring to get singleton stub from EJB stateless bean.
The sample project are in easyaxis2proxy,easyrestproxy,easyjpa,easyejb.
We can configure that in Remote/Local way, you can choose that from comment/uncomment the codes I mentioned here.
1. Spring configuration file
local-ejb-context.xml:





































remote-ejb-context.xml






































We can choose use Remote/Local from the main-context.xml























2. The properties file config.properties:






3. My Manager java source:



























































4. We can deploy these packages to JBOSS, and run the axis2 testcase or rest testcase to verify that.
posted on 2011-11-24 21:54 paulwong 閱讀(537) 評論(0) 編輯 收藏 所屬分類: EJB3