2 Replies Latest reply on Oct 30, 2002 11:29 PM by vickyk

    Why this result??

    vickyk

      Hi,
      ******************************
      int i=10;
      UserTransaction trans=(UserTransaction)ocontext.lookup("UserTransaction");
      out.println("Value Of i before begin:"+i+"");
      trans.begin();
      i++;
      trans.rollback();
      out.println("Value Of i:"+i+"");
      **************************************
      Why I am getting the output of i as 10 and 11 all the time,should it not be 10 and 10.
      regards
      Vicky

        • 1. Re: Why this result??

          An "int" is not a transactional resource :-)

          Database and mail connections or jms sessions
          are transaction resources that can be enlisted in
          transactions.

          Regards,
          Adrian

          • 2. Re: Why this result??
            vickyk

            Hi,
            Why I cant see the reply as the index page shows last replied by warjot.
            I face these problem very frequently.
            regards
            Vicky