Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Synchronization problem in beans with session scope

Satish Plakote

2004-11-29


hi
i am working on a web application.It is basically an interface that was developed using jsp/beans . The user can create a file of
the data that is shown in the browser with a unique that is auto generate in the code. The File creation part is contained in the
bean which has a session scope.
I have declared the method as synchronized. When the simultanoues requests come two different browsers end up having the same file
name..

How do i make sure that only one object creates a file and others wait for it ?


Rgds
satish


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.