Hi Folks,
I need some help with design of my CMP(where bean is local to calling client).
Design:
1.will have CMP with set&get methods for id,name,city,zipcode where id is the primary key.
2.will call CMP from POJO,which will look up bean and set those fields.I have to satisfy these conditions a.according some business rules I may need to insert a new record or need to update all fields except id if id already exists.if id is there,all other fields should be updated in transaction as well as while insertion all fields must be inserted in a transaction.
according to my design I am thinking to have the following trasaction attributes
setid----requiresnew
setname----required
setcity----required
setzipcode----required
This POJO class will throw whatever exceptions that are occured in
EJB to presentation layer.
My question is since container maintains transactions for my CMP,suppose when setting city if remote or SQLException occurs is container going to rollback name value also.I heard that container will only rollback if it get EJBexception from method,is that true .in my case since all EJBExceptions will be converted to application specific exceptions,is my design going to satify my business requirements.
Please reply me.If question is n't clarified to you,please don't hesitate to ask.
Thanks
alot folks,
waiting for your reply.
Anu