> Yes, I thougth about it, and i could build sessions , but I was trying to avoid
> to keep "sessions" on the server since I have all info I need on the client, and
> I pass it back to the server as needed (like cookie, but not one:). I think I can
> get way by creating new DBObjs evreytime someone request the servlet and reset it
> on my getPost method. Is it true?
> So if I do:
> 
> doPost(){
>   db = new dbObj();
>   db.connect();
>   db.doquery();
>   sendDataBack();
>   db.close();
> }
> 
> two instances of the same servlet wouldn't share the same db, and it would be ok
> to turn MTM on?
> 

You're almost right. You'll have to declare your variable "db" in the
doPost method, otherwise, if you declare it as an instance variable, it
will be shared by the different invocations of your servlet.

Don't forget that having 2 requests on the same servlet doesn't mean having
2 instances of the servlet class, but 2 invocation on the doPost() method
of the same instance.

However, you can declare more than one instance of the same servlet in
your zone properties file.

Rémi



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to