This discussion is archived
5 Replies Latest reply: Oct 17, 2012 5:44 AM by EJP RSS

Servlet call thread

821400 Newbie
Currently Being Moderated
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 Guru
    Currently Being Moderated
    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 Newbie
    Currently Being Moderated
    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 Guru
    Currently Being Moderated
    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 Newbie
    Currently Being Moderated
    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 Guru
    Currently Being Moderated
    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points