Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about design of Stateless Session Bean?

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, I usually used session facade pattern with 1 stateless session bean as a controller interacting with several Entity Bean to realize business logic in usecase.

now, as business logic grows more complex, to promote component reuse, I'd like to add a common service layer between the controller stateless session bean and Entity Beans. Should I use stateless session beans for this kind of common service layer? I'm afraid that a transaction span across multiple stateless session beans would hurt performance?

anyone here could help me out?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, just make the Service layer POJOs.

"1 stateless session bean as a controller interacting with several Entity Bean to realize business logic in usecase."

How big is that Session Bean? I would definitely stick that stuff in the Service layer like you plan.

Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic