If table is getting updated then transaction is commited. If this is not so then check the transaction attributes of the setPassword method.
 
 
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Kiran MN
Sent: Wednesday, January 30, 2002 5:04 PM
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