can we pass objects to methods in entity beans?

Discussions

EJB design: can we pass objects to methods in entity beans?

  1. can we pass objects to methods in entity beans? (3 messages)

    can we pass objects to methods in entity beans?
    I got object from DB using entity bean then modified attributes of that object then tried to set that object. But surprisingly i dont see any changes i made after calling a set function of that bean to save the changed object. Any body can help??
  2. Of couse, but the object u pass to the Entity bean methods must implements Serializables.

    Bye
  3. Hi,

    Are you using Object Database?? or you got String object from relational database??. If you are using any of the user defined object then that should be a serialized on before transfering from one layer to another.

    regards
    Moorthi



  4. Thanks very much..
    I figured it out. I was using user defined object. The problem was I got the object from databse, modified some of its properties using modify methods on that object and then calling bean method on it...at this time..bean calls ejbLoad which is getting the object from the database and its overwriting the changes I made. so when ejbStore is called its storing the same object its got. i modified ejbLoad in such a way its called only when there are no modifications to the object on which it is called. Its working fine now.Thanks