This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Client side EJB design pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Client side EJB design pattern " Watch "Client side EJB design pattern " New topic
Author

Client side EJB design pattern

A Teja
Greenhorn

Joined: Mar 18, 2004
Posts: 6
In our project we have a layer of entity beans (CMP) wrapped in a session facade. I wish to expose to expose a Java API to the users that does not require them to even know that they are interacting with EJBs. I know that Bueisness delegate is a pattern that I can use that maps each service call to the session facade in a POJO.
However I would like to expose an an object model through the API tha is very different from the domain model (encoded in the entity beans). Are there any design patterns that I can use? Is doing this a good idea at all or not? If not why?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What you're describing is Adapter, adapting one interface to another.
I wouldn't spend too much time analysing the design further. Just do it.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
A Teja
Greenhorn

Joined: Mar 18, 2004
Posts: 6
Thanks that helped.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client side EJB design pattern
 
Similar Threads
Session Bean ,Entity Bean persistence
Part 2, Fast Lane Reader vs EntityBeans
alternate design pattern for Session Facade ?
Session Facade with stateless session beans
question on Session Facade