David,

I think I asked Tamas a question in my previous email. This applies to
you too. The goal was protecting data or other resource to one user. If
you guys really think after connection is disconnected, sessions still
alive, you will find the situation nobody could connect to the server
as in my quotes. And it looks not good.

I agree with you this needs not continue due to the fact that Rick made
his mind on his implementation and it seems we focus on different places,
mine on one user uses data alone to ensure data integrity and yours on
absolutely one session. As for rick's application, his implementation is
fine and he may change different pages depends on how many pages in that
application.

John H. Xu

  ----- Original Message -----
  From: "John Henry Xu"
  To: "Struts Users Mailing List"
  Subject: Re: probably a cleaner way... testing for just one user
  Date: Wed, 27 Jul 2005 09:26:00 -0500

  >
  > Hi Tamas,
  >
  > I quote the complete requirement. The objective of one user is
  because of
  > data need be accessed by only one user.
  >
  > > > >>Rick's requirement: I have an odd requirement where this
  internal
  > > application should
  > > > >> only be used by one valid user(one session) at a time. (The
  data
  > > > >> being worked with in the application would require so many
  locks
  > > > >> that's it just easier to restrict it to one user).
  >
  > Do you say that the first person who dropped connection still doing
  data
  > access on data sources (and two person using data the same time)?
  Rick's
  > original objective was trying to limit one person use data sources.
  >
  > According to you, user Adam completed his work and dropped the
  connection
  > and session still alive. Other users Charles, Beth still cannot
  connect
  > and cannot do work by using the server. I think this is not good.
  >
  > The reason one may want one user at one time is to protect
  resources such
  > as data not used by 2 people.
  >
  > John H. Xu
  > http://www.usanalyst.com
  > http://www.GetusJobs.com (The largest free job portal in North
  America)
  >
  > ----- Original Message -----
  > From: "John Henry Xu"
  > To: "Struts Users Mailing List"
  > Subject: Re: probably a cleaner way... testing for just one user
  > Date: Wed, 27 Jul 2005 07:41:10 -0500
  >
  > >
  > > Tamas,
  > >
  > > Do you say that the first person who dropped connection still
  doing
  > data
  > > access on data sources (and two person using data the same time)?
  > Rick's
  > > original objective was trying to limit one person use data
  sources.
  > >
  > > > >>Rick's requirement: I have an odd requirement where this
  > internal
  > > application should
  > > > >> only be used by one valid user(one session) at a time. (The
  > data
  > > > >> being worked with in the application would require so many
  > locks
  > > > >> that's it just easier to restrict it to one user).
  > > > >>
  > >
  > > John H. Xu
  > >
  > > ----- Original Message -----
  > > From: "Tamas Szabo"
  > > To: "Struts Users Mailing List"
  > > Subject: Re: probably a cleaner way... testing for just one user
  > > Date: Wed, 27 Jul 2005 14:08:36 +0800
  > >
  > > >
  > > > John Henry Xu wrote:
  > > >
  > > > > Here is Rick's original requirement,
  > > > >
  > > > >
  > > > >
  > > > >> I have an odd requirement where this internal application
  > should
  > > > >> only be used by one valid user(one session) at a time. (The
  > data
  > > > >> being worked with in the application would require so many
  > locks
  > > > >> that's it just easier to restrict it to one user).
  > > > >>
  > > > >>
  > > > >
  > > > > Only if one session ends, another connection can establish
  > > connections,
  > > > > always you have only one user connect to data. It doen't
  matter
  > > if
  > > > > web-browser performing keep-alive or not. If web browser
  droped
  > > the
  > > > > connection, this session ends and original user drops
  > connection.
  > > > I'm not sure that I got this right:
  > > >
  > > > "If web browser droped the
  > > > connection, this session ends and original user drops
  > connection."
  > > >
  > > > The session doesn't end when the browser closes a connection.
  > > >
  > > > If you limit the HTTP connections thath can be made to an
  > > > application to 1, it will not
  > > > assure you that you will have only 1 session at a time.
  > > >
  > > > If the browser closes a HTTP connection to the web server the
  > > > session of the user will still
  > > > be alive on the server. And if a second user opens a connection
  > in
  > > > this time he will be able
  > > > to open a second connection and so on...
  > > >
  > > > Furthermore a browser can make more connections to a web server
  > to
  > > > load data(for example
  > > > it loads images found in a HTML using separete connections).
  > > > You would block all this 'extra' connections if you used your
  > > approach.
  > > >
  > > >
  > > > > >David said: it sounds like you understand the concept behind
  > the
  > > > >
  > > > >
  > > > >> "acceptCount" but are relying on the browser to perform a
  > > keep-alive to
  > > > >>
  > > > >>
  > > > > hold
  > > > >
  > > > >
  > > > >> the connection open...If the keep-alive
  > > > >> doesn't work for a given browser, then the HTTP request is
  > over
  > > in a
  > > > >>
  > > > >>
  > > > > second
  > > > >
  > > > >
  > > > >> and the next person can login to the site.
  > > > >>
  > > > >>
  > > > >
  > > > > Remember the first person does not connected when the second
  > > > > connected--still one user using data only.
  > > > >
  > > > >
  > > > The first person is not connected but it has a Session on the
  > > server.
  > > > The second user can connect so he gets another Session.
  > > >
  > > > The original requierment said:
  > > >
  > > > I have an odd requirement where this internal application
  should
  > > > only be used by one valid user(one session) at a time.
  > > >
  > > >
  > > > It says *one session* explicitly.
  > > >
  > > > Tamas
  > > >
  > > >
  > > >
  > > >
  > >
  >
  ---------------------------------------------------------------------
  > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
  > > > For additional commands, e-mail: [EMAIL PROTECTED]
  > >
  > >
  > >
  > >
  > >
  > >
  > > Jack H. Xu
  > > Technology columnist and editor
  > >
  > > http://www.usanalyst.com
  > >
  > > http://www.getusjobs.com (The largest free job portal in North
  > America)
  > >
  > > --
  > > ___________________________________________________________
  > > Sign-up for Ads Free at Mail.com
  > > http://promo.mail.com/adsfreejump.htm
  >
  >
  >
  >
  >
  >
  > Jack H. Xu
  > Technology columnist and editor
  >
  > http://www.usanalyst.com
  >
  > http://www.getusjobs.com (The largest free job portal in North
  America)
  >
  > --
  > ___________________________________________________________
  > Sign-up for Ads Free at Mail.com
  > http://promo.mail.com/adsfreejump.htm






Jack H. Xu
Technology columnist and editor
http://www.usanalyst.com   

http://www.GetusJobs.com (The largest free job portal in North America)

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

Reply via email to