No Kesav,
The following lines are from JDK doc...

Returns:
either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements
that return nothing

I don't know should I set some property in ejb-jar.xml or some where else.
Do we have to set anything to inform the server that my UserTransaction will
take care of my
transaction? I had specified in my ejb-jar as
<ejb-jar>
     <description>Two Phase commit test application</description>
     <display-name>Two Session Bean</display-name>
     <enterprise-beans>
       <session>
         <ejb-name>TwoPhase</ejb-name>
         <home>twophase.TwoPhaseHome</home>
         <remote>twophase.TwoPhase</remote>
         <ejb-class>twophase.TwoPhaseBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
       </session>
     </enterprise-beans>
</ejb-jar>

Does it require anything more..?

Yogaraj

-----Original Message-----
From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:31 PM
To: 'It, Cockpit (CAP, Contractor)'
Subject: RE: BMP Doubt!



Hi i think when you execute the statement the value is zero for success,
change the line of code
 if(status != 0){
   ut.commit();
   System.out.println("Successfully commited");
  }else{
   ut.rollback();
   System.out.println("Transaction Rolledback");
  }

to
 if(status == 0){
   ut.commit();
   System.out.println("Successfully commited");
  }else{
   ut.rollback();
   System.out.println("Transaction Rolledback");
  }

hope this will help you.
Regards

Ramesh Kesavanarayanan
Electronic Data Systems India pvt Ltd

*  91-44-254 9650 ext :2469
* [EMAIL PROTECTED]




"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system."

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to