Generic Attribute Access Pattern

Hi all,

I'd like to implement my BMP Beans with the Generic Attribute Access Pattern. So instead of using get/set methods I simply do get/put of the HashMap stored in the EJB.

Now my question is: how to I implement persitance of data on the DB with this pattern ?

Do I have to move the content of ejbStore into the method setAttributes(Map map) ? this way after calling setAttributes data is persited on the DB. But then what should I do with ejbStore? should I leave it empty?

thanks a lot

Francesco

[544 byte] By [Marchionia] at [2007-9-27 7:13:59]
# 1

The setAttributes method should set the attributes of the bean from the hashmap, not do

anything in the database itself. Your ejbStore method will take the attributes of the bean

and put them in the database. This is since you say you are using BMP. If you were using CMP

the case would be different.

swatdbaa at 2007-7-8 10:34:12 > top of Java-index,Other Topics,Patterns & OO Design...