What do you mean by Transaction is not committed?

 

If the bean is saving the data to the database the transaction is complete. Isn’t it?

 

Anish

 

-----Original Message-----
From: Kiran MN [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 6:34 AM
To: [EMAIL PROTECTED]
Subject: How to commit a transaction.

 

Hi all,

 

I am using a CMP to update newpassword specified by the user to the database..the bean is updating to the table but the transaction is not commited.

 

I am invoking CMP using findByPrimarykey() and setting the newPassword in my JSP client using...

 

try {
  InitialContext ctx = new InitialContext();
  Object objref = ctx.lookup("java:comp/env/ejb/Project");
  UserHome home = (UserHome) PortableRemoteObject.narrow(objref, UserHome.class);
  User user = home.findByPrimarykey(userId);

  user.setPassword(newPassowrd);

} catch( Exception e) {

.....

...

}

can any one please tell me how to commit the transaction.

 

Thanks in advance

Kiran.

 

Reply via email to