Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client side EJB design pattern

 
A Teja
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
A Teja
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks that helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic