Discussions

EJB programming & troubleshooting: Database is not getting updated for CMP

  1. Database is not getting updated for CMP (1 messages)

    Hi,

    We are using WL 6.0 for EJB 1.1 with Oracle as back end.

    We are trying to update a CMP entity bean from a business method of another CMP entity bean. The setter method is getting executed. But, ejbStore() is not being called by the container.

    Here are the details -
    We have seperate entity beans for 2 database tables ACCOUNT & WIRE. Both of them are CMP. These table have one-to-one relationship. We are avoiding exposing entity bean WIRE to the session beans by having methods UpdateWire and GetWire on Account entity bean itself. Account Bean handles the lookup and holds a reference to Remote and Home interface to Wire bean. When we call Account.getWire(), the data is being fetched from the Wire table. When we call Account.updateWire(), the setter method in Wire bean is being called by the container. After than container is supposed to called ejbStore() and then updated the database. But, the container is not calling ejbStore() and no updation is made to the database.

    Where as the Wire bean gets updated when the setter method is called from a test program. The wire bean fails to update the database when the same setter method is being called from Account bean. No erros or exceptions are being reported on either the server console or the client program.

    Are we missing anything?

    Thanks
    Satish
  2. Database is not getting updated for CMP[ Go to top ]

    Depends upon which transactional attribute u r using to take care for the read. to make it instantaneously updted in the database use unrepeateble_read in the descriptor