Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session and application scope object in memory?

 
adam spline
Greenhorn
Posts: 18
  • 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: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • 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: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks everyone for the clarification.

-Adam
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic