• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

See/Discuss our Java EE 5 design pattern

Kenneth Gustafsson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where I work we have decided to follow a certain way of designing. It would be interesting to discuss it with other people. And it might help someone facing the challenge themselfs some help.

What we think is nice about it:
  • It makes the business code used by the session beans easily testable outside container using for example JUnit.
  • We're able to change our integration layer into something other than JPA by just writing a new class and changing one line.
  • Enteties which have FetchType.LAZY for certain variables may still be fetched outside our persistence context (like for example servlets) by using the get method of our SLSB manager. Using entityInstance.someGetterForALazyAttribute() would render an exception from a servlet.

  • Less nice things:
  • Lots of places to write the same thing.
  • More or less procedural way of working with enteties (no logic in the enteties and getters/setters are never used directly except from our business logic implementation POJO class).

  • All constructive critisism is welcome!
    [ June 04, 2008: Message edited by: Kent Larsson ]
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic