| Author |
a unique context should be created for each user
|
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
I am planned to design non EJB application, I explain my scenario. When a new user comes in, a unique context should be created for each user. And place large number of objects in the context. How to design and which design pattern should be followed. Any suggestion really welcome [ October 10, 2008: Message edited by: jacob deiter ]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56229
|
|
|
Such a construct already exists. It's called a session and is implemented via the HttpSession interface.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
|
thanks for reply,I have idea about session,I like to have effective usage of session object,if large object saved in session performance may lost.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
if large object saved in session performance may lost.
If you are worried about that, make sure that object is Serializable, then the servlet container can write it out to disk and recover it later. Bill
|
Java Resources at www.wbrogden.com
|
 |
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
hello William Any framework(like struts ,spring) available for effective handling of session in web application,That framework should handle all boilerplate code.I will write the business necessary for me.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
You appear to be under the impression that session handling is some big difficult deal and some magic framework will keep you from making a mistake. IMHO, the servlet API is all the framework you need and it is up to you the programmer to understand it. Bill
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
Originally posted by jacob deiter: That framework should handle all boilerplate code.I will write the business necessary for me.
What boilerplate code? There's session.setAttribute() and session.getAttribute(). This is all you need for almost every web app you write. Every framework would still need getters and setters on a context.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
Every framework
Can you write those frameworks name?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56229
|
|
Why should anyone take the time to write own the name of every Java application framework? Just google for them! Besides, what purpose would that serve in the context of your original question? [ October 11, 2008: Message edited by: Bear Bibeault ]
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
Originally posted by jacob deiter: Can you write those frameworks name?
I wasn't referring to one in particular. I suppose I should have said "any framework" rather than "every framework."
|
 |
 |
|
|
subject: a unique context should be created for each user
|
|
|