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

session and application scope object in memory?

 
adam spline
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This might be a silly question, but I could not find an exact answer.

When you place an object into a session (session.setAttribute), is that object stored in memory on the server or is it serialized to disk?

Same question with placing objects into the application scope? Thanks for all your java help!

-Adam
 
Paul Clapham
Sheriff
Pie
Posts: 20169
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All Java objects are always placed in memory, regardless of what words you use to describe the context in which they are created. That's just a basic fact about Java.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Memory. Under certain circumstances, session values might be serialized (cluster sharing, for example), but they are always held in memory.
 
adam spline
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks everyone for the clarification.

-Adam
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic