I did not realize the Application instance is not per user.  That clears
things up.

I need the user to have the same data view on several other pages, so
decided to subclasses WebSession and placed the db instance there.  I
suppose this to be a good central location for the individual user.
Everything is working fine now - each user has their own db instance/view
across the several pages of the application.

I got the idea of placing the db instance in the Application class from the
Wicket Examples (org.apache.wicket.examples.repeater.RepeaterApplication).
Is this not a best practice for an enterprise application?


-----Original Message-----
From: McIlwee, Craig [mailto:[email protected]] 
Sent: Wednesday, September 16, 2009 20:05
To: [email protected]
Subject: Re: same data set shows for all users

You do realize that there is a single instance of the Application, not one
per user, right?  Your application holds an OrderDatabase and whenever a
user enters a new date range they are altering the contents of the Map in
that OrderDatabase.  So user A sets a date range and fetch is called,
updating the single OrderDatabase.  User B logs in and his OrderDataProvider
pulls items from the same OrderDatabase instance.  You need to have an
instance of this per user in the session instead of a single instance in the
application.  Or better would probably be to put it in the HomePage or
somewhere else.

Craig
Open Roads Consulting, Inc.
757-546-3401
http://www.openroadsconsulting.com
  _____  



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to