Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Using Hashmap in Entity Bean 2.x

 
suman paul
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a big Entity bean like it has 100 attributes may be some financial appl.In some case an Entity Bean (ejb 2.x) can have 100 attributes.For those many getters and setters are not possible to write For that we may need a D.S like map to be passed and try to work in entity bean.Now the abstract schema in ejb 2.x CMP does not support settter/getter to take a map and work around it. In BMP it can be managed.
So only way to work D.S like map is usage of refelction as in web-site somewhere it was mentioned but not
with example exactly how?
Could anyone kindly give a code snippet for that portion working with D.S like Hashmap for too many
attributes and exactly how do you resolve this problem w/o taking help of BMP.Do you model it in other
way or if you are looking for reflection how do you go about it ? Kindly send that block of code in both
the case in
1) Using refection
2) If you model it diff way
thanx and best regards
kingshuk



make me
 
Sunil Sahu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use bulk accessor to set and get values using ValueObject or Data bean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic