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

a newbie on Beans

 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
does it make sense to only bind imuttable objects to a session (or allso to a server context) ? I wonder if it is a good idea to fill all the data (eg from an Item object i use in business logic) in a Object (a Bean) that only has getter methods in order to prevent a unused JSP designer to accidentaly call a method he is not supposed to call (eg. setStock(0). I dont have a application right now, im just curious and maybe the example is bad....) ? this would require to have two classes (Business object and Beanobject) versus having one class.
does anyone get what i try to tell ;-) btw. no doubts because of your intelligence but because of my lousy description....
thanks,
k
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic