Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic