How are you getting an instance of the bean?  Are you using the usebean tag?
If you are then your problem probably has to do with the "scope" value in
the tag.  For example, if you set scope to "application" then every user
will be sharing the same instance of the bean.  If you set scope to
"session" then there will be one instance of the bean per user session.  If
your scope is wrong then you may be getting the same instance when you don't
want to.

Another common cause of errors like this is using static variables within
the bean.  Is the vector static?  If it is then all instances of the bean
would share the same vector.

I hope this helps.

-----Original Message-----
From: Kannaiyan P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 11:35 PM
To: JRun-Talk
Subject: I have problem with java Instance


Hi

    I have JSP Program and Java Bean . i will send some parameter to Java
bean . in java bean it will perform some calculation and send the response
back to jsp.

i have problem at when i call the same jsp program in two browse with
different parameters at the same time. the parameter of first browse value
changes by two browse value. why is that java should maintain the instance
separately know.

for sample program in jsp

   pgm.setCondition(parameter);
   v.executemethod();



in java

      public java.util.Vector getCondition()
       {
         return vect;
       }


       public void setCondition(java.util.Vector rv)
       {
         System.out.println("set Condition :"+ rv);
         vect = rv;

       }


it sart executing fine. when the two browse value comes the value of the
first browse changes to second browse value.

example
vector v contains like this
v = [4,12-01-2002,LA,10] ---> first java bean value

v = [5,15-01-2002,SD,10] ---> second java bean  value

the first java bean value changes to second value
[5,15-01-2002,SD,10]
and send the response based on second bean value.

why is not maintaining separate value in each instance.

If you have any idea  . please let me know immed. it's a very urgent one.

Thanks
Kans


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to