Announcement Announcement Module
No announcement yet.
Session Facade and Spring. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session Facade and Spring.


    I am new to the Spring Framework. I am learning about its functionality and capabilities. My understanding is that on top of many other features, it can completely eliminate the need for EJB and EJB container the remote features of EJB.

    How would I implement the typical Session Facade pattern using Spring assuming I currently use the Remote Session Bean interface for Session Facade (i.e., I need to have access to it from a remote machine)? I would love to see some code samples or a link to detail of this kind of implementation. The Session Facade implemented as a Session bean that in turn is connected to Service Locator and DAO has been a very common implementation. I would love to know how this kind of machanism can be implemented in Spring.

    Thanks in advance!

  • #2
    Create your facade as an interface backed by POJO and expose that interface via Spring remoting
    Check out jpetstore from Spring standard distribution.
    Works like a charm.


    • #3
      I saw that article on Remoting with Spring.

      If someone could provide more details that pertain specifically to implementing Session Facade with Spring implementation, I would appreciate it.


      • #4
        What details are you interested in? The samples provided with the Spring distribution contain a great starting point (including setting up the Spring app context). You can find plenty of code and lengthy presentations in the books from the main Spring site (especially Rod Johnson's book on Expert-One-on-One development w/o EJB).


        • #5
          Using Spring Remoting as a Session Facade, does not look accurate for me. Spring Remoting, should be normally implemented as a stateless facade, not in a statefull manner. As far as I know, the Session Facade concept was build upon the EJB Statefull Session Bean, using the EJB (Business) Container as a client statefull session manager. In Spring, the goal is to reduce the complexity of J2EE applications, therefore the Session Facade concept has been removed.

          Is it making sense?




          • #6
            Take a look at this thread. It talks about separating your business object from the EJB in case you still need EJB remoting. If not the non-EJB piece is the real code and you can use as your facade. Subsequently you can wrap it other remoting protocols as well