2 Replies Latest reply on Sep 18, 2001 8:08 PM by hstech

    Still Need Value Objects with EJB2.0 Local Interfaces

    hunterhillegas

      Anyone have thoughts on the need to continue to use value objects to pass CMP EJB data with EJB2.0's local interfaces?

      It seems that since the operations of calling EJB2.0 CMP beans are no longer remote, a lot of the reasons for using VO's are negated.

      Thoughts?

        • 1. Re: Still Need Value Objects with EJB2.0 Local Interfaces
          pepe_potamus

          If you use a session bean as a facade for your entity beans you still need a value object to pass data to and from your session bean and the client. The facade pattern is very useful to reduce round trips to the server. I suggest you to read EJB Design Patterns on theserverside.com

          • 2. Re: Still Need Value Objects with EJB2.0 Local Interfaces
            hstech

            From a design point of view, you should normally abstract the client code from the server code via a Proxy object. You can then specify the location of the EJB at deployment time to be either local or remote. Following this logic you need to design to cater for both scenarios, which means you should seriously consider using the Value Object pattern.

            Hope this helps,
            Aaron.