5 Replies Latest reply: Oct 17, 2012 7:44 AM by EJP RSS

    Servlet call thread

    821400
      two thread servlet is calling.
      I called twice to the same account.account can receive without.
      note:invited by another user thread.
      Help please.

      My servlet:
      ControlAmount controlamount=new ControlAmount();
      controlamount.account=inAcc;
      controlamount.execute();//db exec
      if(controlamount.state<0){//amount state
      return false;
      }
      Sale sal=new Sale();
      sal.account=inAcc;
      sal.execute();
      if (sal.state>0){
           return true;
      }
        • 1. Re: Servlet call thread
          EJP
          two thread servlet is calling.
          Please translate that into standard English.
          I called twice to the same account.account can receive without.
          Please translate that into standard English.
          note:invited by another user thread.
          Please translate that into standard English.
          Help please.
          Now that I understand. Nothing else.
          My servlet:
          What you have posted is not a servlet. It is a few lines of code, that don't exhibit any apparent problem.

          But if you're starting threads in servlets you're already doing something wrong.
          • 2. Re: Servlet call thread
            821400
            I have a servlet.
            it is calling by two thread of the servlet.
            But the condition that the amount does not work.
            Do you understand me.
            • 3. Re: Servlet call thread
              EJP
              I have a servlet.
              OK
              it is calling by two thread of the servlet.
              The Servlet is calling itself? Via two threads? Why?
              But the condition that the amount does not work.
              Eh?
              Do you understand me.
              No.
              • 4. Re: Servlet call thread
                821400
                another application is using the thread.
                a transaction must be.but the two processes are taking place.
                have money for an operation.
                • 5. Re: Servlet call thread
                  EJP
                  There are no 'other applications' in servlets. Your question as stated so far is meaningless. If you can't express your problem more clearly than that, the question will be closed.