Can I insert and update same record in one go????

Discussions

EJB programming & troubleshooting: Can I insert and update same record in one go????

  1. Can I insert and update same record in one go???? (1 messages)

    Hi All

    I have a bean which needs to insert a record, do some process, and update the same record.

    I am trying this and it gives a database operation error when deployed on weblogic. I am using Oracle as database and have set up the database pool in the appserver.

    Please help and let me know if I need to make some extra configurations to get a transaction , basically to make a insert, followed by update on the same record.

    This is very urgent. Please help.

    Regards
    Deepa Nadig
  2. hi,

    I think what ur doing is possible , it shouldn't give error,
    just see how u have designed ur bean, to insert a record u can use ejbCreate method with the values as parameters and once u create an instance u will get the reference u can do some process and again if u want to update u can use ejb store, what u can do here is u can use setter and getter method which assigns the updated value in the ejb and just call the ejbstore after update......

    srini