File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a unique context should be created for each user

 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such a construct already exists. It's called a session and is implemented via the HttpSession interface.
 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 33689
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
jacob deiter
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every framework


Can you write those frameworks name?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 33689
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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."
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic