aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session attribute " Watch "session attribute " New topic
Author

session attribute

James Mark
Ranch Hand

Joined: Jul 05, 2007
Posts: 115
a)A session attribute can only be a data type that implements the serializable interface
b)A container may throw an IllegalArgumentException in the setAttribute()
method of HttpSession if the attribute is not Serializable.

which statement is true?Please help.Thanks in Advance


SCJP1.4(96%) SCWCD1.4(92%)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Could you please tell where you got those questions from ? And what do you think about it ?


[My Blog]
All roads lead to JavaRanch
James Mark
Ranch Hand

Joined: Jul 05, 2007
Posts: 115
statement a is from MarcusGreen Summary Quiz 2
statment b is from Manning Book
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Thank you for quoting your source. I don't think that objects must be Serializable, but it must be a consideration if you are using a distributed environment, where sessions may be migrated. So neither a nor be are correct.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session attribute
 
Similar Threads
session beans with transaction attribute as serializable???
Doubt about session attribute serialization
Tomcat 6 Clustering Question
Session migration
session migration