Spring EYE on JAVA EE - 8
Till now we have build a small application consists of several layers: web, service, DAO, data source. Let’s revisit this to see if there is anything can be refactored according to standard Java EE approach. One thing comes to mind here is the separation of the web layer and the service layer. In standard Java EE spec, the distributed web and service layer is transparent to the application developer. Spring, on the other hand, provides proxy wrapper so through simple configuration the separation can be easily achieved. In this project that implement remote access though RMI, it means nothing more than expose RMI service on the service side while define remote beans on the client side.
springDemoContext.xml
Unit test for this remote configured Spring RMI service is created. Tricky part for this is to start Spring as a standalone application. Spring ApplicationContext implementation takes care of this.
RemoteOrderFunctionTest.java
remoteContext.xml
Web layer reconfigured to match the above changes.
Modify web.xml
to reflect this configuration file changes.
Previous Next
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home